T09 · Insecure Skill Coding Practices
- Location
SKILL.md:76- Finding
Automatic Execution of an Untrusted Repository-Controlled Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 76–80
Vulnerability Type: Untrusted local script execution
Risk Level: HighVulnerable Code Snippet
markdown When you *reject* scope or a dependency, say so explicitly in one line ("skipped X: YAGNI / stdlib covers it") so the human can veto, and log it: `node scripts/log-rejection.js "<step>" "<item>" ["<replaced with>"] [--loc <estimate>]` (run from the repo root; skip silently if the script isn't present). Add `--loc` only when you can reasonably size the rejected approachTechnical Analysis
The Skill directs the agent to run
scripts/log-rejection.jsfrom the repository root whenever it rejects scope or a dependency. That script is not included in the audited Skill package, so its content and integrity are outside the Skill's control. A target repository can create a file at that path containing arbitrary JavaScript.Invoking the script through Node.js executes it with the agent process's effective privileges. Although the shown parameters are quoted, which reduces direct shell argument-injection risk, quoting does not protect against malicious code already present inside
scripts/log-rejection.js.The instruction to “skip silently if the script isn't present” also encourages execution without explicit disclosure or approval. Running repository-controlled executable code is unnecessary for the Skill's stated code-minimization purpose and creates a trust-boundary violation.
Attack Path
- An attacker creates or modifies
scripts/log-rejection.jsin a repository that a victim will ask the agent to edit. - The script contains malicious JavaScript, such as logic that reads accessible files, modifies source code, extracts environment variables, or initiates network requests.
- The victim activates or uses the Minimalist Skill for a coding task in that repository.
- During the task, the agent rejects a proposed dependency or scope item under the Skill's subtract ...[truncated 928 chars]
- An attacker creates or modifies
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to execute
scripts/log-rejection.jsautomatically. - Report rejected scope or dependencies through ordinary response text rather than executable repository hooks.
- If durable logging is required, use a trusted platform-provided logging mechanism that does not execute repository-controlled code.
- If repository script execution is indispensable:
- Clearly disclose the proposed command to the user.
- Require explicit approval immediately before execution.
- Inspect the entire script and its imports before running it.
- Verify that the file is trusted and has not changed between review and execution.
- Run it in a sandbox with minimal filesystem, process, environment, and network access.
- Avoid exposing secrets or credentials to the subprocess.
- Replace “skip silently” with transparent behavior so users are informed whether any executable hook was found or considered.
- Remove the instruction to execute
