The Claude Code security plugin story is really two stories, and most of this week’s coverage merges them into one. The free three-layer reviewer — the one that pattern-checks every edit, security-reviews each turn’s diff, and re-reviews on commit — is called security-guidance, and it launched on May 27, 2026. What Anthropic actually shipped this week, in beta, is a separate plugin called claude-security: an on-demand, multi-agent deep scan you invoke deliberately when you want a full vulnerability sweep.
The distinction matters because the two tools answer different questions. The three-layer plugin asks, continuously and for free, “did Claude just write something dangerous?” The new deep-scan plugin asks, on demand and at real token cost, “what is lurking in this codebase right now — and can you prove it?” Together they turn security review from a separate audit step into a toolchain default, arriving at a moment when the volume of AI-generated code entering production has made that shift overdue — and when the first fully agentic breach has shown what’s at stake.
This guide separates the two plugins cleanly, walks through the three-layer architecture and the new deep-scan pipeline, combines Anthropic’s seven security rungs into one reference table, and closes with an honest read on limits. One sourcing note up front: neither plugin received a dedicated anthropic.com news post — the facts below come from Anthropic’s own plugin documentation and the July 22–23 press coverage that corroborates it.
- 01The news is claude-security, not the three-layer plugin.The three-layer security-guidance plugin launched May 27, 2026. The July 22 beta release is claude-security — a separate, on-demand multi-agent deep-scan plugin. Much of this week’s coverage conflates the two.
- 02Three free layers review Claude’s own code automatically.Layer 1 pattern-checks every edit with zero model cost. Layer 2 security-reviews each turn’s git diff in the background. Layer 3 runs an agentic cross-file review when Claude commits or pushes. Free on all plans; only the model-backed layers spend usage.
- 03The deep scan verifies findings before it reports them.claude-security fans out subagents across a six-phase pipeline, then requires each candidate finding to survive a 2-of-3 panel of independent verifiers. The tally is computed in Python by the report renderer, not asserted by the model.
- 04Patches are drafted, reviewed, and never auto-applied.Each suggested patch is built in a scratch copy of the repo and reviewed by an agent independent of the one that wrote it. You apply patches yourself with git apply — one per PR.
- 05Anthropic’s own framing: a net, not a complete solution.None of the layers block writes or commits, scans are nondeterministic, and the docs explicitly position everything as one layer of defense in depth. Existing CI static analysis and dependency scanning are not replaced.
01 — This Week’s NewsWhat actually shipped this week — and what didn’t.
On July 22, 2026, Anthropic released the claude-security plugin for Claude Code in beta, with coverage from MarkTechPost, Cyber Security News, and GBHackers all landing on July 23. It adds a single command, /claude-security, which opens a menu of three jobs: scan the whole codebase (or a scoped subset), scan a set of changes — a branch’s diff, a PR’s diff, or a single commit — or turn selected findings into patch files.
What did not ship this week is the three-layer scanning system the title of this post describes. That plugin, security-guidance, arrived eight weeks earlier on May 27, 2026 — and if you missed the May launch, it’s arguably the bigger deal of the two, because it’s free, automatic, and requires nothing beyond a one-line install. Anthropic’s own documentation positions the pair as different rungs of a single defense-in-depth stack: the three-layer plugin is the always-on companion; the deep scan is the escalation you reach for before a release or after inheriting a codebase.
security-guidance
Reviews Claude’s own code changes for vulnerabilities as it writes them, in the same session, with nothing to invoke manually. Pattern check on every edit, diff review at end of turn, agentic review on commit.
claude-security
A deliberate deep scan run inside an existing session. Fans out subagents across a six-phase pipeline, verifies every finding through an adversarial panel, and drafts patch files you review and apply yourself.
02 — The Established BaseThe free three-layer system, layer by layer.
The security-guidance plugin is built on Claude Code’s hooks system — its source is public in the official plugin marketplace repo as a worked example for anyone building their own hook-based reviewers. Once installed, three review layers run without any manual invocation, each triggering at a different point in the write-ship loop.
Pattern check
On each Edit, Write, or NotebookEdit, a deterministic scan matches new content against roughly 25 known-dangerous patterns — dynamic code execution like eval and child_process.exec, unsafe deserialization like pickle, DOM injection like dangerouslySetInnerHTML, and edits to GitHub workflow files. No model call, no usage cost.
Diff review
After each turn, the plugin computes a git diff of everything that changed — edit tools, Bash commands, subagents included — and sends it to a separate security-focused Claude call. Findings return to the session and Claude addresses them as a follow-up. Covers up to 30 changed files per turn; fires at most three times in a row.
Commit review
A deeper agentic review reads surrounding code — callers, sanitizers, related files — to trace cross-file data flow before deciding a finding is real, cutting false positives on patterns that look dangerous in isolation. Fires only on commits Claude itself runs; capped at 20 reviews per rolling hour.
Two design details are worth pausing on. First, reviewer independence: the plugin never asks the Claude instance that wrote the code to grade its own work. The model-backed reviews run as separate calls with fresh context and a security-focused prompt — per the docs, instructed only to find problems. Both model-backed layers default to Claude Opus 4.7, configurable via the SECURITY_REVIEW_MODEL and SG_AGENTIC_MODEL environment variables.
Second, teams can teach it their own threat model. A .claude/claude-security-guidance.md file feeds plain-language guidance to the model-backed reviews (capped at 8 KB combined across scopes), and a .claude/security-patterns.yaml file adds up to 50 custom deterministic rules with glob-scoped paths. When the plugin launched in May, Anthropic said its internal rollout and benchmarks showed a 30–40% decrease in security-related comments on PRs opened using the plugin — a vendor-stated figure reported via Help Net Security’s launch coverage, not an independently audited benchmark, so treat it as directional rather than proven.
03 — The New PluginInside the six-phase deep-scan pipeline.
Where the three-layer plugin reviews what changed, claude-security interrogates what exists. A full scan runs as a dynamic workflow — a JavaScript orchestration script that fans work out across subagents — moving through six phases, per MarkTechPost’s technical breakdown of the public plugin source:
- Inventory. The repo is partitioned into components; every top-level directory is either scanned or explicitly skipped with a stated reason.
- Threat model. One modeler per component produces entry points, sinks, and trust boundaries.
- Research. Researchers work a component-by-category matrix across four fixed lenses — injection and input, auth and access, memory and unsafe code, crypto and secrets — with the memory lens dropped for components written only in memory-safe languages.
- Sweep. Gap-fill passes catch what the matrix missed.
- Panel. Three-lens adversarial verification of every candidate finding (more on this below).
- Adversarial. At max effort only, marginal keeps are re-paneled and every survivor is red-teamed.
Effort tiers scale the scope: low and medium cap the scan at 12 components, high and max raise that to 24, and the number of gap-fill sweeps steps from zero at low effort up to two at high and max. Model assignments are tiered too — the orchestrator runs on Opus, the repository cartographer and read-only code explorer run on Sonnet, and researchers and verifiers inherit the session’s model. Every scan agent is restricted to read-only tools.
Inventory to adversarial
Inventory, threat model, research, sweep, panel, and — at max effort — an adversarial re-check. A dynamic workflow fans each phase out across subagents; small diffs collapse to a single-researcher configuration.
Keep quorum per finding
Three independent verifiers — reachability, impact, defenses — each vote TRUE_POSITIVE or FALSE_POSITIVE with a decisive file and line. Unanimous panels cap confidence at high; a 2-of-3 quorum caps it at medium.
Public source on GitHub
Published in anthropics/claude-plugins-official. Requires Claude Code v2.1.154+ for the dynamic-workflows feature and Python 3.9.6+ on PATH — standard library only, nothing installed.
04 — Engineering RigorVerified findings, auditable tallies, hand-applied patches.
The deep scan’s most interesting design choice is its distrust of its own researchers. A candidate finding doesn’t reach the report because an agent found it — it gets there only after surviving a panel of three independent verifiers, one per lens: reachability (can an attacker actually get there?), impact (does it matter?), and defenses (does something already stop it?). If fewer than three voters return, the candidate can’t be kept at all.
Better still, the verification tally is computed in Python by the report renderer rather than asserted by the model. The revision stamp’s verification status reads “verified” only when the vote record proves the panel actually ran for every finding — otherwise it’s marked unverified with a stated reason. That’s Anthropic building an auditable check on the AI’s own rigor claims into the artifact itself, and it’s the kind of detail most of this week’s coverage skipped.
Output lands in a timestamped CLAUDE-SECURITY-* directory that is auto-gitignored so a stray git add can’t sweep a vulnerability report into your history: a human-readable Markdown report with findings tagged F1, F2, and so on — each with impact, exploit scenario, severity, confidence, and recommendation — plus a machine-readable JSONL file and a revision stamp recording exactly which commit was scanned at what effort level.
Patches follow the same trust model. Each one is drafted in a scratch copy of the repo and reviewed by an agent independent of the one that wrote it — running project tests when present — and is only produced when that review can vouch the change fixes the one finding, introduces no new vulnerability, and leaves behavior otherwise unchanged. Otherwise you get a note instead of a patch. Findings whose underlying code has changed since the report was generated are skipped with a note. Nothing is ever applied automatically: you run git apply yourself, one patch per PR.
"Treat the plugin as one layer of defense in depth, not a complete security solution."— Anthropic, Claude Code security-guidance documentation
05 — Reference TableAnthropic’s full security stack, layer by layer.
Anthropic documents its review tooling across two separate docs pages, each with its own partial table. The reference below combines all seven rungs — the three free in-session layers plus the four on-demand, PR-time, and managed rungs — into one practitioner view. The consistent pattern: cost and depth rise together, and nothing on this list replaces your existing CI static analysis or dependency scanners, by Anthropic’s own explicit framing.
| Rung | Trigger | Review depth | Cost | Availability |
|---|---|---|---|---|
| security-guidance plugin — automatic, in-session (launched May 27, 2026) | ||||
| Layer 1 — pattern check | Every Edit / Write / NotebookEdit | Deterministic match against ~25 known-risky patterns — no model call | Free — zero usage cost | All plans |
| Layer 2 — diff review | End of each turn, in the background | Separate security-focused Claude call on the turn’s full git diff (Opus 4.7 default); up to 30 changed files, max 3 consecutive fires | Model-backed — spends plan usage | All plans |
| Layer 3 — commit review | Claude-run git commit / git push | Agentic review that reads callers, sanitizers, and related files to trace cross-file data flow; capped at 20 reviews per rolling hour | Model-backed — spends plan usage | All plans |
| On-demand, PR-time & managed rungs | ||||
| /security-review command | Run manually in a session | On-demand single-pass security review of pending changes | Model-backed — spends plan usage | Claude Code |
| claude-security plugin (beta) | /claude-security — scan codebase, scan changes, or suggest patches | Multi-agent deep scan; findings survive a 2-of-3 independent verification panel before reaching the report | Counts against plan usage limits | Beta — Claude Code v2.1.154+ |
| Code Review | On pull request | Multi-agent correctness + security review with codebase context | Plan feature | Team / Enterprise |
| Claude Security (managed) | Continuous, on connected repositories | Hosted scanning of connected repos — no plugin install required | Managed product | Enterprise |
One practical note on the top of the stack: the managed Claude Security product monitors connected repositories continuously on the Enterprise plan, but the plugin version reaches code the managed product can’t — repositories hosted on GitLab or Bitbucket, or codebases on networks that allow no inbound connections. For teams in that position, the beta plugin is the only way to get the deep-scan pipeline at all.
06 — Getting StartedInstall in two commands, roll out org-wide in one setting.
Both plugins install from the official marketplace and apply without a restart. The three-layer plugin needs Claude Code v2.1.144 or later and Python 3.7+ on PATH (3.10+ for the agentic commit review and for model-backed reviews on third-party providers like Amazon Bedrock); on first run it creates a virtualenv under ~/.claude/security/ and installs the Claude Agent SDK. The diff-based layers need a git repository and skip silently outside one — the layer-1 pattern check works anywhere.
/plugin install security-guidance@claude-plugins-official then /reload-plugins. The on-demand deep scan: /plugin install claude-security@claude-plugins-official then /reload-plugins. If the marketplace isn’t found, run /plugin marketplace add anthropics/claude-plugins-official first. The deep scan additionally needs the dynamic-workflows feature — on the Pro plan, toggle it on in /config.For teams, the rollout paths matter more than the install commands. Admins can enable the three-layer plugin fleet-wide via enabledPlugins in managed settings, or check it into a repo’s .claude/settings.json so every clone gets it — which is also the only way it carries into Claude Code on the web, since user-scoped plugins don’t follow you into cloud sessions run on Anthropic infrastructure. The new deep-scan plugin gets its org enablement switch in the admin console. We’ve run this exact two-plugin setup on our own client builds — it’s the kind of default we now bake into every web development engagement rather than treating security review as a separate line item.
07 — Honest LimitsWhat neither plugin promises.
Anthropic’s own documentation is unusually direct about limits, and the honest read starts there. None of the three in-session layers block writes or commits — findings reach the writing Claude as instructions, Claude addresses them in conversation, and the review model can still miss issues. Deep scans are explicitly nondeterministic: two scans of the same code can surface different findings, which is why the docs tell you to scan regularly and use revision stamps to attribute each report to exact code and settings. And a quirk worth knowing before your first scan: the docs note you may see “Fable 5’s safeguards flagged this message” during security work — the model’s cybersecurity safety classifiers can block certain activities and auto-downgrade to Opus, which is expected behavior, not a bug.
The trade press adds a fair counterweight on the new plugin’s transparency. Reported integrations — Slack and Jira via webhooks, CSV export, dismissals that carry forward across triage — appear in only one outlet’s coverage and aren’t corroborated by Anthropic’s docs as we fetched them, so treat those as unconfirmed color for now.
"Anthropic did not provide detailed technical information about the classes of vulnerabilities supported by the plugin, its detection methodology, programming language coverage, or its accuracy rates."— GBHackers, July 23, 2026
That critique is fair, and the sensible operating posture follows from it: validate the deep scan’s output against your existing SAST, DAST, and pen-testing practice, keep a human on every suggested patch, and treat both plugins the way Anthropic itself frames them — as one layer of defense in depth, not a replacement for a security program.
08 — ImplicationsSecurity as a toolchain default, not an audit step.
Zoom out and the week’s real signal is strategic. The same week Anthropic shipped a free three-layer reviewer to every Claude Code user and put a multi-agent deep scanner in open beta, Google gated its own security-specialized Gemini model behind restricted access for governments and trusted partners. Two labs, two opposite postures on the same question: is AI security capability something you democratize into every developer’s terminal, or something you control? Anthropic is betting that defense wins when it’s ambient — the same expansion instinct behind Record a Skill, its other toolchain addition this month.
Our projection: this becomes table stakes fast. Once one agentic coding tool reviews its own output by default, “my AI wrote it and nothing checked it” stops being a defensible engineering posture — for vendors and for teams. Expect competing CLIs to ship equivalent hooks within quarters, expect security review to show up in AI-coding procurement checklists, and expect the interesting differentiation to move to exactly what claude-security is pioneering: not finding candidate issues, which models are already decent at, but proving which findings are real. Here’s the practical version of that bet, by team situation:
The free base layer
If you run Claude Code at all, the three-layer plugin is a one-line install with zero cost at layer 1 and normal usage spend on the model-backed layers. There’s no coherent argument against it for solo devs and small teams.
On-demand deep scans
Run /claude-security at high effort before releases, after inheriting a codebase, or when a diff touches auth or data flow. Budget for it — each scan counts against plan usage limits — and file one patch per PR.
PR-time and managed rungs
Layer Code Review on pull requests (Team/Enterprise) and the managed Claude Security product for continuous monitoring of connected repos. Use the beta plugin where the managed product can’t reach — GitLab, Bitbucket, or closed networks.
Existing scanners stay
Anthropic explicitly does not position any of these rungs as replacing CI static analysis or dependency scanning. Keep your SAST and dependency scanners running; the AI layers catch the logic-heavy, cross-file issues those tools miss.
For organizations working out where AI-assisted development fits their security posture — which rungs to mandate, how to budget deep-scan usage, how to wire review defaults into every repo — this is exactly the kind of toolchain decision our AI transformation engagements are built to settle in days rather than quarters.
09 — ConclusionThe quiet week security review became ambient.
Free, automatic review is the base. Verified deep scanning is the escalation.
Get the timeline right and the story sharpens. The three-layer security-guidance plugin — pattern check, diff review, commit review, free on all plans — has been the quiet base layer since May 27. This week’s claude-security beta adds the escalation rung: an on-demand, multi-agent deep scan whose findings must survive a 2-of-3 adversarial panel and whose patches are never auto-applied.
Neither is a complete security solution, and Anthropic says so itself. Reviews don’t block writes, scans are nondeterministic, and your CI scanners keep their jobs. But the direction is unmistakable: security review is moving from a separate audit step to a default property of the toolchain — arriving free, in-session, and switched on with one command.
The practical move this week costs almost nothing: install the free plugin, run one deep scan on the codebase you’re most worried about, and read what comes back. Whatever you think of AI reviewing AI, the report on your own code is the fastest way to form a real opinion.