T09 · Insecure Skill Coding Practices
- Location
SKILL.md:61- Finding
Unvalidated Execution of a Mutable Generated Shell Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 61–64 and execution points at lines 130, 190, and 252
Vulnerability Type: Unvalidated shell-script generation and execution
Risk Level: HighVulnerable Code
text STEP 2 — Create init.sh: A script that starts the development server and runs a basic end-to-end smoke test (e.g., verify the server starts, the app loads, and one core interaction completes). Make it runnable: chmod +x init.shLater workflows direct the agent to execute that mutable script:
text 4. Run `init.sh` to start the dev server and confirm there is no broken build. If it IS broken, fix the regression before starting new work.The same execution instruction appears in the
jumpsession,jumploop, andjumpfreeworkflows.Technical Analysis
The initialization workflow directs an agent to generate an executable shell script based on project context. Subsequent sessions must execute that script without first inspecting its contents, verifying its provenance, checking a trusted hash, or obtaining approval after changes.
Because project files can influence generation and repository contributors can subsequently modify
init.sh, this creates an arbitrary-command execution boundary. A malicious repository, compromised contributor, or attacker-controlled design document could cause the generated script to contain commands unrelated to smoke testing. The instructions provide no sandboxing, command allowlist, network restriction, integrity verification, or least-privilege requirement.The project currently contains no malicious executable payload, so this finding concerns an exploitable workflow weakness rather than confirmed malicious behavior.
Attack Path
- An attacker supplies malicious project or design content that influences generation of
init.sh, or directly modifies an existinginit.sh. - The victim invokes
jumpsession,jumploop, orjumpfree. - The skill instructs the age ...[truncated 902 chars]
- An attacker supplies malicious project or design content that influences generation of
- Remediation
View remediation
Remediation Suggestions
- Generate
init.shfrom a restrictive, reviewed template rather than unrestricted project prose. - Display and inspect the complete script before its first execution.
- Require explicit approval before executing a newly created script or one whose content hash has changed.
- Validate the script against an allowlist of expected commands and reject command substitution, encoded payloads, unexpected interpreters, privilege changes, destructive filesystem operations, and unapproved network access.
- Execute smoke tests in an isolated container or sandbox with minimal filesystem access, no production credentials, and restricted networking.
- Run the script as an unprivileged account and enforce time, process, memory, and filesystem limits.
- Record and verify a trusted hash after review so subsequent sessions can detect modifications.
- Prefer a declarative task runner with explicitly enumerated commands over executing a mutable repository shell script.
- Generate
