Back to skill

Security audit

S2-SP-OS Universal Indoor Air Adapter

Security checks for vulnerabilities and agentic risk

Overview

The skill is in the right general domain, but it overstates its capabilities and can mislead users with simulated device and sensor data presented as real discovery or readings.

Install only if you are comfortable with a skill that asks an agent to run local exec commands and potentially broadcast on your LAN to find sensors. Treat its discovered devices and air-quality readings as untrusted demo data unless the publisher fixes the simulated outputs, adds explicit scan consent and scope controls, and implements real device communication with clear provenance.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
s2_indoor_air_adapter.py:19
Finding

Active LAN Discovery Occurs Without Explicit Scan-Level Consent

Content
View full analysis
list: """发送 UDP 广播,扫描局域网内的传感器""" discovered_devices = [] try: # 建立真正的 UDP 广播 Socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) sock.settimeout(1.5) msg = b"S2-SP-OS: DISCOVER_SENSORS" sock.sendto(msg, ('', self.port)) # 接收响应 (此处为演示,真实环境会抓取所有响应的设备) while True: data, addr = sock.recvfrom(1024) discovered_devices.append({"ip": addr[0], "mac": "XX:XX:XX", "type": "Air_Sensor"}) except socket.timeout: pass # 扫描结束 except Exception: pass ``` ### Technical Analysis Discovery mode creates a broadcast-enabled UDP socket, sends an active probe to UDP port `54321` across the local broadcast domain, and records the IP addresses of responding devices. The read workflow has a consent flag, but the discovery workflow has no equivalent authorization check. Although LAN discovery is an advertised feature of the Skill, initiating network probes without explicit, scan-specific approval weakens least-privilege controls. It also exposes local network topology through the command output. The broad `except Exception` handler suppresses operational and permission errors, preventing the caller from reliably determining whether the scan was successful. ### Attack Path 1. A caller or Agent invokes the script with `--mode discover`. 2. No consent or authorization check is performed. 3. The script broadcasts `S2-SP-OS: DISCOVER_SENSORS` to UDP port `54321`. 4. Devices on the local broadcast domain may respond. 5. Responding IP addresses are collected and returned in the generated JSON. 6. The resulting addresses can be used as ...[truncated 472 chars]
Remediation
View remediation

other

Warning
Location
s2_indoor_air_adapter.py:34
Finding

Failed or Empty Discovery Is Replaced with Fabricated Devices

Content
View full analysis
Remediation
View remediation

other

Warning
Location
s2_indoor_air_adapter.py:54
Finding

Read Mode Presents Static Measurements as Data Retrieved from the Selected Device

Content
View full analysis
dict: """(Gene 3: Local-First) 抓取本地 MQTT/HTTP 数据,拒绝云端依赖""" # 模拟从指定 IP 或本地 MQTT Broker 获取的杂乱数据 if protocol == "mqtt": return { "temperature": 29.5, "humidity": 68.0, "co2": 1250, "battery": 85, "linkquality": 102, "voc_index": 4 # 厂商私有杂乱参数 } return {"temp": 24.0, "hum": 45.0, "pm25": 15, "uptime_days": 42} ``` The static values are used by the read workflow as follows: ```python adapter = S2VoxelAdapter(args.ip, args.zone, args.grid) raw_data = adapter.fetch_data(args.protocol) memzero_data = adapter.voxel_wrapping(raw_data) offline_suggestions = adapter.offline_linkage(memzero_data) print(json.dumps({ "status": "AUTHORIZED_VOXEL_DATA", "contact_support": "厂商特权接入请联系 smarthomemiles@gmail.com", "s2_chronos_memzero": memzero_data, "offline_linkage_suggestions": offline_suggestions }, ensure_ascii=False, indent=2)) ``` ### Technical Analysis `fetch_data` does not use `self.ip` and implements neither an MQTT client nor an HTTP request. It selects one of two fixed dictionaries solely from the protocol argument. The output is nevertheless labeled `AUTHORIZED_VOXEL_DATA`, and the supplied IP address is embedded in the spatial result. The fixed MQTT values include a temperature of `29.5°C` and CO2 concentration of `1250 ppm`. These values satisfy the thresholds in `offline_linkage`, producing recommendations to operate cooling, curtains, or ventilation. The resulting recommendations can therefore appear to be based on a selected physical sensor even though no device communication occurred. ### Attack Path 1. A caller supplies any string as `--ip`, valid zone and grid values, a supported protocol, and `--consent-granted true`. 2. The ada ...[truncated 971 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
s2_indoor_air_adapter.py:125
Finding

Caller-Controlled Boolean String Is Treated as User Authorization

Content
View full analysis
--zone --grid --protocol mqtt --consent-granted true ``` ### Technical Analysis Authorization is represented by an untrusted command-line string. Any process able to invoke the script can set the value to `true`; no user identity, ownership, device authorization, session binding, consent timestamp, or signed authorization artifact is checked. The documentation further normalizes passing `--consent-granted true` as part of the standard invocation. This means the check verifies only that the caller supplied the expected text, not that the affected user granted informed consent. The current implementation returns static readings, which limits immediate privacy exposure. However, this check would become security-critical if real MQTT or HTTP access were implemented without redesigning authorization. ### At ...[truncated 779 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The description partially matches the broad theme of the code: it is an indoor air adapter with UDP discovery, local data adaptation, a spatial metadata wrapper, and offline recommendation logic. But the declared description materially overstates what the code does. The only real network action is UDP broadcast discovery. The MQTT/HTTP portion does not sniff, connect to brokers, issue HTTP requests, or aggregate live data; it returns static sample dictionaries. The so-called Memzero voxel wrapping is a formatting/normalization step that adds zone/grid metadata, not true spatial voxel processing. The offline linkage is a pair of threshold-based suggestions for temperature and CO2, not a sophisticated subconscious or generalized linkage system. Because key advertised capabilities are exaggerated or absent, this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest claims substantive runtime behavior such as UDP radar discovery, protocol sniffing, spatial wrapping, and offline linkage. In this file, those capabilities are only described in prose and shell examples; no actual implementation is present to perform them.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly promotes LAN discovery and MQTT/HTTP sniffing behavior without any warning, consent boundary, or discussion of privacy and network impact. In an agent context with allowed-tools set to exec, this can normalize potentially intrusive scanning behavior and lead users or agents to probe local infrastructure without informed authorization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-facing descriptions, help text, errors, and output messages are written in Chinese throughout the file, with no indication that the user can select another language or that the skill is intended only for a Chinese-language audience. This creates a language-policy concern because the skill effectively imposes a locale without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill performs active UDP broadcast scanning of the local network immediately in discover mode without an explicit runtime warning, confirmation, or scope restriction. Active network discovery can violate user expectations, expose nearby device metadata, and trigger unauthorized enumeration in environments where the agent should not probe the LAN without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes real protocol-level MQTT/HTTP aggregated sniffing as a core feature of the indoor air adapter. In practice, fetch_data merely returns fixed dictionaries based on the selected protocol and does not connect to a broker, send HTTP requests, or aggregate data from any source.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The docstring states that the method retrieves local MQTT/HTTP data, which implies actual protocol interaction with a local device or broker. The implementation contradicts that claim by returning synthetic sample payloads without any network or local broker access.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The text frames the skill as defending privacy by rejecting fragile external-cloud patterns, yet it also includes HTTP webhook connectivity and an out-of-band vendor contact path. That does not prove insecure behavior in code, but the stated privacy intent is in tension with the documented integration model.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The instruction mandates a fixed persona, "You are the S2-SP-OS Space Agent," rather than offering the user a choice in how the assistant should present itself. This is a natural-language policy concern because it imposes a specific interaction framing without explicit user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description presents a sophisticated offline subconscious linkage capability, implying advanced autonomous reasoning or orchestration. The code only checks temperature and CO2 thresholds and returns static recommendation objects, which is materially narrower than the claimed behavior.

Content

No source excerpt is available for this finding.