T09 · Insecure Skill Coding Practices
- Location
scripts/scan.sh:40- Finding
Unescaped Attacker-Controlled Data in JSON and Terminal Output
- Content
View full analysis
- Remediation
View remediation
/dev/null 2>&1 <<<"$analyze"; then echo "Error: invalid analysis response" >&2 exit 1 fi ``` Apply equivalent validation to `copycat`. 3. Validate input according to supported formats. Permit only expected token-symbol characters or recognized EVM/Solana address formats, and impose a reasonable maximum length. 4. Remove non-printable control characters before displaying user-controlled or remote text. Alternatively, render such characters in an escaped representation rather than sending them directly to a terminal. 5. Validate response field types and ranges. In particular, require `risk_score` and `similarity` to be numeric and constrain risk scores to the documented range before numeric comparisons. 6. Use explicit `curl` failure handling, timeouts, and HTTPS-only behavior, such as `--fail --show-error --max-time`, and terminate safely if an API request or response validation fails. ]]>
