Claude now reviews and fixes vulnerabilities as you write code
Anthropic introduced a security-guidance plugin for Claude Code that reviews code changes for common vulnerabilities and helps Claude identify and fix issues during the same development session.

The company says the plugin is designed to catch issues such as injection flaws, unsafe deserialization, and insecure DOM APIs before code reaches pull requests, reducing the amount of manual security review later in the development process.
Once installed, the plugin runs automatically during development sessions, without requiring developers to launch separate tools or remember additional commands.
Three security review stages
The plugin operates through three review stages integrated into the coding workflow. Each stage targets different categories of security issues, from unsafe function usage to deeper logic flaws.
The first layer runs during file edits and performs lightweight pattern checks without calling a model. The system looks for risky constructs and commonly abused libraries, including functions such as eval(), new Function(), os.system(), and child_process.exec().
The checks also target unsafe deserialization methods and browser injection patterns tied to dangerouslySetInnerHTML and .innerHTML= usage.
A second review stage activates after each model turn. At this point, Claude analyzes the complete git diff generated during the session to identify vulnerabilities that pattern matching may miss.
The documentation says the review can identify problems involving authorization bypass, insecure direct object references, injection flaws, server-side request forgery, and weak cryptography.
The deepest review runs when Claude performs commits or pushes through its Bash tool. During this stage, the system reviews surrounding files, sanitizers, and related code paths to validate findings and reduce false positives.
Developers can extend all three review layers with custom rules and repository-specific security checks.
Anthropic also noted that it has been using the plugin internally.
“Across our internal rollout and benchmarks, we’ve seen a 30–40% decrease in security-related comments on PRs opened using the plugin. The plugin serves as a lightweight first pass, catching issues before a full code review,” the company said.
Availability and requirements
The plugin is free for all users and available on all plans. Instant security checks run without model calls and do not add usage costs. Deeper reviews use the same Claude usage budget as standard requests.
The plugin requires Claude Code version 2.1.144 or later and Python 3.8 or newer. The deeper review stages work only inside git repositories, while the lightweight pattern checks can run in any directory.