Back to skill

Security audit

Smart Home Unified

Security checks for vulnerabilities and agentic risk

Overview

This smart-home skill is purpose-related but needs Review because it asks users to store high-value smart-home and account credentials in plaintext while making unsupported security and capability claims.

Install only after treating this as a prototype: do not put Xiaomi, Apple, HomeKit, or device secrets in TOOLS.md; avoid paid plans or relying on advertised automation until the publisher documents implemented features, secure secret storage, privacy practices, and exact supported devices. Review the code and dependency versions before connecting real devices.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:38
Finding
Plaintext and Unnecessary Collection of High-Value Smart-Home Credentials<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 38-56; `platforms/xiaomi.js`, lines 7-12 and 27-33; `platforms/homekit.js`, lines 7-12 **Vulnerability Type**: Plaintext sensitive-data storage and unnecessary credential collection **Risk Level**: High ### Evidence `SKILL.md` directs users to place account passwords, device tokens, Apple IDs, and HomeKit PINs directly into a Markdown file: ```markdown ### 3. 配置凭证 在 `TOOLS.md` 中添加配置: ```markdown ### Smart Home - 智能家居配置 #### 小米米家 - xiaomi: - username: "你的小米账号" - password: "你的小米密码" - device_token: "设备 token(通过 miio extract 获取)" #### Apple HomeKit - homekit: - pin_code: "配件 PIN 码(8 位数字,格式:XXX-XX-XXX)" - username: "Apple ID(可选,用于 iCloud 同步)" - password: "Apple 密码(可选)" ``` ``` The Xiaomi adapter retains all credentials in ordinary JavaScript object properties: ```javascript class XiaomiAdapter { constructor(config) { this.username = config.username; // 小米账号 this.password = config.password; // 小米密码 this.token = config.device_token; // 设备 token(可选,本地控制需要) this.devices = new Map(); } } ``` The purported login requires the Xiaomi username and password, but the actual connection only uses the device token: ```javascript if (!this.username || !this.password) { throw new Error('请配置小米账号和密码'); } // 发现并连接设备 const device = await miio.device({ address: '192.168.1.100', token: this.token }); this.devices.set('gateway', device); ``` The HomeKit adapter similarly retains Apple credentials even though no code uses them for authentication or iCloud synchronization: ```javascript class HomeKitAdapter { constructor(config) { this.username = config.username; // Apple ID(可选,用于 iCloud 同步) this.password = config.password; // Apple 密码(可选) this.pinCode = config.pin_code; // HomeKit PIN 码(必需) this.accessories = new Map(); } } ``` ### Technical Analysis `TOOLS.md` is a general Markdown configuration document rather than a dedic ...[truncated 2132 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove Xiaomi username and password requirements unless a genuine cloud authentication flow is implemented and documented. 2. Remove Apple ID and Apple password fields. Local HomeKit support must not request cloud-account credentials. 3. Store device tokens and PINs in an operating-system credential manager, encrypted secret vault, or platform-provided secret facility rather than `TOOLS.md`. 4. If file-based storage is unavoidable: - Use a dedicated secrets file outside the project directory. - Enforce owner-only permissions. - Exclude it from version control and backups by default. - Encrypt secrets at rest using a key not stored beside the ciphertext. 5. Avoid retaining secrets as long-lived public object properties. Load them only when required, minimize their lifetime, and clear references after use. 6. Add secret-redaction controls to logs, exceptions, diagnostics, and support bundles. 7. Document exactly which credentials are needed, why they are needed, where they are stored, and which network endpoints receive them. 8. Rotate any credentials that users may already have placed in `TOOLS.md`. ]]>

T08 · Insecure Dependencies

Warning
Location
package.json:25
Finding
Unpinned and Redundantly Installed Third-Party Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `package.json`, lines 25-42; `SKILL.md`, lines 11-18 **Vulnerability Type**: Supply-chain exposure through mutable dependency resolution and global installation **Risk Level**: Medium ### Evidence The package uses caret version ranges for every direct, optional, and peer dependency: ```json "dependencies": { "commander": "^11.0.0", "axios": "^1.6.0", "chalk": "^5.3.0", "ora": "^7.0.0", "inquirer": "^9.2.0", "yaml": "^2.3.0", "node-fetch": "^3.3.0" }, "optionalDependencies": { "miio": "^0.5.8", "hap-nodejs": "^0.11.0" }, "peerDependencies": { "miio": "^0.5.8", "hap-nodejs": "^0.11.0" } ``` The installation instructions additionally tell users to install platform packages globally without a version: ```bash # 安装技能 clawhub install smart-home-unified # 安装平台特定依赖(根据需要选择) npm install -g miio # 小米米家设备 npm install -g hap-nodejs # Apple HomeKit 设备 ``` The supplied directory structure contains no package lockfile. ### Technical Analysis Caret ranges permit future semver-compatible releases to be selected at installation time. Unversioned global installation resolves whatever release is current when the command is run. Consequently, the dependency graph audited today may differ from the code later installed by users. Global package installation also broadens exposure because executable files and modules may become available outside this project. Declaring `miio` and `hap-nodejs` as both optional and peer dependencies creates ambiguous resolution behavior and encourages the separate global installation path. No evidence shows that the named packages are currently malicious. The vulnerability is the absence of reproducible dependency resolution and the unnecessary global installation guidance. ### Attack Path 1. A dependency maintainer account or package publication pipeline is compromised, or a future compatible release contains malicious behavior. 2. The malicious release remain ...[truncated 1073 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Commit a current `package-lock.json` and use `npm ci` for reproducible installation. 2. Pin security-sensitive runtime dependencies to reviewed exact versions. 3. Remove global installation instructions and install required packages locally within the Skill. 4. Choose one dependency model for each integration. Do not declare the same package as both an optional and peer dependency unless there is a documented technical need. 5. Remove unused dependencies such as HTTP and interactive libraries until they are actually required, reducing attack surface. 6. Enable dependency update review, automated vulnerability scanning, provenance verification, and lockfile integrity checks. 7. Review package lifecycle scripts before upgrades and consider installation with lifecycle scripts disabled where compatible. 8. Publish supported hashes or a software bill of materials for release artifacts. ]]>

other

Error
Location
README.md:1
Finding
False Security and Capability Claims Encourage Unsafe Credential Disclosure and Payment<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 1-14; `MARKETING_PLAN.md`, line 104; `bin/cli.js`, lines 15-29 and 32-40; `TEST.md`, lines 37-44 **Vulnerability Type**: Deceptive security and product-capability representation **Risk Level**: High ### Evidence The README claims genuine integrations, token management, real control commands, and removal of simulated data: ```markdown # Smart Home Unified - 真实 API 集成版本 ## ✅ 更新内容 ### v1.1.0 - 真实 API 集成(2026-03-15) **新增功能:** - ✅ 小米米家真实 API 集成(使用 miio 库) - ✅ Apple HomeKit 真实 API 集成(使用 HAP-NodeJS) - ✅ 设备 token 管理 - ✅ 真实设备控制命令 **改进:** - 移除所有模拟数据 ``` The marketing plan explicitly states: ```markdown - All credentials are encrypted locally ``` However, the CLI returns static simulated devices and contains unimplemented handlers: ```javascript program .command('devices') .description('管理智能设备') .option('-l, --list', '列出所有设备') .option('--platform <platform>', '按平台筛选') .option('--room <room>', '按房间筛选') .option('--info <device>', '查看设备详情') .option('--refresh', '刷新设备状态') .action(async (options) => { if (options.list) { console.log(chalk.blue('📱 加载设备列表...')); // TODO: 实现设备列表 console.log('客厅主灯 - 小米 - 在线'); console.log('空调 - 华为 - 在线'); console.log('窗帘 - HomeKit - 离线'); } }); ``` Scene execution is also a placeholder: ```javascript program .command('scene <action> [name]') .description('执行或管理场景') .action((action, name) => { if (action === 'run' && name) { console.log(chalk.green(`🎬 执行场景:${name}`)); // TODO: 实现场景执行 } }); ``` The testing document identifies the advertised integrations and paid features as future work: ```markdown ## 下一步 1. 实现各平台真实 API 对接 2. 添加场景编辑器 3. 实现 AI 节能算法 4. 开发手机 App ``` Additional inconsistencies include package version `1.0.0`, ClawHub metadata version `1.0.2`, and a README claim for version `1.1.0`. Metadata advertises seven platforms, while the repository contains only two adapters ...[truncated 2276 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove every unsupported claim concerning encryption, platform integrations, mobile applications, AI optimization, energy reporting, voice control, security monitoring, and device capacity. 2. Clearly label all placeholder, simulated, prototype, and future functionality. 3. Do not charge for features until they are implemented, integrated, and independently tested. 4. Replace static CLI device output with adapter-backed results or remove the command. 5. Wire supported adapters into the CLI and implement end-to-end tests against documented test devices or controlled mocks. 6. Implement actual secret encryption or revise the documentation to state clearly that credentials are stored in plaintext. 7. Align versions across `package.json`, `clawhub.json`, README, publication documentation, and release tags. 8. Publish a precise support matrix listing implemented platforms, device models, commands, known limitations, and testing status. 9. Remove the deceptive marketing templates that portray promotional content as independent user reviews or claim unverified energy savings. 10. Conduct a security and functionality review before publication and correct existing marketplace listings or notify affected users. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (37)

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The marketing copy explicitly reassures users that credentials are encrypted locally while promoting integration across multiple platforms, but it does not explain what credentials are collected, how they are handled, or what telemetry may accompany use of the product. In a smart-home context, platform credentials can grant broad access to devices, routines, and occupancy-related data, so omission of clear privacy and data-handling disclosures can mislead users into sharing sensitive access without informed consent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The tracking plan documents use of ClawHub backend data, Google Analytics, coupon tracking, and user feedback collection, but nowhere indicates that users will be informed or given consent choices regarding telemetry and monitoring. Because this product manages smart-home usage, analytics can reveal behavior patterns, device ownership, and occupancy habits, making undisclosed tracking a meaningful privacy risk.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The document advertises AI analysis of household electricity habits and automatic shutdown/control of devices without warning users that this requires behavior profiling and may trigger system-impacting automation. In a smart-home environment, such automation can affect HVAC, heating, and other essential devices, creating privacy concerns and potential safety or availability issues if actions are wrong or unexpected.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The report promotes security monitoring features such as door/window sensors, camera anomaly detection, and gas/water leak alerts without any visible warning about what data is collected, how long it is retained, who can access it, or the consequences of false positives and remote notifications. In a smart-home context, these capabilities can expose highly sensitive occupancy and household-behavior data, so omitting privacy and operational warnings is a real user-safety and privacy issue.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The document instructs users to authenticate with an API token on the command line but does not warn that passing secrets as CLI arguments can expose them through shell history, process listings, logs, or CI output. In a quick-start guide for publishing a skill, this omission increases the chance that users mishandle credentials during routine deployment.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The skill documentation is written entirely in Chinese, including headings, instructions, and safety guidance, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, mandating a specific language without opt-in or justification is a natural-language policy violation.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The documentation explicitly instructs users to place highly sensitive credentials such as Xiaomi account usernames/passwords, device tokens, HomeKit PINs, and optionally Apple ID credentials into TOOLS.md, which is typically a plaintext documentation/configuration file. Storing these secrets in an easily readable file materially increases the risk of credential theft, accidental commit to version control, lateral access to smart home devices, and possible compromise of linked cloud accounts.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document instructs users to authenticate with an API token via a shell command but does not warn that embedding secrets directly in command lines can expose them through shell history, process listings, screenshots, logs, or shared terminals. Because this is a publishing/authentication workflow, users are likely to copy-paste the example verbatim, increasing the chance of credential leakage and subsequent account compromise.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The document includes a command that executes a home-automation scene ("scene run \"回家模式\"") and shows successful state changes to physical devices without any safety warning, confirmation step, or indication that this affects real hardware. In a smart-home context, triggering lights, HVAC, or curtains can have real-world consequences, especially if copied into a live environment by a user who assumes it is a harmless test.

Natural-Language Policy Violations

Medium
Confidence
81% confidence
Finding
The manifest description is entirely in Chinese and provides no indication that users can choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The package description is written entirely in Chinese and presents the skill in a single language with no indication that other languages or locales are supported. Under the policy for natural-language violations, forcing a specific language without user opt-in is in scope.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The header comment states this is a HomeKit platform adapter with real API integration, but the core behavior does not perform actual device discovery, state reads, or characteristic writes. The documented intent is contradicted by comments and code in the implementation, especially where control and status functions explicitly say they are simplified placeholders.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This JavaScript file contains comments, errors, and console messages entirely in Chinese, including operational guidance and failure messages. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the skill is clearly documented as region-specific, which is not shown here.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The docstring and log messages present connect() as successfully connecting to HomeKit and discovering accessories, yet the method only validates that a PIN exists and then prints success messages. No code uses hap-nodejs APIs to pair, connect, or populate this.accessories, so the stated behavior is contradicted by the implementation.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The public control() method is documented and structured as if it performs real device actions such as turnOn and setBrightness. However, _setCharacteristic() explicitly notes that it is a simplified implementation and only logs the requested change before returning success, which contradicts the apparent intent of real control.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This JavaScript file contains natural-language comments and console messages entirely in Chinese, including setup guidance and runtime status output. Because the file does not indicate that the skill is intentionally China/Chinese-only or provide any language opt-in, it violates the language/locale policy for natural-language content.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The docstring and log messages describe account login ("登录小米账号" / "小米账号登录成功"), which implies authenticating with Xiaomi cloud credentials. However, the code only checks that username and password are present, then calls `miio.device({ address, token })` to connect to a local device and does not use `this.username` or `this.password` in any authentication flow.

Natural-Language Policy Violations

Low
Confidence
74% confidence
Finding
The report content is predominantly in Chinese while also targeting international channels and users, but it does not indicate that users can choose their preferred language or locale. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy issue.

Natural-Language Policy Violations

Low
Confidence
80% confidence
Finding
The skill guidance is presented entirely in Chinese, including headings and operational instructions, with no indication that this language choice is optional, user-selected, or intended for a specific locale. The policy requires flagging language or locale constraints when a specific language is effectively forced without opt-in or justification.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
All headings, instructions, and warnings are presented in Chinese, and the document does not provide an alternative language option or state that the skill is intended only for a Chinese-speaking region. This can violate language/locale policy when users are not given an opt-in or locale-specific justification.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The user-facing description string forces a specific language/locale in natural-language output. Under the policy, locale constraints should either offer user choice or be clearly documented as intentionally region-specific; this file does neither.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"author": "lvjunjie-byte",
  "license": "MIT-0",
  "dependencies": {
    "commander": "^11.0.0",
    "axios": "^1.6.0",
    "chalk": "^5.3.0",
    "ora": "^7.0.0",
Confidence
82% confidence
Finding
Using caret ranges for dependencies allows newer releases to be installed without explicit review, which weakens build reproducibility and can unexpectedly introduce vulnerable or malicious upstream versions. In a CLI that controls smart-home and IoT devices, dependency compromise could affect local credentials, device control flows, or network requests.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"license": "MIT-0",
  "dependencies": {
    "commander": "^11.0.0",
    "axios": "^1.6.0",
    "chalk": "^5.3.0",
    "ora": "^7.0.0",
    "inquirer": "^9.2.0",
Confidence
90% confidence
Finding
The unpinned axios dependency permits semver-compatible updates to be resolved at install time, reducing supply-chain integrity and making it harder to verify whether a safe version is actually installed. Because axios is commonly used for outbound HTTP requests, compromise or regression here could affect authentication material, API traffic, or remote command flows.

Unverifiable Dependency: axios has 16 known advisory(ies) (CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding
The manifest references axios with a non-exact version while the package family has multiple known advisories, making it impossible to verify from this file whether a vulnerable release will be installed. Given axios' central role in HTTP communication, an affected version could expose requests, credentials, or enable SSRF-like behavior depending on usage in the CLI.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dependencies": {
    "commander": "^11.0.0",
    "axios": "^1.6.0",
    "chalk": "^5.3.0",
    "ora": "^7.0.0",
    "inquirer": "^9.2.0",
    "yaml": "^2.3.0",
Confidence
88% confidence
Finding
An unpinned chalk dependency introduces unnecessary supply-chain risk because future package resolution may pull in different code than was originally tested. While chalk is typically low-privilege formatting code, the npm execution and import model means a malicious package version could still execute in the CLI context.

Static analysis

No suspicious patterns detected.