T09 · Insecure Skill Coding Practices
- Location
SKILL.md:30- Finding
Command Injection Through Unsafe User-Controlled URL Parameter Interpolation
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 ;; esac curl --fail --silent --show-error --get \ "https://www.cheapshark.com/api/1.0/games" \ --data-urlencode "id=${GAME_ID}" | jq '{ cheapest: .cheapestPriceEver.price, current: .deals | map({store: .storeID, price: .price}) }' ``` Additionally: 1. Explicitly instruct the agent never to perform textual substitution of user input into executable shell source. 2. Use process argument arrays instead of a shell when the host implementation supports them. 3. Apply allowlist validation to identifiers and reasonable length limits to game titles. 4. Retain `curl --fail --silent --show-error` so HTTP failures are visible without exposing unnecessary output. 5. Run the Skill with least privilege and restrict filesystem, credential, and network access to reduce the impact of any command-execution flaw. ]]>
