T09 · Insecure Skill Coding Practices
- Location
SKILL.md:25- Finding
Untrusted Material Is Interpolated into a System-Level Prompt
- Content
View full analysis
- Remediation
View remediation
...`. 3. Add a high-priority instruction stating that content inside those boundaries is untrusted data and that any directives within it must not be followed. 4. Use structured message APIs instead of concatenating trusted instructions and untrusted content into one string. 5. Validate the generated response before returning or saving it, including required headings, maximum length, and prohibited content. 6. Treat generated filenames and output directories as untrusted inputs at implementation time; canonicalize paths and enforce that writes remain inside an approved directory. 7. If the downstream model has tools, memory, or sensitive context, disable those capabilities for this transformation or expose only the minimum capabilities required. ]]>
