Anthropic Releases Free Security Plugin for Claude Code Terminal to Detect Vulnerabilities
Key Takeaways Anthropic has launched a free security-guidance plugin for its Claude Code terminal. The plugin integrates real-time vulnerability detection directly into the AI-assisted development...
Key Takeaways
- Anthropic has launched a free security-guidance plugin for its Claude Code terminal.
- The plugin integrates real-time vulnerability detection directly into the AI-assisted development workflow.
- It operates across three distinct review stages: per-file edit, end-of-conversational turn, and pre-commit/push.
- Internal testing indicates a 30-40% reduction in security-related pull request comments.
- The plugin is designed as a defense-in-depth layer, not a standalone security solution, and requires Claude Code CLI v2.1.144+ and Python 3.8+.
Anthropic has unveiled a new, complimentary security-guidance plugin for its Claude Code terminal environment. This innovative tool is engineered to proactively identify and flag potential vulnerabilities in code edits, model outputs, and commits, integrating security checks directly into the development cycle before code reaches production.
Table Of Content
The plugin is freely accessible to all users across every plan, representing a significant advancement in “shifting left” security practices within AI-powered software development workflows.
Three-Layer Defense Integrated into Claude Code
The security-guidance plugin employs a multi-faceted approach, implementing three distinct review checkpoints to detect threats at various stages of a coding session.
Upon every file modification, the plugin executes a rapid, deterministic pattern matching process that does not involve an AI model call. This initial layer targets and flags hazardous constructs such as eval(), new Function(), os.system(), child_process.exec(), pickle deserialization, and DOM injection vectors like dangerouslySetInnerHTML and .innerHTML=. Crucially, because this layer avoids AI inference, it incurs no additional usage costs.
Following each conversational turn, a dedicated background Claude model, separate from the one generating the code, performs a comprehensive review of the entire Git diff, encompassing all modifications made during that session. This independent reviewer begins with a fresh context, uninfluenced by the original coding approach, enabling it to identify logic-level vulnerabilities that simple string matching would miss. These include issues like authorization bypasses, insecure direct object references (IDOR), server-side request forgery (SSRF), and weak cryptographic implementations.
We’ve shipped a security-guidance plugin for Claude Code that helps identify and fix vulnerabilities as you’re writing code.
Available for all Claude Code users. Install from the plugin marketplace (/plugins). pic.twitter.com/LprgC4m6Kf
— ClaudeDevs (@ClaudeDevs) May 26, 2026
When Claude initiates a commit or push command via its Bash tool, a more in-depth, agentic review is triggered. This process analyzes surrounding callers, sanitizers, and related files to minimize false positives and provide a more contextual assessment.
Internal evaluations by Anthropic demonstrated that the plugin reduced security-related comments on pull requests by an impressive 30-40%. This positions the plugin as an effective in-session complement to Claude Code’s existing pull request Code Review functionality.
The plugin leverages Claude Opus 4.7 by default for both the end-of-turn and commit-time reviews. Developers, however, retain the flexibility to configure alternative models using the SECURITY_REVIEW_MODEL and SG_AGENTIC_MODEL environment variables.
The industry has largely welcomed this approach, with prominent executives such as J.P. Morgan’s Shalini Goyal emphasizing the significant value of embedding security guidance directly into the coding process, thereby reducing reliance on traditional, downstream review cycles.
Installation and Customization
Integrating the plugin into a Claude Code session is straightforward, requiring a single command:
/plugin install security-guidance@claude-plugins-official
/reload-plugins
Developers can further tailor the plugin’s behavior through two repository-level files. A .claude/claude-security-guidance.md file allows for the definition of plain-language threat model rules, which are then fed to the model reviewers. Additionally, a .claude/security-patterns.yaml file enables the specification of custom regex or substring patterns for the per-edit checks.
Organizations can enforce the plugin’s usage across all team members by declaring it within .claude/settings.json. Administrators also have the option to implement it organization-wide through managed settings.
The plugin necessitates Claude Code CLI version 2.1.144 or newer, along with Python 3.8+ accessible on the system PATH. Upon its initial execution, it establishes a virtual environment under ~/.claude/security/ and installs the Claude Agent SDK, which facilitates the agentic commit reviews.
An open-sourced reference repository on GitHub, specifically anthropics/claude-code-security-review, showcases agents autonomously detecting and remediating issues, including SQL injection, XSS, remote code execution (RCE) via deserialization, insecure direct object references, and hardcoded credential detection.
It is important to note that Anthropic explicitly positions this plugin as one component within a broader defense-in-depth strategy, not a comprehensive security solution. It does not automatically block writes or commits; instead, findings are presented as actionable instructions for Claude to address within the same session.
What You Should Do
- If you are a Claude Code user, consider installing the security-guidance plugin immediately to enhance your development security posture.
- Familiarize yourself with the plugin’s three-layer defense mechanism to understand its capabilities and limitations.
- Leverage the customization options via
.claude/claude-security-guidance.mdand.claude/security-patterns.yamlto tailor the plugin to your project’s specific threat model and coding standards. - Ensure your Claude Code CLI is updated to version 2.1.144 or later, and Python 3.8+ is configured on your system PATH to meet the plugin’s prerequisites.
- Remember that this plugin is a valuable layer of defense, but it should complement, not replace, other security practices such as comprehensive code reviews, static application security testing (SAST), dynamic application security testing (DAST), and penetration testing.
Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.



No Comment! Be the first one.