T09 · Insecure Skill Coding Practices
- Location
templates/reflection_prompt.md:19- Finding
Untrusted Source Content Is Embedded into Tool-Capable Agent Prompts Without Isolation
- Content
View full analysis
- Remediation
View remediation
{current_chunk_text} ``` 3. Apply the same handling to all attacker-influenced fields, including: - Source title and filename. - Reading lens. - Chunk metadata. - Prior reflections and annotations. - Optional reader-context files. 4. Enforce least privilege for spawned agents: - Restrict writes to the active session directory. - Restrict reads to the source file, skill files, and active session. - Disable network access unless explicitly required. - Do not expose credentials or unrelated workspace memory. 5. Add prompt-injection regression tests using documents containing requests to invoke tools, reveal files, alter roles, or ignore prior instructions. Confirm that such content is quoted and analyzed rather than executed. 6. Consider parsing and passing the source through a dedicated data-only interface or constrained worker instead of concatenating it into a general-purpose tool-capable agent prompt. ]]>
