T09 · Insecure Skill Coding Practices
- Location
rstack-content/SKILL.md:289- Finding
Shell Command Injection Through Unvalidated Ask-Inbox Email
- Content
View full analysis
- Remediation
View remediation
/tmp/rstack_ask_payload.json <<'PY' import json import sys from decimal import Decimal, InvalidOperation email = sys.argv[1] try: price = Decimal(sys.argv[2]) except InvalidOperation: raise SystemExit("Invalid price") if price < Decimal("0.50"): raise SystemExit("Price must be at least 0.50 USDC") print(json.dumps({ "ask_email": email, "ask_price_usdc": float(price), })) PY curl --fail-with-body -X PUT \ "https://resolved.sh/listing/$RESOLVED_SH_RESOURCE_ID/ask" \ -H "Authorization: Bearer $RESOLVED_SH_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @/tmp/rstack_ask_payload.json ``` 5. Prefer passing user-controlled values as program arguments or environment values rather than embedding them in generated shell source. 6. Apply the same safe serialization pattern to titles, descriptions, Markdown content, slugs, URLs, and other user-derived fields throughout the suite. ]]>
