Claude Code Now Red-Teams Your Code Before You Commit

Claude Code security plugin scanning a terminal for code vulnerabilities before commit, Anthropic beta

Anthropic just shipped a Claude Code security plugin: an AI vulnerability scanner that runs inside your terminal and checks your code for injection flaws, logic bugs, and other security holes before you commit. Announced in beta this week, it runs on the same Claude inference you already use, scans either your latest changes or an entire codebase, and hands you verified findings with suggested fixes instead of silently rewriting your code.

Key takeaways

  • The Claude Code security plugin is an official Anthropic tool, now in beta, that scans your code for vulnerabilities from the terminal using a multi-agent setup and runs on the Claude inference you already pay for.
  • Two modes: scan only your pending changes before a commit, or run a full scan across the whole codebase.
  • Scan depth is a dial. A medium tier covers roughly 20 files; a max tier runs deep audits with red-team style simulations. It explains each issue, verifies it, then proposes a fix without auto-applying it.
  • The catch, reported by early users on X: scans can be token-hungry, with some full-repo runs said to cost up to 600 dollars, plus session crashes and usage limits on large repositories.
  • Install is a single command inside Claude Code. Fable support and an Opus fallback for scanning are the top community requests so far.
  • Bottom line: security review just moved left into the terminal, which is a real DevSecOps shift, but budget and repo-size limits mean you scope scans deliberately, not on every keystroke.

Published July 23, 2026. The feature description here comes from Anthropic's announcement of the Claude Code security plugin. The cost figures, crashes, and usage limits are from early users posting on X in the first day of the beta, so read them as anecdotal, not official numbers.

What the Claude Code security plugin actually is

Claude Code is Anthropic's terminal coding agent. The new security plugin bolts a dedicated vulnerability scanner onto it, so the same tool that writes and edits your code can now audit it for security problems in the same session. Anthropic put the pitch plainly on launch: "Scan your changes for vulnerabilities before you commit, or run a full scan across your codebase, all from your terminal on the Claude inference you already run."

Under the hood it is a multi-agent system rather than a single prompt. It looks for the usual high-impact classes first: injection flaws, broken logic that a linter would miss, and the kind of context-dependent bugs that only show up when one function trusts another. Crucially, it does not auto-apply anything. It explains the problem, verifies that the problem is real, and suggests a fix that you choose to accept or ignore. For anyone who has watched an AI confidently rewrite working code, that human-in-the-loop default is the right call.

How the scans work: medium to max

The plugin exposes scan depth as a setting, and the tradeoff is coverage against cost. A medium scan targets a bounded slice of the project, on the order of 20 files, which keeps it fast and cheap enough to run before a commit. A max scan is a different animal: deep audits across the codebase with red-team style simulations that actively try to break your assumptions the way an attacker would. Same plugin, very different token bill.

The multi-agent design is what makes the output usable. One pass surfaces candidate issues, another pass verifies them before they reach you, which is how the tool keeps its findings from turning into the wall of false positives that makes most static analysis tools easy to ignore. If you already lean on the Claude Code review commands, think of this as the security-specialized sibling: narrower focus, deeper adversarial checks, verified before it speaks.

The catch: token costs, crashes, and repo limits

Here is where "on the Claude inference you already run" cuts both ways. Because the scan burns your own tokens, a max run against a large repository is genuinely expensive. Early users on X report full scans costing as much as 600 dollars, alongside session crashes and usage limits that bite on big codebases. Anthropic has not published official per-scan pricing, and these are first-day anecdotes, but the direction is clear: this is not a tool you fire on every save.

The practical read is to treat scan depth like a budget. Run medium scans on your pending diff as a pre-commit gate, and reserve max, red-team scans for periodic audits of critical paths, not the whole tree. If token spend is already a sore point on your team, the same discipline we cover in our guide to OpenClaw cost control for Anthropic applies directly here: scope the context, cap the depth, and measure before you scale it across a repo.

What about Fable and Opus?

The loudest question under the announcement was not about bugs, it was about models. Developers immediately asked whether the plugin will run on Claude Fable 5, and whether security scans could fall back to Opus for the heaviest reasoning. Neither is confirmed. Today the plugin runs on the Claude inference already wired into your Claude Code session, and Anthropic has not committed to a model picker for it. Given how fast the lineup is moving, with an Opus 5 launch rumored around the same window, model choice for security scanning is a fair thing to watch.

Should you actually turn it on?

For any team shipping AI-generated code quickly, this closes a real gap. AI writes a lot of code now, and AI-written code has its own failure patterns: plausible-looking logic that is subtly wrong, trust boundaries that were never checked, dependencies pulled in without a second thought. A scanner that lives in the same terminal, understands the diff it just helped write, and verifies its own findings is a meaningful step toward shifting security left instead of bolting it on at the end.

But a plugin flags issues. It does not own your security posture. Someone still has to decide which findings matter, wire the scan into CI so it runs on every pull request instead of when a developer remembers, and actually fix the vulnerabilities that count. That is engineering work, not a checkbox.

Ship AI-built software that is actually secure

Valletta Software's senior engineers build and harden production systems for teams moving fast with AI. We wire security review into your CI/CD, triage what these scanners surface, and fix the vulnerabilities that matter instead of drowning your team in findings. If AI is writing more of your code than your reviewers can keep up with, that is exactly the gap we close.

Book a call with Valletta Software

What this means if you ship code

The honest move is the same one we recommend for every new model or tool: run it on your own work before you trust anyone's claims, including these. Point a medium scan at a branch you know well and see whether its findings are real or noise. Then decide where a max, red-team pass earns its cost. Benchmarks and launch-day tweets do not know your codebase; your own trial does. We made the same argument in our Kimi K3 versus Claude Fable 5 breakdown, and it holds here: adopt on evidence from your repo, not on the discourse.

FAQ

What is the Claude Code security plugin?

It is an official Anthropic plugin for Claude Code, released in beta, that scans your code for security vulnerabilities from the terminal. It uses a multi-agent AI setup to find, verify, and explain issues such as injection flaws and logic errors, and suggests fixes without applying them automatically.

How much does a Claude Code security scan cost?

Anthropic has not published official per-scan pricing. Because the plugin runs on your existing Claude inference, cost scales with scan depth and repository size. Early users on X have reported full, deep scans costing up to 600 dollars, so a medium scan on your pending changes is far cheaper than a max scan across a whole codebase.

Does the Claude security plugin fix vulnerabilities automatically?

No. It explains each issue, verifies it is real, and proposes a fix, but it leaves the decision to apply that fix to you. This keeps a human in the loop rather than letting the tool rewrite code on its own.

How do I install the Claude Code security plugin?

You install it with a single command inside Claude Code, then choose a scan level from medium up to a max deep-audit with red-team simulations. It is in beta, so expect rough edges such as session crashes and usage limits on large repositories.

Does it work with Claude Fable or Opus?

Not as a selectable option today. The plugin runs on the Claude inference already connected to your Claude Code session. Fable support and an Opus fallback for scanning are among the most requested features from the community, but neither has been confirmed by Anthropic.

Valletta.Software - Top-Rated Agency on 50Pros

Your way to excellence starts here

Start a smooth experience with Valletta's staff augmentation