Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.325 Latest v2.1.331 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Scan your codebase for vulnerabilities changedclaude-security

Nearest release: v2.1.332, published an hour after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 24 Nov 2026 21:04 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 24 Nov 2026 21:07 UTC.

Upstream edited
Recorded here
Lines+225added
Lines−52removed
From line 2 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits23to this page, all time

### Watch a running scan ### Continue a stopped scan ### Run a more thorough change scan ### Tell a scan about your system ### Patch from an older report ## Triage findings you already have ## Create a threat model ## Analyze your attack surface ## Scan from your shell ## Scan pull requests in GitHub Actions

The whole hunk

from line 2, old and new numbered
/
lines
from line 2
22 
33> Install the Claude Security plugin to scan your codebase for vulnerabilities in a Claude Code session and turn findings into patches you review and apply.
44 
5The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session. [By default](#choose-a-scan-effort), 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.
5The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session. [By default](#choose-a-scan-effort), when you scan a whole repository, Claude agents map your architecture, hunt for vulnerabilities, and independently review every finding before writing the report.
66 
7Use the plugin to scan a whole repository or [only a set of changes](#scan-only-your-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.
7Use the plugin to scan a whole repository or [only a set of changes](#scan-only-your-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. Scan only code that you own or have permission to test.
88 
9The plugin runs locally in your session, uses [whichever models you have access to in Claude Code](#models-and-providers), and each scan counts toward your [usage](https://code.claude.com/docs/en/costs.md). If you want a managed service that monitors your repositories, or want to run scans on [Claude Mythos](https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5), see the [Claude Security](https://claude.com/product/claude-security) product, available on the Enterprise plan.
9Run a scan in your session, your shell, or GitHub Actions:
1010 
11The plugin is also distinct from the review tools already in Claude Code: the [security guidance plugin](https://code.claude.com/docs/en/security-guidance.md) reviews code as Claude writes it, [`/security-review`](https://code.claude.com/docs/en/commands#all-commands) runs a single pass over your branch, and [Code Review](https://code.claude.com/docs/en/code-review.md) reviews pull requests. For how the layers stack, see [How the plugin fits with other security tools](#how-the-plugin-fits-with-other-security-tools).
11* **In your session**: [scan and fix your codebase](#scan-and-fix-your-codebase) with [whichever models you have access to in Claude Code](#models-and-providers)
12* **From your shell**: use the [`claude-security` command](#scan-from-your-shell)
13* **In GitHub Actions**: add the plugin's job to [scan pull requests](#scan-pull-requests-in-github-actions)
1214 
15A scan in your session or shell counts toward your [usage](https://code.claude.com/docs/en/costs.md), and a scan in GitHub Actions counts toward the account that owns the job's model credential.
16 
17> [!NOTE]
18>
19> If you want a managed service that monitors your repositories, or want to run scans on [Claude Mythos](https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5), see the [Claude Security](https://claude.com/product/claude-security) product, available on the Enterprise plan.
20 
21The plugin is also distinct from review tools already in Claude Code: the [security guidance plugin](https://code.claude.com/docs/en/security-guidance.md) reviews code as Claude writes it, and [Code Review](https://code.claude.com/docs/en/code-review.md) reviews pull requests. For how the layers stack, see [How the plugin fits with other security tools](#how-the-plugin-fits-with-other-security-tools).
22 
1323## Prerequisites
1424 
1525To run the plugin, you need:
1626 
1727* A paid plan, Anthropic API access, or a [third-party provider](#models-and-providers), for the [dynamic workflows](https://code.claude.com/docs/en/workflows.md) the scan uses to orchestrate its agents. On Pro, turn them on from the Dynamic workflows row in `/config`.
18* Python 3.9 or later available on your `PATH` as `python3`. Check with `python3 --version`. The plugin's tooling uses only the Python standard library, so nothing is installed.
28* Python 3.9 or later available on your `PATH` as `python3`. Check with `python3 --version`. The plugin's tooling uses only the Python standard library.
1929* Linux, macOS, or Windows.
2030* Git, for change scans and for turning findings into patches; those jobs don't support other version control systems. A full scan works in any directory, with or without version control.
2131 
2232## Models and providers
2333 
24A scan runs inside your Claude Code session. The plugin makes no model calls of its own, so there's no separate API key or provider setting to configure.
34The plugin makes no model calls of its own, so a scan in your session needs no separate API key or provider setting.
2535 
26* **Model**: the agents that hunt for vulnerabilities, verify findings, and write and review patches run on [your session's model](https://code.claude.com/docs/en/sub-agents.md#choose-a-model). To change it, run [`/model`](https://code.claude.com/docs/en/model-config#setting-your-model) in your session before you start a scan. A few supporting steps, such as mapping the repository, use the [`sonnet` alias](https://code.claude.com/docs/en/model-config#model-aliases) instead.
36* **Model**: the agents that hunt for vulnerabilities, verify findings, and write and review patches run on [your session's model](https://code.claude.com/docs/en/sub-agents.md#choose-a-model). To change it, run [`/model`](https://code.claude.com/docs/en/model-config#setting-your-model) in your session before you start a scan. A few supporting steps use the [`sonnet` alias](https://code.claude.com/docs/en/model-config#model-aliases) instead.
2737* **Provider**: scans run on a paid plan, with Anthropic API access, or on a [third-party provider](https://code.claude.com/docs/en/third-party-integrations.md) such as [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md), [Google Cloud's Agent Platform](https://code.claude.com/docs/en/google-vertex-ai.md), or [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md).
2838 
2939On a third-party provider, the `sonnet` alias can resolve to a different version than it does on the Anthropic API. If your account can't use that version, [pin your model versions](https://code.claude.com/docs/en/model-config.md#pin-models-for-third-party-deployments), including `ANTHROPIC_DEFAULT_SONNET_MODEL`.
from line 42
3242 
3343## Install the plugin
3444 
35In the VS Code extension or the desktop app, install it by following [Install a plugin](https://code.claude.com/docs/en/plugins/install.md#install-a-plugin). In a terminal, start Claude Code by running `claude`, then enter this at its prompt to install from the [official Anthropic marketplace](https://code.claude.com/docs/en/plugins/anthropic-marketplaces.md):
45In the VS Code extension or the desktop app, install it by following [Install a plugin](https://code.claude.com/docs/en/plugins/install.md#install-a-plugin).
3646 
47In a terminal, start Claude Code by running `claude`, then enter this at its prompt to install from the [official Anthropic marketplace](https://code.claude.com/docs/en/plugins/anthropic-marketplaces.md):
48 
3749```text theme={null}
3850/plugin install claude-security@claude-plugins-official
3951```
4052 
41The command opens the plugin's details, where you choose an [installation scope](https://code.claude.com/docs/en/plugins/install.md#install-a-plugin) to start the install.
53The command opens the plugin's details, where you choose an [installation scope](https://code.claude.com/docs/en/plugins/install.md#install-a-plugin) to start the install. Choose user scope to have the plugin in every project.
4254 
4355If the install fails, match the message Claude Code reports:
4456 
from line 63
5163 
5264### Update the plugin
5365 
66If a command or option doesn't work, [check](https://code.claude.com/docs/en/plugins/install.md#install-a-plugin) that you have version 0.13.0 or later of the plugin.
67 
5468To update the plugin yourself, see [Update plugins now](https://code.claude.com/docs/en/plugins/install.md#update-plugins-now). Claude Code also [updates the plugin automatically](https://code.claude.com/docs/en/plugins/install.md#keep-plugins-updated) unless auto-update is turned off.
5569 
5670### Uninstall the plugin
from line 73
5973 
6074## Scan and fix your codebase
6175 
62The plugin adds one command, `/claude-security`, which opens a menu of its 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:
76At the Claude Code prompt, `/claude-security` opens a menu of jobs, such as scanning the codebase, scanning a set of changes, and suggesting patches. The happy path runs a full scan, then turns its findings into patches:
6377 
64**1. Open the Claude Security menu**
78**1. Start from a clean working tree**
6579 
66Run `/claude-security` and pick **Scan codebase**.
80If you want patches later, commit all your changes and untracked files, or stash them with `git stash -u` from your shell until the scan ends.
6781 
68**2. Choose what to scan**
82**2. Open the Claude Security menu**
6983 
84Start Claude Code in your repository, run `/claude-security`, and pick **Scan codebase**.
85 
86**3. Choose what to scan**
87 
7088The 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.
7189 
72**3. Confirm the run**
90**4. Confirm the run**
7391 
7492A 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.
7593 
76**4. Read the report**
94**5. Read the report**
7795 
78While the scan runs, it reports each stage as it starts, with the detail available under [`/workflows`](https://code.claude.com/docs/en/workflows). Results are written to a timestamped directory in your repository, described in [Read the scan results](#read-the-scan-results).
96When the scan starts in a terminal session, the plugin's [live view](#watch-a-running-scan), on by default, opens with a live map of the code. You can also follow each stage with [`/workflows`](https://code.claude.com/docs/en/workflows#watch-the-run) in the terminal. Results are written to a timestamped directory in the folder where you started Claude Code, described in [Read the scan results](#read-the-scan-results).
7997 
80**5. Turn findings into patches**
98**6. Turn findings into patches**
8199 
82Run `/claude-security` again and pick **Suggest patches**, then choose which findings to address. Reviewed patches are written to the report's `patches/` folder; [Fix findings](#fix-findings) covers how each patch is built and reviewed.
100Run `/claude-security` again and pick **Suggest patches**, then choose which findings to address. Reviewed patches are written to the report's `patches/` folder; [Fix findings](#fix-findings) covers how each patch is built and reviewed, and what to check afterward.
83101 
84**6. Apply the patches you accept**
102**7. Apply the patches you accept**
85103 
86Apply each patch from your shell with `git apply`, in its own pull request. Patches are never applied automatically.
104Read each patch's [note](#patches-are-never-applied-automatically), then apply the patch from your shell at the root of your repository with `git apply`, in its own pull request. Patches aren't applied automatically.
87105 
88You don't have to start from the menu: ask for a job directly, as arguments to the command, such as `/claude-security scan my branch`, or in plain language, such as "scan commit abc1234". The plugin works best in [auto mode](https://code.claude.com/docs/en/permission-modes.md), which lets the scan's agents proceed without a permission prompt at each step.
106You can also ask for a job directly, as arguments to the command, such as `/claude-security scan my branch`. Or ask in plain language, such as "scan the whole repo with the Claude Security plugin". The plugin works best in [auto mode](https://code.claude.com/docs/en/permission-modes.md), which lets the scan proceed without a permission prompt at each step.
89107 
108### Watch a running scan
109 
110When you start a scan in a terminal session, the plugin's [mod](https://code.claude.com/docs/en/plugins/mods/overview.md) opens a live view of the scan in a pane or a band above the prompt. You need Claude Code v2.1.292 or later.
111 
112* **Close it**: press `Ctrl+X X` to shrink the pane to a band, and again to hide the band
113* **Reopen it**: enter `/claude-security-view` while the scan runs
114* **Turn it off**: enter `/plugin configure claude-security` and change **Live scan view**
115 
116### Continue a stopped scan
117 
118If a scan in your session stops before it writes its report, you can continue it, unless the session says that safeguards stopped one of the scan's agents. In that case, start a new scan instead.
119 
120To continue, leave your checkout and the scan's `CLAUDE-SECURITY-<timestamp>/` directory unchanged, and enter `/claude-security continue the scan` in the session that ran it. If you closed that session, [resume it](https://code.claude.com/docs/en/sessions.md#resume-a-session) first.
121 
90122### Scan only your changes
91123 
92When your branch has commits its base doesn't, the `/claude-security` 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, such as "scan commit abc1234". Only committed changes are scanned: commit or stash in-progress edits first, or run a full scan, which reads the working tree.
124When your branch has commits its base doesn't, the `/claude-security` menu offers to scan only that diff, so you can check a branch before merging. Before a change scan, commit the edits you want scanned and stash the rest with `git stash -u`, or run a [full scan](#scan-and-fix-your-codebase), which reads the working tree.
93125 
94Change scans need a git repository; full scans of an unversioned directory still work. Finding your open pull requests is offered only when your session already has permission to run the GitHub CLI and `gh` is signed in.
126To scan one of your open pull requests or a single commit, check it out from your shell first, then ask at the Claude Code prompt:
95127 
128* **Pull request**: run `git checkout feature-auth`, naming the pull request's branch, then `/claude-security scan my branch`
129* **Single commit**: run `git checkout abc1234`, then `/claude-security scan commit abc1234`
130 
96131### Scope large repositories
97132 
98133On a large repository, 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 wasn't examined. Run another scan on a different area anytime.
from line 136
101136 
102137Scan effort sets how deep a scan goes. Your findings go through the same independent verification at `low`, `medium`, and `high`.
103138 
104* **`low`**: a quick first look. It skips the architecture map and the threat model when you scan your codebase.
139* **`low`**: a quick first look. It skips the architecture map when you scan your codebase.
105140* **`medium`**: the default.
106141* **`high`**: what `medium` does, plus more hunting for vulnerabilities in the same code.
107142 
108Name the scan effort in your request at the Claude Code prompt, such as `/claude-security scan my public API code at high` or `/claude-security scan my branch at high`.
143Name the scan effort in your request at the Claude Code prompt, such as for a part of your codebase or for your changes:
109144 
145* **Part of your codebase**: `/claude-security scan my public API code at high`
146* **Your changes**: `/claude-security scan my branch at high`
147 
110148If a scan of a large repository finds less than you expect, choose `high` scan effort, scan a second time, or do both. Each can report findings that one `medium` scan doesn't.
111149 
150A codebase scan can cost a lot of tokens, and the cost grows with the size of the repository, the scan effort, and the model. To spend less, scan a [smaller area](#scope-large-repositories), choose `low`, or [change the model](#models-and-providers) before you start.
151 
152### Run a more thorough change scan
153 
154Replace the [scan effort](#choose-a-scan-effort) with `--change-scan-effort high`, such as `/claude-security scan my branch --change-scan-effort high`. More agents read the change than at `high` scan effort, so the scan takes longer and costs several times as much. Its report also lists vulnerabilities older than the change.
155 
156### Tell a scan about your system
157 
158To give a scan facts about your system, name up to 10 files in the folder that you scan or type your own notes.
159 
160Give them in your request, or when the scan asks:
161 
162```text theme={null}
163/claude-security scan this repository, and read docs/arch.md first
164```
165 
166Give only notes and files that are up to date and that you trust, because a wrong statement can hide a vulnerability. Keep your README and `SECURITY.md` up to date too, because the scan weighs what they say about trusted users and intended behavior.
167 
168To [get patches](#scan-and-fix-your-codebase) from this scan, commit the files that you name instead of stashing them.
169 
112170### Read the scan results
113171 
114Every scan writes its results into a timestamped `CLAUDE-SECURITY-<timestamp>/` directory in your repository:
172After a scan in your session, find its results in a timestamped `CLAUDE-SECURITY-<timestamp>/` directory in the folder where you started Claude Code:
115173 
116174* **`CLAUDE-SECURITY-RESULTS.md`**: the report, with each finding's ID, such as `F1`, plus its impact, exploit scenario, severity, confidence, and recommendation
117175* **`CLAUDE-SECURITY-RESULTS.jsonl`**: the same findings in machine-readable form, one JSON object per line
from line 176
118176* **`CLAUDE-SECURITY-RESULTS.sarif`**: the same findings as a [SARIF 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) log for GitHub code scanning and any other tool that reads the standard. The scan classifies findings under their [CWE](https://cwe.mitre.org/) weakness categories
119177* **`CLAUDE-SECURITY-REVISION-<commit>.json`**: the revision stamp, recording which commit was scanned, at what [scan effort](#choose-a-scan-effort), whether uncommitted changes were part of the scanned tree, and how thoroughly the run was verified. A scan outside version control stamps `UNVERSIONED` in place of the commit
120178 
121That 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 a report in history for an audit trail, delete that one `.gitignore` file and commit the directory like any other.
179That directory is the only change a scan makes to your checkout, and it carries its own `.gitignore`, so a stray `git add` doesn't sweep a report into a commit. Some packaging and deploy tools don't read that file, so move report directories out while you package or deploy. To keep a report in history for an audit trail, delete that one `.gitignore` file and commit the directory.
122180 
123181Findings only appear in the report after independent verifier agents analyze them, which keeps reports short and worth reading. Scans are nondeterministic: two scans of the same code can surface different findings. Run scans regularly.
124182 
125183## Fix findings
126184 
127Start the fix flow by picking **Suggest patches** from the `/claude-security` menu, or ask in plain language, such as "fix finding F3", then pick which findings from the report to address. Patches are built against committed code, and the report has to still describe the code you have: findings whose code has since changed are 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 a patch yourself.
185Start the fix flow by picking **Suggest patches** from the `/claude-security` menu, or ask in plain language, such as "fix finding F3", then pick which findings from the report to address. Each patch is drafted in a scratch copy of your repository. An agent can still edit your own files by mistake, so run `git status` when the job ends.
128186 
129Before delivery, each patch is reviewed by an agent independent of the one that wrote it, which runs your project's tests against the change when the code has them and reads the diff on its own terms for anything new it might introduce. A patch is written only when that review can vouch that the change addresses the one finding, introduces no new vulnerability, and leaves behavior otherwise unchanged. When it can't vouch for all three, you get a short note explaining why instead of a patch.
187Before delivery, an agent independent of the one that wrote the patch reviews it. It runs your project's tests when it can, and reads the diff on its own terms for anything new it might introduce.
130188 
189That review has to vouch that the patch:
190 
191* Addresses its one finding
192* Introduces no new vulnerability
193* Leaves behavior otherwise unchanged
194 
195When the review can't vouch for all three, the plugin writes a short note explaining why instead of a patch.
196 
197### Patch from an older report
198 
199You can still use a scan's report after new commits, but only if the scanned commit is in your current history. If it isn't, take the fresh scan that the plugin offers.
200 
131201### Patches are never applied automatically
132202 
133Applying 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 explaining the change. Apply one from your shell, or ask Claude to apply it and open a pull request:
203Applying a patch is your decision. Patches are written to the report's `patches/` folder, one `F<n>.patch` per patched finding with a note beside it explaining the change. Ask Claude to apply one and open a pull request, or apply it from your shell at the root of your repository.
134204 
205Read the patch's note, `F<n>.md`, first, because it has the exact command, such as:
206 
135207```bash theme={null}
136git apply CLAUDE-SECURITY-<timestamp>/patches/F1.patch
208git -C "$(git rev-parse --show-toplevel)" apply CLAUDE-SECURITY-<timestamp>/patches/F1.patch
137209```
138210 
139When the patched code has no tests, the patch's 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.
211Apply each patch in its own pull request so it can be reviewed and tested on its own. If `git apply` refuses a patch, read its note.
140212 
213## Triage findings you already have
214 
215Vulnerability Triage checks whether the findings in a list hold up against your code. The list can be a SARIF 2.1.0 file from another scanner, or the `CLAUDE-SECURITY-<timestamp>/` directory of an earlier scan. Triage only a list from a source that you trust.
216 
217If you want patches later, leave nothing uncommitted or untracked but the list itself. Start Claude Code in the directory that the findings' file paths are relative to, usually your repository's root.
218 
219Then enter the command with the list's path:
220 
221```text theme={null}
222/claude-security triage results.sarif
223```
224 
225The report is `FINDINGS-TRIAGE.md`, in a new `CLAUDE-SECURITY-<timestamp>/` directory. Findings that the triage rejects are under **Not validated**. Check that section yourself, because the triage is more likely to reject a real finding that your list describes in only a few words. `FINDINGS-TRIAGE.sarif` beside the report is your list with the verdicts added.
226 
227To turn the report's valid findings into patches, accept the offer at the end of the triage. If you commit, pull, or switch branches first, start a new triage. See [Fix findings](#fix-findings) for what to check after a patch job.
228 
229## Create a threat model
230 
231The `/claude-security:threat-model` command drafts a threat model, a file that you can give to later scans.
232 
233Start Claude Code at the root of your repository and enter:
234 
235```text theme={null}
236/claude-security:threat-model
237```
238 
239Claude reads your code and any scan report, then asks about your system and what else it may read: folders, your [connectors](https://code.claude.com/docs/en/mcp.md), or text that you paste.
240 
241> [!WARNING]
242>
243> If you let Claude read your connectors, its search terms leave your machine, and they can include words from that report. Claude can be misled by what it reads there, or by text that you paste.
244 
245When Claude shows a draft:
246 
2471. Check it before you choose **Yes** to save it as `.claude-security/threat-model.md`, because a wrong statement can hide a vulnerability from a later scan.
2482. If there's a scan report, choose whether Claude writes `CLAUDE-SECURITY-PRECONDITIONS.md` in the report's folder. That file says whether each finding's preconditions are `met`, `not met`, or `not shown` in the sources that Claude read.
2493. When Claude finishes, enter [`/clear`](https://code.claude.com/docs/en/commands#all-commands) before you run another command of the plugin.
250 
251To be sure that a scan reads the threat model, [name it in your request](#tell-a-scan-about-your-system).
252 
253## Analyze your attack surface
254 
255An attack surface analysis examines the parts of your project that an attacker can reach, and proposes changes to shrink that attack surface.
256 
257Start Claude Code at the root of your repository, in [auto mode](https://code.claude.com/docs/en/permission-modes.md#switch-permission-modes) where it's [available](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode), and enter:
258 
259```text theme={null}
260/claude-security:attack-surface-analysis
261```
262 
263An analysis may take a long time and use a significant number of tokens. Until it ends, leave Claude Code open, and don't commit, switch branches, or edit files.
264 
265An analysis doesn't replace a [scan](#scan-and-fix-your-codebase), which looks for vulnerabilities. The analysis looks for:
266 
267* Code that the default configuration reaches but no default feature uses
268* Sensitive code reachable before login or without any user action
269* Combinations of options that silently turn off a security feature
270 
271The report is `CLAUDE-SECURITY-<timestamp>/CLAUDE-SECURITY-RESULTS.md`, in the folder where you started Claude Code. If the analysis wrote patches, `attack-surface-patches/PATCHES.md` beside it describes them. Treat findings and patches as untested until you check them yourself.
272 
273## Scan from your shell
274 
275The `claude-security` command scans the folder that you run it in, and writes the [same report](#read-the-scan-results) there. The scan runs inside the [plugin's sandbox](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/README.md#running-in-a-sandbox). It signs in with your Claude Code login or your provider's environment variables.
276 
277The sandbox runs only on Linux:
278 
279* **Linux**: you need kernel 5.19 or later on x86-64 or arm64, Python 3.10 or later, and a user other than root. On Ubuntu 24.04 or later, add `--sudo`, which sets up the sandbox with `sudo`. If your system doesn't meet these requirements, [scan in a session](#scan-and-fix-your-codebase).
280* **Windows**: add `--no-sandbox`, or the command stops
281* **macOS and WSL 2**: the command isn't supported, so [scan in a session](#scan-and-fix-your-codebase)
282 
283> [!WARNING]
284>
285> The command doesn't load your repository's `.claude/` settings or hooks, so the deny rules there don't apply. In the sandbox, your organization's [server-managed settings](https://code.claude.com/docs/en/server-managed-settings.md#security-considerations) don't apply either. If you add `--no-sandbox`, the scan runs in [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) with your user's access. See the plugin's [trust model](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/SECURITY.md#trust-model).
286 
287The plugin includes the command. To add it to your `PATH`, enter `/claude-security:install-cli` in Claude Code and follow what it prints.
288 
289Then run it in your repository, with `--sudo` or `--no-sandbox` if your system needs it:
290 
291* **Scan the codebase**: `claude-security`
292* **Scan this branch's changes**: `claude-security --changes`
293* **Scan with a full-screen view**: `claude-security --tui`, which needs Node.js 18 or later
294* **List the other options**: `claude-security --help`
295 
296The command runs in [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode), and stops if auto mode isn't available. If your Claude Code model doesn't support it, add `--model` with one that does. For any other cause, [scan in a session](#scan-and-fix-your-codebase).
297 
298## Scan pull requests in GitHub Actions
299 
300On a pull request, the plugin's GitHub Actions job scans the change, posts a review and suggested fixes, and can block the merge. It can also scan the whole repository on a schedule.
301 
302> [!WARNING]
303>
304> Use the job only in a repository where you trust everyone who can push. Anyone who adds text or code to a pull request's branch can steer the scan, have it run that code, and make it send model requests on the job's credential. By default, the job fails for a pull request from a fork.
305>
306> In a public repository, the review, the job summary, or the job's report artifact can disclose a live vulnerability. To keep findings private, [scan in your session](#scan-only-your-changes) instead.
307 
308The job needs a GitHub-hosted Linux runner on GitHub.com, and [Anthropic API access](https://platform.claude.com/docs/en/get-api-key) or a [third-party provider](https://code.claude.com/docs/en/third-party-integrations.md), because it can't sign in with a paid plan. Follow the plugin's [GitHub Actions guide](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/CI.md) to add the workflow and create a credential for this job alone. To move to version 0.13.0, put its commit after the `@` in each workflow: `d0d514288960e7a78e1a76e4a3ec694416458726`.
309 
310With the guide's sample workflow, a draft pull request from a branch of your repository passes with no scan until you mark it ready for review. A pull request from Dependabot passes with no scan too, so review its changes yourself.
311 
141312## How the plugin fits with other security tools
142313 
143The Claude Security plugin is the on-demand deep-scan layer in a defense-in-depth stack, alongside the [security guidance plugin](https://code.claude.com/docs/en/security-guidance.md), [`/security-review`](https://code.claude.com/docs/en/commands#all-commands), [Code Review](https://code.claude.com/docs/en/code-review.md), the managed [Claude Security](https://claude.com/product/claude-security) product, and your existing scanners:
314The Claude Security plugin is the deep-scan layer in a defense-in-depth stack, alongside the [security guidance plugin](https://code.claude.com/docs/en/security-guidance.md), [Code Review](https://code.claude.com/docs/en/code-review.md), the managed [Claude Security](https://claude.com/product/claude-security) product, and your existing scanners:
144315 
145316| Stage | Tool | What it covers |
146317| :- | :- | :- |
147318| In session | [Security guidance plugin](https://code.claude.com/docs/en/security-guidance.md) | Common vulnerabilities in code Claude writes, fixed in the same session |
148| On demand, single pass | [`/security-review`](https://code.claude.com/docs/en/commands#all-commands) | One-time security pass on the current branch |
149319| On demand, deep scan | Claude Security plugin | Multi-agent scan of a repository or diff, with independently reviewed findings and patches |
150320| On pull request | [Code Review](https://code.claude.com/docs/en/code-review.md), Team and Enterprise plans | Multi-agent correctness and security review with full codebase context |
321| On pull request, deep scan | [Claude Security plugin in GitHub Actions](#scan-pull-requests-in-github-actions) | Multi-agent scan of the pull request's changes |
151322| Managed | [Claude Security](https://claude.com/product/claude-security), Enterprise plan | Hosted scanning that monitors connected repositories |
152323| In CI | Your existing static analysis and dependency scanners | Language-specific rules, supply-chain checks, and policy enforcement |
153324 
154325The plugin doesn't replace your existing source-code security tools. Run it alongside static analysis, dependency scanning, and code review: it reasons about your code the way a human security researcher would, which complements the deterministic checks those tools provide.
155326 
327If your organization uses the managed Claude Security product, `/claude-security:hosted` shows its findings in your session. Before you use it, read the [requirements](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/README.md#findings-from-hosted-claude-security) and the [risks](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/SECURITY.md#findings-from-hosted-claude-security).
328 
156329## Troubleshooting
157330 
158331**The `/claude-security` menu opens with a Python warning.** The plugin needs `python3` 3.9 or later on your `PATH`. When it can't find `python3` at all, the menu warns that Claude Security won't work until one is installed; when the first `python3` on your `PATH` is older, the warning names the version it found. Install Python 3, or put a newer `python3` first on your `PATH`, then start a new session.
159332 
160**You may see a "safeguards flagged this message" notice when scanning on a Fable model.** The message names the model you're running. Fable's cybersecurity safety classifiers flag certain requests, and Claude Code re-runs a flagged request on an Opus model through [automatic model fallback](https://code.claude.com/docs/en/model-config.md#automatic-model-fallback). This is expected. When the request re-runs, the scan should still complete successfully.
333**You may see a "safeguards flagged this message" notice when scanning on a Fable model.** The message names the model you're running. Fable's cybersecurity safety classifiers flag certain requests, and Claude Code re-runs a flagged request on an Opus model through [automatic model fallback](https://code.claude.com/docs/en/model-config.md#automatic-model-fallback). This is expected. When the request re-runs, the scan should still complete successfully. If the scan stops, see [Continue a stopped scan](#continue-a-stopped-scan).
161334 
162335## Related resources
163336 
Feedback