T01 · Skill Instruction Hijacking
- Location
workflow.json:46- Finding
Untrusted pull-request content is processed as Agent instructions without isolation
- Content
View full analysis
--repo --json title,body,files,additions,deletions,author,state", "gh pr diff --repo > pr-diff.txt", "gh api repos///commits?per_page=5 --jq '.[].sha'", "gh workflow list --repo " ], "output": { "pr_title": "PR 标题", "pr_description": "PR 描述", "changed_files": "变更文件列表", "lines_added": "新增行数", "lines_deleted": "删除行数", "author": "作者", "current_ci_status": "当前 CI 状态" } }, { "stage_2": { "name": "AI 代码审查", "skill": "quack-code-review", "actions": [ "读取 pr-diff.txt 内容", "分析代码变更,检测 bug/安全/逻辑问题", "输出结构化审查报告" ], ``` The same unsafe processing model is documented in `SKILL.md:40-64`, where pull-request metadata and diffs are collected and then submitted for AI analysis. ### Technical Analysis Pull-request titles, descriptions, filenames, and diffs can be controlled by an untrusted contributor. The workflow retrieves these values and instructs the AI review stage to read the resulting diff without defining a trust boundary or directing the Agent to ignore instructions embedded in repository content. Consequently, prompt-like text placed in a pull-request description, source file, comment, string literal, filename, or diff could be interpreted as an instruction rather than as data under review. For example, malicious content could direct the reviewer to suppress findings, produce attacker-selected workflow definitions, disclose contextual information, or request unintended tool operations. The risk extends into the subsequent workflow-generation stage. If manipulated review output is treated as trusted input, it can influence generated GitHub Actions files or content posted to a pull request. # ...[truncated 1453 chars]- Remediation
View remediation
