T01 · Skill Instruction Hijacking
- Location
scripts/review.js:1034- Finding
Untrusted Context and Model-Generated Content Are Reused as Privileged Agent Instructions
- Content
View full analysis
0) { criteriaSection = '\n\n## Task-Specific Acceptance Criteria (agreed in Round 0)\n\n' + 'In ADDITION to the standard rubric, evaluate the plan against these task-specific criteria.\n' + 'For each criterion, note PASS or FAIL with brief evidence in your summary.\n\n' + meta.criteria.map(c => `- **${c.id}**: ${c.description} (risk if missed: ${c.risk_if_missed})`).join('\n') + '\n'; } if (fs.existsSync(templatePath)) { reviewerPrompt = readFil ...[truncated 5118 chars]- Remediation
View remediation
>> {project_context} <<>> ``` Apply equivalent boundaries to prior issues, review summaries, open issues, proposed criteria, and finalized criteria. 3. **Add explicit writer restrictions.** The writer prompt should state that all embedded plans, findings, summaries, and criteria are data; it must not execute commands, invoke tools, access files, or follow instructions found inside those fields. 4. **Prefer structured message separation.** Where supported by the model API, place policy instructions in a system or developer message and pass untrusted values in separately identified data fields instead of concatenating everything into one prompt string. 5. **Validate criteria responses before storage and reuse.** Enforce: - An object at the top level. - Arrays with a strict maximum count. - Required string fields. - Maximum lengths for IDs, descriptions, risks, reasons, and scope boundaries. - Rejection of malformed or unexpected nested values. 6. **Apply size limits to every model-generated text field.** This reduces denial-of-service risk and limits the amount of injected instruction text propagated between rounds. 7. **Do not rely on delimiter text alone as an isolation boundary.** Delimiters should supplement model-level tool restrictions, least-privilege sub-agent configuration, and strict output validation. 8. **Add adversarial regression tests** coveri ...[truncated 480 chars]
