T09 · Insecure Skill Coding Practices
- Location
.specify/scripts/bash/common.sh:126- Finding
Arbitrary Command Execution Through Unsafe Evaluation of SPECIFY_FEATURE
- Content
View full analysis
- Remediation
View remediation
&2 return 1 fi fi ``` 4. Validate actual Git branch names and all path-derived identifiers as defense in depth. Reject control characters, quotes, whitespace, path separators, and shell metacharacters. 5. If values must be transferred between processes, use a non-executable representation such as JSON and parse it with a dedicated parser. Do not pass parser output into `eval`. 6. Update all three sinks—`check-prerequisites.sh`, `setup-plan.sh`, and `update-agent-context.sh`—because fixing only one caller leaves the other normal workflow paths exploitable. 7. Add regression tests using feature values containing single quotes, command substitutions, semicolons, newlines, spaces, and path traversal sequences. Tests should verify rejection and confirm that no side-effect command is executed. ]]>
