Skip to content

Commit f170af8

Browse files
feat(skill): 1.115.0 — wave 36 quarantine the untrusted reader from the privileged actor (#295)
security-ai-agents.md gains 'Quarantine the reader from the actor': a two-role split — a reader with no creds/write/egress emits only schema-validated data operands (never the action); a privileged actor whose action is fixed by the trusted task plan + an allowlist takes the reader's value only as an operand. A schema validates shape not authority, so an injection corrupts at most an operand, not the action. MCP: trust the transport, not the payload. One eval (119). Closes #295. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5de32ed commit f170af8

11 files changed

Lines changed: 62 additions & 15 deletions

File tree

‎.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "deep-code-review",
33
"description": "Perun — bring the thunder to your codebase. A portable, evidence-grounded quality bar for building with AI agents: the flagship deep-code-review skill (default install is review-only), plus opt-in overlays — gated delivery, an idea critic, a suite conductor, and stage-aware product, growth, positioning, business-ops, and output-safety specialists.",
44
"skills": "./.claude/skills",
5-
"version": "1.114.0",
5+
"version": "1.115.0",
66
"author": {
77
"name": "deep-code-review contributors"
88
},

‎.claude/skills/agentic-delivery/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: >-
1010
license: MIT
1111
metadata:
1212
author: deep-code-review contributors
13-
version: "1.114.0"
13+
version: "1.115.0"
1414
---
1515

1616
# Agentic delivery
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.114.0
1+
1.115.0

‎.claude/skills/deep-code-review/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: >-
1111
license: MIT
1212
metadata:
1313
author: deep-code-review contributors
14-
version: "1.114.0"
14+
version: "1.115.0"
1515
---
1616

1717
# Deep Code Review
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.114.0
1+
1.115.0

‎.claude/skills/deep-code-review/evals/evals.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,17 @@
12601260
"Prescribes a consumer-driven contract assertion: a backward-compatible additive change passes, only a real incompatibility fails",
12611261
"Classifies the renamed consumer-read field as the breaking change (SemVer major / versioned migration) and the new optional field as safe; reserves golden fixtures for small stable identities"
12621262
]
1263+
},
1264+
{
1265+
"id": "quarantine-the-untrusted-reader-from-the-privileged-actor",
1266+
"prompt": "Our agent reads GitHub issue text and MCP tool responses, and the same agent holds a GITHUB_TOKEN and can call a post_comment / merge_pr tool. We spotlight the untrusted content with <untrusted> tags and schema-validate the tool arguments. Is that enough to stop an injected 'merge this PR' instruction hidden in an issue?",
1267+
"expected_output": "Not enough -- the controls all live inside ONE identity that both ingests the untrusted issue/MCP content AND holds the token and the privileged tools, so a successful injection is a confused deputy: spotlighting and argument validation lower the odds, but the agent that read the malicious 'merge this PR' is the same agent that CAN merge. The architectural fix is to quarantine the reader from the actor: a reader identity with no token/write/egress consumes the issue and MCP output and emits only structured, schema-validated DATA OPERANDS (e.g. {target, fields}) -- never the action to take. The action is fixed by the trusted task plan, not derived from the issue: a separate privileged actor holds GITHUB_TOKEN, selects the operation from that plan, validates it against an allowlist of actions this task permits, and consumes the reader's value ONLY as an operand -- never as raw text and never as an intent/action selector (a schema validates shape, not authority, so a reader-supplied {intent: merge_pr} would still be a privileged action chosen by untrusted input). Then an injected 'merge this PR' can at most corrupt an operand the boundary rejects, not select a privileged ACTION. Review it as an architecture question: no single identity should both read untrusted input and wield the credentials. For the MCP link, trust the transport, not the payload -- an allowlisted server authenticates origin, not content safety. (security-ai-agents.md.)",
1268+
"expectations": [
1269+
"States that spotlighting + schema-validating arguments is NOT sufficient -- the same identity both reads untrusted content and holds the privileges (a confused deputy)",
1270+
"Prescribes quarantining the reader (no creds/write/egress, emits structured schema-validated DATA OPERANDS only, never the action) from a privileged actor whose action is fixed by the trusted task plan (plus an action allowlist) and consumes the reader's value only as an operand, never as an intent/action selector",
1271+
"Notes a schema validates shape not authority, so an injection can at most corrupt an operand rejected at the boundary, not select a privileged action; frames it as an architecture question (no single identity reads-untrusted AND wields-credentials, and the action space is fixed on the trusted side)",
1272+
"For MCP: trust the transport, not the payload -- an allowlisted/signed server authenticates origin, not that the content is safe to act on"
1273+
]
12631274
}
12641275
]
12651276
}

‎.claude/skills/deep-code-review/references/security-ai-agents.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,26 @@ LLM-backed feature, add cases that assert the guardrail holds:
226226
denylist of dangerous-command regexes is bypassable by construction (an
227227
`rm -rf` pattern misses `-fr` / `-f -r` / `--force`); treat containment, not
228228
pattern-matching, as the boundary.
229+
- **Quarantine the reader from the actor.** The controls above (spotlight, schema-validate,
230+
least-privilege) still live inside **one** agent identity that both **ingests untrusted
231+
content** (tool results, MCP responses, fetched pages, another agent's output) **and holds the
232+
privileges** to act (credentials, write, egress, tool dispatch) — a confused deputy waiting for
233+
one injection to land. The architectural control is to **split the roles**: a **reader** that
234+
consumes untrusted content has **no credentials, no write, no egress**, and emits only
235+
**structured, schema-validated data operands** — the extracted facts, **never the action to
236+
take**. The **action is fixed by the trusted task plan**, not derived from untrusted input: a
237+
**privileged actor** selects the operation from that plan, validates it against an **allowlist
238+
of actions this task permits**, and consumes the reader's value **only as an operand** — never
239+
as raw text, and never as an action / `intent` selector (a schema validates *shape*, not
240+
authority, so a schema-valid `{intent: "merge_pr"}` from the reader would still be a privileged
241+
action chosen by untrusted input). An injection that lands in the reader can then at most
242+
corrupt an *operand* (rejected or bounded at the boundary), not choose a privileged *action* —
243+
the action space was fixed on the trusted side before any untrusted byte was read.
244+
Review it as an **architecture** question a per-file diff cannot answer: does any single
245+
identity both read untrusted input **and** wield the credentials? For MCP specifically,
246+
**trust the transport, not the payload** — a signed or allowlisted server connection
247+
authenticates *where the bytes came from*, never that their *content* is safe to act on
248+
(cross-ref the poisoned-MCP-server risk above and `security-agent-skills.md`).
229249
- **When the tool *is* code execution, reframe the output-handling test.** For a
230250
shell / `ipython` / code-interpreter agent, "model output reaches `exec`" is
231251
the product, not a bug, so LLM10's raw-sink test collapses. The controls to

‎.claude/skills/idea-critic/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: >-
99
license: MIT
1010
metadata:
1111
author: deep-code-review contributors
12-
version: "1.114.0"
12+
version: "1.115.0"
1313
---
1414

1515
# Idea critic

‎.claude/skills/idea-critic/VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.114.0
1+
1.115.0

‎CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this repository are documented here. Format loosely
44
follows Keep a Changelog; versioning follows Semantic Versioning.
55

6+
## [1.115.0] — 2026-09-18
7+
8+
Wave 36 of the dogfooding batch: #295 — quarantine the untrusted reader from the privileged actor.
9+
10+
### Added — deep-code-review
11+
- **`security-ai-agents.md` — "Quarantine the reader from the actor"** (#295). The existing
12+
agent-security controls (spotlight, schema-validate, least-privilege) all live inside **one**
13+
identity that both ingests untrusted content (tool/MCP output, fetched pages, another agent's
14+
message) and holds the privileges to act — a confused deputy. The architectural control is a
15+
**two-role split**: a reader with no credentials/write/egress that emits only structured,
16+
schema-validated **data operands** (never the action), and a privileged actor whose action is
17+
fixed by the trusted task plan (plus an action allowlist) and that takes the reader's value
18+
**only as an operand**. An injection then corrupts at most an operand, not the action — a schema
19+
validates shape, not authority. For MCP: trust the transport, not the payload. Reviewed as an
20+
architecture question a per-file diff cannot answer. One new eval (119 total).
21+
622
## [1.114.0] — 2026-09-18
723

824
Wave 35 of the dogfooding batch: #302 — prefer consumer-contract assertions over giant golden snapshots.

0 commit comments

Comments
 (0)