T09 · Insecure Skill Coding Practices
- Location
references/prompts.md:9- Finding
Untrusted Idea Content Is Interpolated into Agent Prompts Without Injection Boundaries
- Content
View full analysis
- Remediation
View remediation
{idea_card} ``` 3. Apply the same controls to every interpolated field that may contain user-derived content, particularly `{related_ideas_summary}` and externally maintained `stimuli.md` entries. 4. Enforce an operation allowlist: - Limit each action to documented transformations and project-relative files. - Reject requests originating in card content to access unrelated paths, networks, credentials, memory stores, shells, or external tools. - Require explicit user confirmation before any operation outside the initialized project structure. 5. Validate generated output before writing it: - Confirm that destination paths remain inside the project directory. - Reject absolute paths and traversal sequences such as `../`. - Validate structured JSON, YAML, and Markdown fields against expected schemas. - Prevent generated content from changing configuration keys that are outside the current operation. 6. Add prompt-injection regression tests using cards that contain role overrides, requests to ignore previous instructions, tool invocation requests, data-exfiltration instructions, and forged prompt delimiters. Verify that such text is analyzed as inert idea content and never executed. ]]>
