Omniscio

OmniscioGuidesClaude Code security scan

Claude Code security scan: the Claude Security plugin

The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session: agents map the architecture, build a threat model, hunt for vulnerabilities, and independently review every finding before it reaches the report.

This page covers what the plugin is and is not, the prerequisites, installing it, both scan modes, how deep a scan goes, what the report holds, how a finding becomes a patch, where it sits among the other security tools, and the two messages people hit first.

Last checked against Anthropic's Claude Code documentation on November 21, 2026. By the Omniscio team. Updated .

What the plugin does

Anthropic describes the Claude Security plugin as a multi-agent vulnerability scan of your codebase that runs inside a Claude Code session. By default, when you scan a whole repository, Claude agents map your architecture, build a threat model, hunt for vulnerabilities, and independently review every finding before writing the report.

You can scan a whole repository or only a set of changes, such as a branch's diff, a pull request's diff, or a single commit, then turn the findings you choose into patches that you review and apply yourself.

It runs locally in your session and uses whichever models you have access to in Claude Code, so there is no separate API key or provider setting. Each scan counts toward your usage.

It is not the managed product of the same name. If you want a service that monitors your repositories, Anthropic points to Claude Security on the Enterprise plan, which is a separate product.

Source: the introduction and the first three paragraphs of Scan your codebase for vulnerabilities, read November 21, 2026.

Before you start

Four requirements, from Anthropic's prerequisites:

  • A paid plan, Anthropic API access, or a third-party provider, for the dynamic workflows the scan uses to orchestrate its agents. On Pro, turn workflows on from the Dynamic workflows row in /config.
  • Python 3.9 or later on your PATH as python3. Check with python3 --version. The plugin's tooling uses only the Python standard library, so nothing is installed.
  • Linux, macOS or Windows.
  • Git, for change scans and for turning findings into patches. Those jobs do not support other version control systems; a full scan works in any directory, with or without version control.

The model question resolves itself: the agents that hunt, verify and write patches run on your session's model, so run /model before you start if you want a different one. A few supporting steps, such as mapping the repository, use the sonnet alias instead. On a third-party provider that alias can resolve to a version your account cannot use, and Anthropic's fix is to pin your model versions.

The plugin works best in auto mode, which lets the scan's agents proceed without a permission prompt at each step.

Sources: "Prerequisites" and "Models and providers" in Scan your codebase for vulnerabilities, read November 21, 2026.

Install it

In a terminal, start claude and run this at its prompt to install from the official Anthropic marketplace:

/plugin install claude-security@claude-plugins-official

The command opens the plugin's details, where you choose an installation scope to start the install. In the VS Code extension or the desktop app, follow the same plugin install steps from that surface's plugin menu.

Two failures name their own fix. Marketplace "claude-plugins-official" not found means you add it with /plugin marketplace add anthropics/claude-plugins-official and retry. Plugin "claude-security" not found in marketplace "claude-plugins-official" usually means your local marketplace catalog is out of date: refresh it with /plugin marketplace update claude-plugins-official and retry.

If the install summary reports Run /reload-plugins to apply., that command activates the plugin in your current session. To remove it later, use the /plugin menu or claude plugin uninstall claude-security.

Plugins as a whole, the three scopes and what a plugin adds to a session are on the Claude Code plugins guide.

Source: "Install the plugin" and its troubleshooting bullets in Scan your codebase for vulnerabilities, read November 21, 2026.

Scan the codebase

The plugin adds one command, /claude-security, which opens a menu of three jobs: scanning the codebase, scanning a set of changes, and suggesting patches. The happy path runs a full scan, then turns its findings into patches.

  1. Open the menu with /claude-security and pick Scan codebase.
  2. Choose what to scan. The plugin reads your repository first, then offers the whole repository or a focused area. Pick the whole repository, or answer "I don't know" and the plugin picks a sensible default for your repository's size.
  3. Confirm the run. A scan may take a while, may use a significant number of tokens, and needs Claude Code left open while it completes. Nothing runs until you confirm.
  4. Read the report. While the scan runs it reports each stage as it starts, with the detail available under /workflows.
  5. Turn findings into patches by running /claude-security again and picking Suggest patches, then choosing which findings to address.
  6. Apply the patches you accept from your shell with git apply, in their own pull requests.

You do not have to start from the menu. The command takes a job directly, such as /claude-security scan my branch, and plain language works too, such as "scan commit abc1234".

Source: "Scan and fix your codebase" in Scan your codebase for vulnerabilities, read November 21, 2026.

Scan only your changes

When your branch has commits its base does not, the menu offers to scan only that diff, so you can check a branch before merging. You can also scan one of your open pull requests, or a single commit, by asking for it.

Only committed changes are scanned, so commit or stash in-progress edits first, or run a full scan, which reads the working tree. Change scans need a git repository, and finding your open pull requests is offered only when the session may run the GitHub CLI and gh is signed in.

On a large repository, Anthropic's advice is to scan one area at a time instead of the whole tree: pick one of the focused scopes the plugin offers, such as your API layer or your authentication code, and the run sizes itself to what you pick. The report's coverage section states what was and was not examined.

Sources: "Scan only your changes" and "Scope large repositories" in Scan your codebase for vulnerabilities, read November 21, 2026.

Choose how deep it goes

Scan effort sets how deep a scan goes, and findings go through the same independent verification at every level:

  • low is a quick first look. It skips the architecture map and the threat model when you scan your codebase.
  • medium is the default.
  • high does what medium does, plus more hunting for vulnerabilities in the same code.

Name the effort in the request, such as /claude-security scan my public API code at high. If a scan of a large repository finds less than you expect, choosing high, scanning a second time, or both can report findings one medium scan does not.

Sources: "Choose a scan effort" and the closing paragraph of "Read the scan results" in Scan your codebase for vulnerabilities, read November 21, 2026.

Read the report

Every scan writes into a timestamped CLAUDE-SECURITY-<timestamp>/ directory in your repository:

  • CLAUDE-SECURITY-RESULTS.md is the report: each finding's ID, such as F1, plus its impact, exploit scenario, severity, confidence and recommendation.
  • CLAUDE-SECURITY-RESULTS.jsonl is the same findings in machine-readable form, one JSON object per line.
  • CLAUDE-SECURITY-RESULTS.sarif is a SARIF 2.1.0 log for GitHub code scanning and any other tool that reads the standard, with findings classified under their CWE weakness categories.
  • CLAUDE-SECURITY-REVISION-<commit>.json is the revision stamp: which commit was scanned, at what effort, whether uncommitted changes were part of the scanned tree, and how thoroughly the run was verified. Outside version control it stamps UNVERSIONED.

That directory is the only change a scan makes to your checkout, and it carries its own .gitignore, so a stray git add never sweeps a report into a commit. To keep one for an audit trail, delete that file and commit the directory like any other.

Findings appear only after independent verifier agents analyze them, which is what keeps the report short enough to read. Two scans of the same code can still surface different findings, so Anthropic's advice is to run scans regularly rather than treat one clean scan as proof.

Source: "Read the scan results" in Scan your codebase for vulnerabilities, read November 21, 2026.

Turn a finding into a patch

Start the fix flow by picking Suggest patches from the menu, or by asking in plain language such as "fix finding F3", then choose which findings to address. Patches are built against committed code, so a finding whose code has changed since the report is skipped with a note, and the plugin offers a fresh scan instead of patching from a stale report.

Each patch is drafted in a scratch copy of your repository, so your source files stay untouched until you apply one. Before delivery, an agent independent of the one that wrote it reviews the patch, runs your project's tests when the code has them, and reads the diff for anything new it might introduce. A patch is written only when that review can vouch that it fixes the one finding, introduces no new vulnerability, and leaves behavior otherwise unchanged; when it cannot, you get a short note instead.

Applying a patch is always your decision. Patches are written to the report's patches/ folder, one F<n>.patch per finding with a note beside it, and you apply one from your shell at the repository root, which is where that relative path resolves:

git apply CLAUDE-SECURITY-<timestamp>/patches/F1.patch

When the patched code has no tests, the note says so, so you know its review ran without a test pass. Apply each patch in its own pull request so it can be reviewed and tested on its own.

Source: "Fix findings" and "Patches are never applied automatically" in Scan your codebase for vulnerabilities, read November 21, 2026.

Where it fits among the other tools

Anthropic places the plugin as the on-demand deep-scan layer in a stack, not a replacement for your existing scanners:

  • In session: the security guidance plugin catches common vulnerabilities in code Claude writes and fixes them in the same session.
  • On demand, single pass: /security-review runs a one-time security pass on the current branch.
  • On demand, deep scan: this plugin, with independently reviewed findings and patches.
  • On a pull request: Code Review gives multi-agent correctness and security review with full codebase context, on Team and Enterprise plans.
  • Managed: Claude Security, the hosted service on the Enterprise plan, monitors connected repositories.
  • In CI: your existing static analysis and dependency scanners, which cover language-specific rules and supply-chain checks.

The plugin runs alongside those tools rather than replacing them: it reasons about your code the way a human security researcher would, which complements the deterministic checks they provide. The Claude Code code review guide covers the pull-request layer and its cost.

Source: "How the plugin fits with other security tools" in Scan your codebase for vulnerabilities, read November 21, 2026.

The two messages people hit first

The menu opens with a Python warning. The plugin needs python3 3.9 or later on your PATH. When it cannot find one at all, the menu warns that Claude Security will not work until one is installed; when the first python3 it finds is older, the warning names the version. Install Python 3, or put a newer python3 first on your PATH, then start a new session.

A "safeguards flagged this message" notice on a Fable model. Fable's cybersecurity safety classifiers flag certain requests, and Claude Code re-runs a flagged request on an Opus model through automatic model fallback. Anthropic says this is expected, and the scan should still complete successfully.

If the scan itself is holding still rather than failing, the guide to Claude Code appearing stuck separates a long-running turn from a dead one.

Source: "Troubleshooting" in Scan your codebase for vulnerabilities, read November 21, 2026.

Where these answers come from

No scan was run from this site's machine to check the page: it needs a paid session and a repository worth scanning, and every claim is quoted from Anthropic's documentation instead.

Common questions

Does it replace a static analyser or a dependency scanner?

No. Anthropic says to run it alongside them: it complements the deterministic checks those tools provide rather than covering the same ground.

Can it scan a pull request I did not open the session from?

It can scan one of your open pull requests when the session may run the GitHub CLI and gh is signed in. Otherwise scan the branch's diff or a commit.

Why did a second scan find nothing the first one reported?

Scans are nondeterministic. The same code can surface different findings each time, which is why a clean scan is not proof and Anthropic advises regular scans.

What if a finding looks wrong?

Every finding already passed independent verifier agents before it reached the report, and you do not have to act on it: pick only the findings you want patches for.