T09 · Insecure Skill Coding Practices
- Location
scripts/install.sh:40- Finding
Persistent Shell Command Injection Through macOS Installer Parameters
- Content
View full analysis
- Remediation
View remediation
65535 )); then echo "ERROR: OC_PORT must be an integer from 1 to 65535." >&2 exit 1 fi ``` - Validate `TELEGRAM_ID` against the exact format supported by the Telegram integration, such as an optional signed numeric identifier if that is the required format. - Do not generate executable shell source by performing text replacement with untrusted values. - Prefer passing validated settings as launchd environment variables and reading them at runtime. - If source generation is unavoidable, serialize values with context-appropriate Bash escaping, such as `printf '%q'`, rather than using raw `sed` replacement. - Add installation tests using quotes, backslashes, delimiters, newlines, and shell metacharacters to verify that malformed input is rejected. ]]>
