T09 · Insecure Skill Coding Practices
- Location
cobraclaw.sh:28- Finding
Path Traversal Permits Execution of Scripts Outside the Kata Directory
- Content
View full analysis
- Remediation
View remediation
&2 return 1 ;; esac } ``` Additional hardening measures: 1. Reject empty values, absolute paths, directory separators, and traversal components. 2. If dynamic discovery is required, canonicalize both the `katas` directory and candidate target, then verify that the canonical target is a direct child of the canonical directory. 3. Account for symbolic links when performing containment validation; lexical prefix checks alone are insufficient. 4. Run kata scripts with the minimum required operating-system privileges. 5. Add regression tests covering values such as `../`, `../../outside/payload`, absolute paths, embedded slashes, and symlink-based escapes. ]]>
