T09 · Insecure Skill Coding Practices
- Location
scripts/release_notes.py:450- Finding
Untrusted commit messages are exposed to the Agent without prompt-injection defenses
- Content
View full analysis
= 7 else sha, "url": base_url + sha, "message": msg.strip(), "first_line": first_line, "body": body, "type": t, "date": _commit_date(c), }) ``` The corresponding Skill workflow instructs the Agent to parse and summarize these fields: ```markdown 3. **Read JSON**: Parse JSON from stdout. 4. **Generate final release note**: - Classify, summarize, and polish JSON `commits`. ``` ### Technical Analysis Commit messages and bodies are externally sourced, repository-controlled data. A contributor who can introduce a commit can place natural-language instructions in these fields. The implementation preserves the complete commit message and body and emits them into JSON for subsequent processing by the Agent. Neither the script nor the Skill instructions establish a clear trust boundary stating that repository content is data only and must never be treated as instructions. There is also no normalization of control characters, explicit field-length limit for the complete message or body, or defensive instruction requiring the Agent to ignore commands embedded in commit content. This creates an indirect prompt-injection channel. Although the use of JSON provides structural separation, JSON encoding alone does not prevent a language model from interpreting text inside a value as an instruction. ### Attack Path ...[truncated 1880 chars]- Remediation
View remediation
