Back to skill

Security audit

Universal Home Space Parser Engine (智能家居空间场景解析器)

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
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

T07 · Tool Hijacking and Spoofing

Error
Location
s2_mcp_server.py:42
Finding

Physical-Action MCP Tool Unconditionally Spoofs Successful and Compliant Execution

Content
View full analysis
str: """ [Physical Actuation & S2-SWM Data Harvester] 在指定空间网格执行物理动作,并强制记录状态跃迁 (St -> At -> St+1) 以供世界模型训练。 参数: zone (str): 区域 (如 "Master_Bedroom") grid (str): 4㎡ 网格 ID (如 "U_Bed_01") s2_element (str): 调用的六要素基元 (LUMINA, CLIMATE, SENTINEL 等) action_intent (str): 动作意图 (如 "Set_Temperature", "Turn_Off_Light") params (dict): 动作参数 (如 {"temperature": 24}) """ logging.info(f"⚡ [MCP Execution] 接收到物理执行请求: {zone}/{grid} -> {action_intent}") # ================================================================= # 🌟 远近结合的核心:收集世界模型 (S2-SWM) 训练数据 # ================================================================= # 1. 抓取动作执行前 (t 时刻) 的空间状态 S_t state_t = { "temp_c": 26.5, "lux": 150, "noise_db": 30, "occupancy": True # (真实情况这里调用感知层探针获取当前读数) } # 2. 模拟调用底层执行器 (Adapter) 进行真实物理执行 # from main_actuator import ... execution_status = "SUCCESS" # 3. 抓取动作执行后 (t+1 时刻) 的空间状态 S_{t+1} # 假设空调调到了 24度,温度开始下降 state_t_plus_1 = { "temp_c": 26.0, "lux": 150, "noise_db": 45, "occupancy": True } # 4. 将这段完整的【因果链】打包写入 Chronos 时空阵列 causal_event = { "timestamp": datetime.now().isoformat(), "S_t": state_t, "A_t": {"element": s2_element, "intent": action_intent, "params": params}, "S_t_plus_1": state_t_plus_1, "world_model_ready": True } # 落盘:这就是未来训练 S2-SWM 世界模型的“真金白银”! chronos_memory.inject_timeline_fragment(causal_event) return json.dumps({ "status": execution_status, "message": f"Action {action_intent} execute ...[truncated 2891 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
s2_chronos_memzero.py:14
Finding

Unbounded Plaintext Persistence of Caller-Controlled MCP Data

Content
View full analysis
[动作 A_t] -> [状态 S_t+1] 的因果链 """ try: with open(self.dataset_file, "a", encoding="utf-8") as f: f.write(json.dumps(causal_event, ensure_ascii=False) + "\n") self.logger.info(f"💾 [S2-SWM Data Harvested] 一条空间因果数据已写入训练集: {self.dataset_file}") except Exception as e: self.logger.error(f"写入记忆阵列失败: {e}") ``` ### Technical Analysis The MCP tool accepts arbitrary `params`, `action_intent`, and `s2_element` values and inserts them directly into a causal event. The event is serialized in full and appended to a plaintext JSONL file. The implementation has no: - Input schema or nesting-depth validation. - Per-field or total serialized-size limit. - Secret or personal-data redaction. - Log rotation or retention policy. - Storage quota. - Encryption or explicit restrictive file permissions. - Authentication or caller-specific access policy in the shown server code. - Safe, application-owned absolute storage path. - Symlink rejection or atomic secure file creation. Becaus ...[truncated 2612 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
skill.md:8
Finding

Unpinned Third-Party MCP Dependency Creates Supply-Chain Exposure

Content
View full analysis
= 3.10) - mcp (>= 1.0.0) ``` ```text * Dependency declaration: Python 3.10+ must be available and `pip install mcp` must be run in advance. ``` The project provides no reviewed lockfile, exact package version, package hash, or reproducible environment configuration. ### Technical Analysis The constraint `mcp (>= 1.0.0)` allows any present or future version accepted by the package resolver. The installation command `pip install mcp` similarly resolves the latest matching release and its transitive dependencies from the configured package index. Python package installation and subsequent imports can execute package-controlled code. Therefore, the effective codebase is not fixed at review time. A compromised future release, compromised transitive dependency, or malicious package supplied through a misconfigured package index could execute locally. The audit found no evidence that the currently referenced package is malicious. The vulnerability is the absence of version and integrity controls, not a confirmed malicious dependency payload. ### Attack Path 1. A user follows the Skill's installation instructions. 2. `pip` queries the configured package index and selects the latest package satisfying the open-ended constraint. 3. The selected release and transitive dependencies may differ from those reviewed or tested by the project author. 4. If a future release, dependency, mirror, or configured index is compromised, malicious package code is installed. 5. Package-controlled code may execute during build or installation, or when `s2_mcp_server.py` imports `mcp.server.fastmcp`. 6. The code runs with the privileges of the user or service performing installation or starting the MCP server. ### Impa ...[truncated 588 chars]
Remediation
View remediation
=`. - Supply a lockfile covering all transitive dependencies. - Require hashes for downloaded artifacts, for example through a hash-locked requirements file. - Build and test in a clean, isolated virtual environment. - Use an explicitly configured trusted package index instead of relying on ambient pip configuration. - Consider maintaining an internally reviewed package mirror for production deployments. - Disable unnecessary source builds and prefer verified wheels where operationally appropriate. - Run dependency vulnerability and provenance checks in CI. - Regularly update the pinned version through a controlled review and testing process. - Perform installation and runtime under a dedicated, unprivileged account with restricted filesystem and network access. - Document the exact tested Python and MCP package versions. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (33)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

L44 的硬件名称明确写着“【严禁部署任何视觉摄像头】”,表达了强约束性的意图说明;但该条目仍把它作为 hardware_matrix 中的一个“视/感知”设备项,与清单应列出实际配置能力的语义相冲突。虽然这更像数据内容层面的矛盾而非可执行代码行为,但就文档意图与所声明能力而言存在明显背离。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
0% confidence
Finding

No actionable natural-language policy violation is present. The bilingual text does not force a single language on the user without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.