Back to skill

Security audit

xiaodu-wake-up-routine-official

Security checks for vulnerabilities and agentic risk

Overview

The skill is a mostly disclosed Xiaodu wake-up routine, but it stores household preferences in shared memory and can reuse them later to control smart-home devices without enough scoping or consent.

Review this before installing in a real home. It should use skill-scoped preference storage with explicit consent and deletion controls, avoid direct device execution from old preferences without confirmation, remove real household inventory from documentation, and clarify which wake-up actions happen by default versus only when requested.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:98
Finding

Unscoped Persistent Modification of Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:98-110
Vulnerability Type: Persistent storage of user-influenced operational preferences in global agent memory
Risk Level: Medium

Vulnerable Code Snippet

markdown
Storage rules:

- For short- and medium-term XiaoDu or household-scenario preferences, preferentially write them to `XIAODU_CONTEXT.md`.
- Write long-term stable preferences to `MEMORY.md`.
- If no file was actually written, do not claim that the preference has been remembered.

Reuse rules:

- Before the next execution, check whether existing preferences can directly resolve device or content selection.
- If an existing preference is sufficiently clear, execute directly without asking again.
- If an existing preference conflicts with the current environment or request, prioritize the current request and update the preference after execution.

Technical Analysis

The Skill instructs the agent to persist household-control preferences in MEMORY.md, which appears to be generic long-term agent memory rather than storage scoped exclusively to this Skill. The persisted values can affect future device selection, room selection, confirmation behavior, environmental controls, and media actions.

The instructions do not define:

  • An approved or Skill-scoped storage path
  • A strict preference schema or value allowlist
  • Provenance identifying which user supplied a preference
  • Authorization checks for shared household environments
  • Explicit consent before long-term persistence
  • Expiration, retention, or revocation rules
  • Validation against the current device inventory before reuse

Because conversational input can influence the saved preferences, attacker-controlled or mistaken instructions may become persistent behavioral rules. The instruction to execute directly when a stored preference is clear further increases the risk by allowing subsequent physical-device actions without ...[truncated 1427 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace generic MEMORY.md writes with a Skill-scoped state file, such as .state/xiaodu-wake-up/preferences.json.
  2. Define a strict schema containing only approved fields, enumerated values, timestamps, provenance, and expiration metadata.
  3. Require explicit user consent before persisting any preference beyond the current session.
  4. Bind preferences to the appropriate authorized user or household identity rather than sharing them globally.
  5. Validate every stored device and room preference against freshly discovered inventory before use.
  6. Require confirmation before applying preferences that alter physical devices, target a different room, or suppress safety confirmations.
  7. Prevent stored text from being interpreted as executable instructions; persistence should contain structured data only.
  8. Provide commands to inspect, update, and delete stored preferences.
  9. Apply retention limits and automatically remove stale preferences.
  10. Do not expose Skill-specific preferences through memory files consumed by unrelated Skills.

T09 · Insecure Skill Coding Practices

Note
Location
references/usage-notes.md:193
Finding

Environment-Specific Household Inventory Embedded in Distributable Documentation

Content
View full analysis

Vulnerability Details

File Location: references/usage-notes.md:193-218
Vulnerability Type: Plaintext exposure of household device inventory and room associations
Risk Level: Low

Vulnerable Code Snippet

markdown
## Device Conditions in the Current Environment

According to the XiaoDu device and IoT lists read from the current workspace environment:

- Current smart displays:
  - XiaoDu Smart Display 2
  - XiaoDu Smart Display 3
  - XiaoDu Tiantian Companion Pro 4K Max
- Current IoT devices:
  - Spotlight (default room; connectivity may change and should be refreshed before execution)
  - Temperature and humidity sensor (default room)
  - Mitsubishi Electric air conditioner (living room)
  - Sharp television (default room)
  - Body-fat scale (living room)
- Current scenes: none

This means that, in the current environment, the wake-up Skill should favor:
structured wake-up planning, smart-display-first reminders, and conservative IoT execution.

### Practical Routing Recommendations for the Current Environment

- There is currently no wake-up scene, so scene-first execution will quickly fall through.
- No curtain device is currently confirmed.
- The Mitsubishi Electric air conditioner is in the living room and should not be treated as a child's bedroom wake-up device by default.

Technical Analysis

The documentation records environment-specific device names, device types, room associations, and scene availability. This information is unnecessary as static package content because the Skill already requires runtime device discovery.

When the project is distributed, archived, uploaded for review, or shared with another user, this inventory is distributed with it. The information reveals aspects of household topology and connected-device ownership. It can also become stale while continuing to influence planning decisions in environments where those devices or room assignments n ...[truncated 1592 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove real environment inventory and room assignments from distributable documentation.
  2. Replace them with clearly identified fictional examples using generic names such as Bedroom Display A and Example Living-Room Air Conditioner.
  3. Derive all operational device inventory through runtime discovery.
  4. Do not use static documentation as a source of truth for device availability, connectivity, or room placement.
  5. If diagnostic snapshots are necessary, store them outside the Skill package in access-controlled, environment-local state.
  6. Add inventory snapshots and generated diagnostic files to ignore and packaging-exclusion rules.
  7. Apply data minimization by retaining only capability classes needed for planning, rather than device brands or exact model names.
  8. Validate runtime selections against current device discovery before issuing any physical-device command.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The top-level description maps very common phrases like '叫孩子起床' and '开始早安模式' directly to device orchestration. Because these phrases are natural everyday requests and the skill performs real smart-home actions, the trigger scope is broad enough to cause accidental invocation or routing when the user may only be speaking conversationally. In a home automation context involving children and bedroom devices, mistaken activation can create unwanted disturbance or unintended device control.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description and all example trigger phrases are exclusively in Chinese, and the skill is framed around fixed Chinese voice commands without any opt-in or language selection. This can constitute a language/locale policy violation when the skill mandates a specific language rather than offering user choice.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The 'strong trigger' list contains broad phrases without boundary conditions, exclusions, or examples of when not to invoke the skill. Since the skill can trigger scenes, lights, curtains, speech, and media, ambiguous matching increases the chance of over-triggering and controlling the wrong room or starting an unwanted morning routine. The built-in 'conservative IoT' bias helps somewhat, but it does not fully mitigate ambiguous intent capture at routing time.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file presents the skill behavior and user utterances entirely in Chinese, and there is no natural-language indication that the user can choose another language or that the skill is intentionally restricted to a Chinese-language context. Under the policy rule, forcing a specific language without opt-in can be a locale/language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The test cases expand the skill from a wake-up scene orchestrator into a broader agent that issues additional requests for time, weather, reminders, and media playback. This creates scope creep beyond the declared functionality and can cause the agent to invoke capabilities or downstream skills the user did not clearly authorize under the original skill contract, increasing the risk of unintended actions and misleading behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

These cases instruct the skill to send extra requests for weather or music when the user asks, even though the skill is described as reusing an existing wake-up control script rather than brokering additional service calls. That mismatch can lead to unauthorized cross-skill/tool invocation, ambiguous consent boundaries, and overbroad behavior relative to what integrators and users expect from this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all operational guidance exclusively in Chinese, including user-facing phrasing and routing instructions. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified or alternatives are offered.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The usage notes broaden a wake-up orchestration skill into additional memo/reminder, weather, time, news, and music flows that are not clearly bounded by the stated skill scope. In an agentic system, this kind of scope expansion can cause the agent to take actions or surface content the user did not explicitly request, increasing the risk of unintended behavior and privilege creep through the dependency skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The guidance is internally inconsistent: one section says certain queries should remain screen-first and avoid unnecessary IoT expansion, while earlier rules push environment adjustment before weather or music responses. Conflicting instructions in orchestration logic are dangerous because they can make the agent choose broader physical-device actions than the user intended, especially in a child wake-up context involving household devices.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Manifest 主要描述的是儿童起床场景下的 scene-first 晨起编排,通常可合理涵盖灯光、窗帘、智能屏播报等直接晨起动作。测试用例 11 进一步把用户对闷热的反馈映射为空调/风扇调节,这是额外的舒适度控制逻辑,当前描述中没有体现。

Content

No source excerpt is available for this finding.