T09 · Insecure Skill Coding Practices
- Location
SKILL.md:35- Finding
Unreviewed Execution of Project-Controlled Link-Checking Scripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10 and 35
Vulnerability Type: Unsafe execution of untrusted repository scripts
Risk Level: HighVulnerable Code
yaml allowed-tools: Read, Grep, Bash, Glob, mcp__solograph__kb_searchmarkdown - If a link-checking script exists in the project (e.g., `scripts/check_links.py`), run it as wellTechnical Analysis
The skill instructs the agent to execute a link-checking script supplied by the project being audited. It does not require the script to be inspected, verified, sandboxed, or explicitly approved by the user before execution. Because the skill also grants access to
Bash, a repository-controlled script can execute arbitrary operating-system commands with the permissions available to the agent process.The advertised knowledge-base audit can be performed through read-only operations such as
Read,Grep, andGlob. Executing arbitrary project code is therefore unnecessary and violates least-privilege principles. The risk applies even if the script is named like a legitimate link checker, because its filename does not constrain its actual behavior.Attack Path
- An attacker creates or modifies a knowledge-base repository.
- The attacker places malicious code in a plausible file such as
scripts/check_links.py. - The victim requests a knowledge-base audit using this skill.
- The skill discovers the purported link-checking script and directs the agent to run it through
Bash. - The malicious script executes with the agent process's local permissions.
- Depending on the environment's access controls, the script can read accessible secrets, modify project or user files, invoke installed tools, contact external systems, or establish additional execution mechanisms.
Impact Assessment
Successful exploitation provides arbitrary command execution within the privilege scope of the agent process. Potential consequences include:
- Reading credentials, ...[truncated 608 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to execute repository-provided link-checking scripts automatically.
- Implement internal-link validation using read-only operations such as
Read,Grep, andGlob. - Remove
Bashfromallowed-toolsif no remaining audit operation requires shell execution. - If execution is genuinely necessary, first display the exact script path and request explicit informed user approval.
- Inspect the entire script and any imported local modules before execution; do not rely on its filename or location as evidence of safety.
- Run approved scripts in a sandbox with:
- Read-only access to the audited repository.
- No access to user credentials or unrelated filesystem paths.
- Network access disabled by default.
- Resource and execution-time limits.
- A disposable working directory.
- Prefer a trusted, bundled link parser with a pinned and reviewed implementation rather than executing code supplied by the target repository.
