T09 · Insecure Skill Coding Practices
- Location
SKILL.md:33- Finding
Untrusted GitHub Issue Content Is Delegated to a Code-Modifying Sub-Agent
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 33-59
Vulnerability Type: Indirect prompt injection through untrusted Issue content
Risk Level: HighVulnerable Code Snippet
bash gh issue list --state open --json number,title,body,labelsThe workflow subsequently instructs the agent to pass all Issue descriptions and the project context to one sub-agent so that it can plan and implement the changes. Faithful English translation of the relevant instruction at line 58:
text Pass all Issue descriptions and the project context to one sub-agent, allowing it to plan the work as a whole and make the changes uniformly.Technical Analysis
GitHub Issue titles and bodies are externally controlled input. Any GitHub user who can create or modify an Issue may place agent instructions, deceptive remediation steps, encoded content, or requests to alter unrelated files in the Issue body.
The workflow retrieves the complete
bodyfield for every open Issue and explicitly delegates all Issue descriptions together with repository context to a sub-agent authorized to modify code. It does not establish a trust boundary between Issue content and agent instructions. In particular, it does not:- Require the sub-agent to treat Issue content exclusively as untrusted data.
- Prohibit following tool-use or behavioral instructions embedded in an Issue.
- Restrict changes to an approved set of files.
- Limit the repository context exposed to the sub-agent.
- Require human review of the generated diff before commit or push.
- Detect prompt-injection patterns or unrelated requested changes.
An adversarial Issue can therefore attempt indirect prompt injection. If the sub-agent interprets the Issue body as authoritative instructions rather than problem data, it may introduce attacker-selected changes. The later automated commit, push, PR, merge, and deployment stages increase the likelihood that such ...[truncated 1932 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat every Issue title, body, comment, attachment, and linked document as untrusted data.
- Add an explicit instruction that the sub-agent must never follow commands, role changes, tool requests, or policy statements contained in Issue content.
- Place Issue content inside clearly delimited data blocks and state that the delimiters contain problem descriptions only, not executable agent instructions.
- Do not delegate all open Issues automatically. Select and approve specific Issues before providing them to a sub-agent.
- Apply least privilege to the sub-agent:
- Provide only files required for the approved Issue.
- Deny access to credentials and unrelated repository content.
- Prevent direct push, merge, and deployment operations.
- Restrict shell and network access unless demonstrably required.
- Require the agent to produce a proposed plan and file allowlist before making changes.
- Reject modifications outside the approved file allowlist unless a human explicitly expands the scope.
- Scan Issue content for prompt-injection indicators and flag suspicious Issues for manual processing. Detection should be supplementary and not replace isolation.
- Require human review of the complete diff, test changes, workflow changes, and generated commits before push or merge.
- Separate issue analysis, code modification, repository publication, and deployment into distinct approval-gated stages.
