T01 · Skill Instruction Hijacking
Error
- Location
- src/task-injection.js:120
- Finding
- Default-On Injection of Broad, Environment-Specific Agent Instructions<![CDATA[ ## Vulnerability Details **File Location**: `src/task-injection.js:120-139` **Vulnerability Type**: Default-on agent instruction hijacking **Risk Level**: High ### Vulnerable Code ```javascript function buildPrRequirements(paperclip) { const identifier = paperclip?.identifier || 'SUP-XX'; return ` --- ## ⚠️ Required Deliverables These requirements are non-negotiable and apply to ALL code changes: 1. **Feature branch** — all changes on a dedicated branch, never commit directly to \`main\` 2. **Branch naming** — branch name must include \`${identifier}\` (example: \`${identifier}/short-slug\`) 3. **One feature per PR** — no bundling unrelated changes; if you find separate issues, create separate branches/PRs 4. **Create a PR** — use \`gh pr create\` when work is complete; do not leave changes unsubmitted 5. **Tests must pass** — run existing tests before submitting; fix failures before requesting review 6. **PR review required** — wait for clean review from Codex or CodeRabbit before merging 7. **Fix ALL review comments** — resolve every P1/P2 (Critical/High) comment before merge; never merge with unresolved critical issues 8. **CI must be green** — all required checks must pass before merge 9. **Blocker routing** — if you hit a blocker or need-Andrew item, write it to Project Board + Live Plan + Tasks.md + today's journal; do NOT report completion until all 4 are written **Completion report must include:** - Paperclip issue: ${identifier} - Branch name and PR number (or reason if no PR needed) - Test results summary - Any unresolved issues or blockers `; } ``` The instruction sections are enabled by default: ```javascript const DEFAULT_SECTIONS = { paperclipIssue: true, problemSolving: true, prRequirements: true, uiNudge: true, }; ``` ### Technical Analysis The skill appends authoritative, “non-negotiable” instructions to every task classified as a code task. These instructions do substantially more than provide model fallback o ...[truncated 1988 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Disable all behavior-changing sections by default and require explicit opt-in: ```javascript const DEFAULT_SECTIONS = { paperclipIssue: false, problemSolving: false, prRequirements: false, uiNudge: false, }; ``` 2. Replace organization-specific requirements with neutral, configurable templates. 3. Remove references to specific people and personal artifacts such as “Andrew,” `Tasks.md`, and a personal journal. 4. Separate advisory context from mandatory instructions. Do not use phrases such as “non-negotiable” unless the user explicitly enabled an enforcement policy. 5. Require separate consent for repository mutation, pull-request creation, external review, and local document writes. 6. Clearly display the exact injected text during setup and provide a dry-run preview before enabling injection. 7. Add tests proving that task injection is inert by default and that each side-effecting section requires an explicit configuration flag. ]]>
