T09 · Insecure Skill Coding Practices
- Location
S2_SPACE_ARCHITECT_MANUAL.md:64- Finding
Shell Command Injection in the Recommended Next.js API Bridge
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly disclosed, but it combines physical-action claims, persistent data logging, and an unsafe deployment example in ways users should review carefully before installing.
Install only in an isolated test environment unless you are prepared to review and harden the MCP server. Do not copy the documented Next.js exec route as written. Treat the physical-action tool as simulation unless real actuator authorization, safety checks, and verified device readback are added, and decide explicitly whether persistent training logs are acceptable.
S2_SPACE_ARCHITECT_MANUAL.md:64Shell Command Injection in the Recommended Next.js API Bridge
s2_mcp_server.py:42Physical-Action MCP Tool Unconditionally Spoofs Successful and Compliant Execution
s2_chronos_memzero.py:14Unbounded Plaintext Persistence of Caller-Controlled MCP Data
skill.md:8Unpinned Third-Party MCP Dependency Creates Supply-Chain Exposure
The changelog states that cloud or local LLM agents can directly connect to the system and execute physical actions, yet it mentions no authorization boundaries, human approval, sandboxing, rate limits, or emergency-stop constraints. In a skill meant for agent integration, direct physical actuation materially increases danger because misuse, prompt injection, or model error could cause unsafe real-world actions affecting people, property, or connected systems.
The documented Next.js API route builds a shell command using user-controlled input (space) and executes it via exec, which invokes a shell. An attacker can supply crafted input containing shell metacharacters to achieve command injection and arbitrary code execution on the server hosting the app.
The changelog explicitly describes automatic interception, recording, and persistence of causal state/action/state streams to .jsonl during AI-triggered physical execution, but provides no indication of notice, consent, minimization, retention controls, or protection of captured data. In an agent skill context, this is dangerous because the recorded state may include sensitive environmental, behavioral, or operational data, creating privacy, surveillance, and secondary-use risks if collected by default.
The deployment instructions encourage subprocess execution of a Python script using request-derived input without any warning or input-safety guidance, and the example itself is unsafe. In practice this normalizes a dangerous integration pattern that can directly expose backend command execution to remote users through the frontend API.
L44 的硬件名称明确写着“【严禁部署任何视觉摄像头】”,表达了强约束性的意图说明;但该条目仍把它作为 hardware_matrix 中的一个“视/感知”设备项,与清单应列出实际配置能力的语义相冲突。虽然这更像数据内容层面的矛盾而非可执行代码行为,但就文档意图与所声明能力而言存在明显背离。
At L06, the entry explicitly states '【严禁使用视觉摄像头】(保护老人生活隐私)', which is an active prohibition against using visual cameras. However, the overall dictionary later includes camera/video-based hardware such as '驻车 360 度环视安防哨兵系统' and '视频车牌反寻导航探头' for other spaces, so the file-level content contradicts the apparent blanket wording of 'strictly prohibited' if read as module guidance rather than only a local preference.
The component simulates activity with random local log entries while the surrounding UI language strongly implies real MCP-driven physical-world monitoring and data harvesting. This is deceptive functionality: users or operators could believe real device telemetry is being collected or verified when it is not, which can lead to unsafe operational decisions, privacy misunderstandings, or false assurances about system capabilities.
The UI states that it is continuously listening to physical actions and harvesting state-transition data for training, but it provides no notice, consent, control, or disclosure to affected users. Even if currently mock-only, this normalizes undisclosed surveillance/data collection behavior and would become a privacy and compliance issue immediately if connected to real sensors or backend services.
The comments, naming, and implementation all indicate an intentional design to collect and retain world-model training data from causal events in a local corpus. In this context, the skill is more dangerous because agent event streams frequently include sensitive behavioral traces, prompts, responses, and possibly secrets, so the data-harvesting purpose increases the likelihood of over-collection and unintended retention.
The method appends arbitrary causal_event data to a persistent local JSONL dataset explicitly described as training data, but provides no consent, notice, minimization, or access controls. In an agent skill context, causal events can easily contain prompts, outputs, identifiers, or other sensitive interaction data, making silent retention a real privacy and data-governance risk.
Most user-visible docstrings, comments, and descriptions are written in Chinese, including tool descriptions and parameter documentation, while the file does not indicate that the skill is intentionally region-specific or provide a language choice. This can violate a language/locale policy when users are not given an explicit opt-in or alternative locale.
The tool is named and documented as executing physical actions, but it never invokes a real actuator and always returns SUCCESS while persisting a fabricated causal record. In an agent-control context, this can mislead upstream automation into believing safety- or security-relevant actions were completed, causing dangerous state divergence between the physical environment and the recorded system state.
The physical-action tool persistently records detailed before/after environmental and occupancy data without any user-facing notice, consent flow, or confirmation. In a smart-space setting, this can silently create behavioral and presence logs that expose sensitive information about occupants and space usage.
The code comments and interface imply collection of live sensor readings and real physical execution, but the implementation uses hardcoded mock state and no hardware adapter. This creates deceptive telemetry and false audit/history data, which can corrupt downstream decision-making, analytics, or safety investigations.
The manifest presents the skill primarily as a space parser, but the content also declares a local MCP server and an execute_physical_action_and_log capability that can drive real-world actions and persist data. This scope expansion is security-relevant because agents or operators may authorize the skill for passive analysis while unintentionally enabling action execution and behavioral logging.
The skill headline and surrounding operational description are presented as Chinese-only user-facing guidance, and the invocation example uses a Chinese-only space name. This creates a locale constraint without any opt-in or alternative language option, which can violate language-choice policy for broadly scoped skills.
The agent-facing instructions say the skill is for designing, planning, or analyzing spaces, then direct the agent to use execute_physical_action_and_log, which crosses from advisory behavior into real-world actuation. In an agent environment with exec, write_file, and a local server, this mismatch materially increases the chance of unintended physical operations and covert collection of action/state data.
The operational instructions are written to handle the task in a specific language context and provide only a Chinese example input, but do not say whether other languages are supported. For a general-purpose smart-space skill, that is an undocumented locale restriction.
The changelog switches between English and Chinese in headings and feature descriptions without stating that the skill documentation is bilingual or offering a language choice. This can be a natural-language policy issue if organizational policy requires not forcing a language or locale without user opt-in.
SQP-3 applies to all file types and covers language or locale policy violations. This whitepaper presents all user-facing natural-language content only in Chinese, and nowhere indicates that the skill is region-specific or that users may opt into this language.
No actionable natural-language policy violation is present. The bilingual text does not force a single language on the user without opt-in.
This Python file declares a perimeter AI camera for the garden, which is a privacy-sensitive monitoring capability. There is no adjacent comment, docstring, or other user-facing disclosure in the file indicating that video surveillance is part of the skill behavior.
The file includes a pet-tracking AI camera with an interactive laser pointer, which introduces monitoring and potentially safety-relevant behavior. No confirmation, explanatory comment, or documented warning is present in this code file.
This entry specifies a video monitoring system for a wine cellar's valuable collection area, which is a surveillance-related capability. The file contains no visible disclosure or warning to users that monitoring is part of the configuration.
A license-plate recognition AI camera processes identifiable vehicle information, making it privacy-sensitive. The code provides no user-facing warning, comment, or explanatory text disclosing this data-processing capability.