Back to skill

Security audit

Home Music

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed home music controller, but it contains a real command-injection flaw and broad execution controls that need review before installation.

Install only if you are comfortable reviewing and fixing the script first. At minimum, validate the focus volume as an integer from 0 to 100, pass it to awk via -v, remove or tightly constrain HOME_MUSIC_SCRIPT, and avoid installing the sudo symlink until the command path is hardened.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
home-music.sh:129
Finding

Arbitrary Command Execution Through Unvalidated Focus Volume

Content
View full analysis
Remediation
View remediation
100 )); then echo "Volume must be an integer from 0 to 100" >&2 return 2 fi local vol_float vol_float=$(awk -v value="$vol_pct" \ 'BEGIN { printf "%.2f", value / 100 }') # Remaining scene logic... } ``` Additional hardening measures: 1. Enforce the same 0–100 range in the Python API before invoking the script. 2. Restrict `run_scene()` to known scene names and validate scene-specific arguments. 3. Add tests covering semicolons, quotes, newlines, AWK expressions, negative values, decimals, and values above 100. 4. Preserve argument-array subprocess execution in Python and do not introduce `shell=True`. 5. Treat validation in the shell script as authoritative because it can be invoked independently of the Python wrapper. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill presents itself as a simple music-scene controller, but the documented behavior relies on shelling out to an external script and another dependency skill, which is an undeclared execution path. This mismatch is dangerous because users and reviewers may approve it as harmless media control while it actually gains broader command-execution capability through external scripts.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documentation indicates shell and environment-variable driven behavior but the frontmatter does not declare any tool scope or allowed tools. This weakens reviewability and policy enforcement because an agent may invoke external commands without an explicit permission boundary, increasing the chance of unintended command execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad, natural, and likely to overlap with ordinary conversation or unrelated assistant requests, creating the risk of accidental activation. In a skill that can execute shell-backed actions and control devices, ambiguous triggering can cause unintended command execution and disruptive side effects.

Content

No source excerpt is available for this finding.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
91% confidence
Finding

The trigger 'stop music' is close to a common built-in stop intent and can shadow or conflict with expected assistant behavior. In context, this can cause the wrong command path to fire, unexpectedly invoking the shell-backed skill rather than a safer built-in stop action.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 171)May include surrounding context.

chmod +x ~/clawd/skills/home-music/home-music.sh

Symlink for global access

sudo ln -sf ~/clawd/skills/home-music/home-music.sh /usr/local/bin/home-music

text

Now `home-music` works from anywhere in your terminal! 🎉

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The examples encourage free-form natural-language activation like 'start party mode' and 'stop the music' without clear invocation constraints. That raises the chance that normal user dialogue or another task context triggers the skill unexpectedly, especially because one of the actions maps to broad device/audio control.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The HOME_MUSIC_SCRIPT override allows any caller who can influence the environment to redirect execution to an arbitrary binary or script, not just the intended home-music controller. In an automation context, this turns a music-control wrapper into a generic code-execution primitive, which is broader and more dangerous than the stated skill purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest presents a music-scene control skill, but this Python wrapper's core behavior is to invoke an external shell script through subprocess.run. While calling a helper can be an implementation detail, here the code delegates all behavior to an arbitrary executable path resolution flow, giving the skill a broader process-execution capability than the manifest declares.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · __init__.py (reported line 77)May include surrounding context.

python
return 0

    try:
        result = subprocess.run(cmd, check=False)
        if result.returncode != 0:
            print(f"[home_music] scene '{scene}' exited with code {result.returncode}")
            if raise_on_error: