T09 · Insecure Skill Coding Practices
- Location
scripts/build_prompt.py:77- Finding
Untrusted User Instructions Are Embedded Directly into the LLM Prompt
- Content
View full analysis
- Remediation
View remediation
` and `` wrappers. - A tool name exactly matching the selected allowlisted tool. - Tool-specific required fields and permitted value types. 5. **Reject unexpected generated content.** Fail closed if parsing fails, additional tool calls appear, the selected tool changes, required fields are missing, or text exists outside the expected JSONL object. 6. **Constrain input size and format.** Apply limits to instruction length, item count, control characters, and delimiter-like content to reduce abuse and resource exhaustion. 7. **Add adversarial tests.** Include instruction values containing phrases such as “ignore previous instructions,” fake section headings, XML-like closing tags, JSON fragments, and synthetic tool calls. Confirm that these remain literal user data and cannot change the output policy. ]]>
