T09 · Insecure Skill Coding Practices
Warning
- Location
scripts/summarize.sh:47- Finding
Unescaped Repository-Controlled Data in JSON and Terminal Output
- Content
View full analysis
- Remediation
View remediation
&2; exit 1 ;; esac ``` 4. Sanitize terminal-oriented output by removing or visibly encoding non-printable control characters before printing repository-controlled author names or commit subjects. 5. Use `printf '%s\n'` instead of `echo` for untrusted values to avoid implementation-dependent handling of escape-like input. 6. Add regression tests covering commit subjects, author names, and arguments containing: - Double quotes - Backslashes - The `|` delimiter - Tabs and control characters - JSON-like fragments - Unicode characters 7. Verify generated JSON with a strict parser as part of automated testing. ]]>
