How to install · Plugin documentation · Download source (ZIP)
Claude Security reviews your code or changes, independently checks findings and writes a report. It can separately prepare patch files for you to review before applying them.
What it is useful for
Use it before launching an app or merging a new feature. For example, after adding an account area, review server-side data access and authorization. Choose the repository, a specific area, branch changes or one commit.
This page covers the plugin inside Claude Code, not the separate hosted Claude Security product. It runs in the current session without its own daemon and with that session's permissions. The plugin license permits use with Anthropic products; do not port its code, skills or workflows to Codex. For Codex, see the separate MIT-licensed Cloudflare security-audit-skill.
How to install it in Claude Code
You need Claude Code and Python 3.9 or newer. Scanning changes and suggesting patches require a Git repository. In Claude Code chat, run these commands after reviewing the plugin's contents and installation scope:
/plugin install claude-security@claude-plugins-official
/reload-plugins
If the official marketplace is missing, check /plugin and add anthropics/claude-plugins-official using the marketplace instructions. These are Claude Code commands, not Codex or shell commands. Once active, open /claude-security. The menu offers Scan codebase, Scan changes and Suggest patches.
The plugin adds no isolation: the session's settings, hooks and permissions still apply. For an unfamiliar repository, isolate the entire session using the official documentation first; do not run unknown code alongside working credentials. Use your own project and dummy data for the first trial.
How to run a first review
- The assistant finds your project, branch and changes. If no scope is selected, it asks which to review, such as record access in an account area. It proposes scope and effort. Agree on the stated time and token cost before starting. A focused review is not a whole-repository scan.
- After approval, the assistant chooses Scan changes or Scan codebase for the intended scope. The plugin examines code and sends candidates to independent verifier agents. A diff review covers flaws the change participates in, not every existing flaw. Read the conditions, evidence and excluded areas.
- Request Suggest patches for a confirmed finding. The plugin develops the fix in a separate scratch copy, reviews it and saves a patch or an explanation of why no patch was produced. Review the file and tests; application, commits and deployment require a separate request.
If the project's tests did not exercise the changed code, the patch note should say so. Independent source review and a passing regression test are different forms of evidence.
How to read the report and control usage
The timestamped CLAUDE-SECURITY folder contains a readable report, result files for other tools (JSONL and SARIF) and a source revision stamp. A dirty suffix indicates uncommitted changes. Compare conclusions with that version: later edits may make the report stale.
Each finding should identify conditions, source location, impact and a recommendation. Coverage lists exclusions and scope. Zero findings describes the completed review, not every behavior of the app. Keep ordinary tests, dependency checks and user-access checks alongside it.
Before sharing a report, check it for secrets and personal data even if values were replaced with REDACTED. The output directory has its own .gitignore, so reports and patches need not enter an ordinary commit accidentally.
Effort and scope affect Claude Code usage. Start with a specific change. The plugin sends usage counts through Claude Code telemetry; its README documents DISABLE_TELEMETRY=1 and other supported opt-out settings. CLAUDE_SECURITY_SCAN_TIP=off disables the post-push scan suggestion, not telemetry itself.
What you get and how to continue
The result is a report tied to the chosen revision and, when requested, separate patch files. A prepared patch does not mean the working version is fixed. After applying it, recheck the flaw and neighboring behavior; continue with fixing a project bug.
Disable Claude Security on the Installed tab in /plugin, selecting the intended scope. Keep or delete reports separately after reviewing them. Disabling the plugin does not revert an applied patch or disable other connections.
Prompt for Claude Code
Paste into Claude Code with the plugin installed. This prompt is specifically for that client:
Help review my project's security with the installed Claude Security plugin. Find the rules, current branch, changes and previous reports. If I have not named a scope, ask whether to review my whole codebase or a specific change. Do not start a broad run before agreeing on scope, effort and the displayed cost.
Check the session conditions and Python availability. Use the official Claude Security plugin documentation. Do not execute unfamiliar code without isolating the whole session or test production services using real customer data.
Run the chosen Scan changes or Scan codebase job. Show the report, source revision, coverage, exclusions and evidence. Check results for real keys and personal data before displaying them. Distinguish independent finding verification, source review and tests that actually ran.
If I request fixes, use Suggest patches for confirmed findings in a current report. Keep them as separate files and explain changes and tested behavior. Do not apply, commit, push or deploy patches without a separate request. If tests did not exercise the changed area, identify the missing check.
