T09 · Insecure Skill Coding Practices
- Location
SKILL.md:151- Finding
Shell Command Injection Through Unescaped Review Finding Data
- Content
View full analysis
" \ --source review \ --context "Review dimension: . " ``` The `` value should match the review skill that surfaced the finding (e.g. `bug-review`, `api-review`, `architecture-review`). This runs automatically after the action plan is finalised, without prompting the user. ``` ### Technical Analysis The Skill instructs the agent to interpolate finding titles, dimensions, and descriptions into a shell command. These values can be derived from content in the repository under review and therefore may be attacker-controlled. Wrapping a value in double quotes does not neutralize shell metacharacters. Shell command substitutions such as `$(command)` and backtick expressions are still evaluated inside double-quoted strings. If a malicious value is inserted verbatim into either `--title` or `--context`, the shell can execute the embedded command before `deferred_capture.py` receives its arguments. For example, a finding description containing `$(attacker_command)` could produce a command structurally equivalent to: ```bash python3 scripts/deferred_capture.py \ --title "Example finding" \ --source review \ --context "Review dimension: bug-review. $(attacker_command)" ``` The vulnerability is aggravated by the explicit instruction to perform the operation automatically without asking the user for confirmation. Exploitation requires the reviewing agent to reproduce attacker-controlled rep ...[truncated 1740 chars]- Remediation
View remediation
