Back to skill

Security audit

Xiaomi

Security checks for vulnerabilities and agentic risk

Overview

The skill is for legitimate Xiaomi device control, but it under-discloses sensitive token handling and direct physical-device actuation risks.

Review before installing. Only use this with devices you control, keep Xiaomi tokens out of shared repositories and agent-visible documents, prefer a protected local secret store, and require explicit confirmation before commands that turn appliances on or alter operating modes. Treat any copied token as a credential that may need rotation if exposed.

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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:4
Finding

Unpinned Third-Party Dependencies Enable Supply-Chain Risk

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:25
Finding

Device-Control Tokens Are Stored in Plaintext and Exposed Through Command-Line Arguments

Content
View full analysis
--token raw_command set_properties '[{"siid": 2, "piid": 1, "value": true}]'` | | "Turn off water heater" | Smart Plug | Power OFF | `miiocli miotdevice --ip --token raw_command set_properties '[{"siid": 2, "piid": 1, "value": false}]'` | | "Humidifier to max" | Humidifier | Set Mode | `miiocli miotdevice --ip --token set_property_by 2 5 3` | | "Is rice cooked?" | Rice Cooker | Check Status | `miiocli cooker --ip --token status` | ``` ### Technical Analysis Xiaomi device tokens are authentication secrets that authorize local control of the associated devices. The Skill recommends storing device details, including tokens, in Markdown files under the project or Skill workspace. Markdown files do not provide secret-specific access controls and may be included in version control, backups, workspace indexing, diagnostic bundles, or Agent context. The example workflows also pass tokens through the `--token` command-line argument. Depending on the operating system and execution environment, command-line arguments may be observable through process inspection, command history, audit logs, debugging output, task telemetry, or Agent transcripts. This han ...[truncated 2353 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs users to run a bundled token-extraction script to retrieve Xiaomi device IPs and 32-byte tokens, but it does not warn that these are sensitive credentials that enable direct control of devices on the LAN. Exposing or mishandling those tokens can let anyone with access to them issue commands to physical devices, expanding risk beyond ordinary account metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language examples map simple user phrases directly to miiocli commands that change real device state, including powering appliances on and off, without warning that these actions affect physical equipment. In a home-automation context, omitted safety guidance increases the chance of unintended actuation of devices such as heaters, humidifiers, or cookers, which can create property damage or safety issues.

Content

No source excerpt is available for this finding.