Anthropic has launched a free Claude Code terminal plugin, “security-guidance,” that continuously reviews AI‑generated code in-session to detect and remediate security vulnerabilities before they ever reach a pull request or CI pipeline.
Designed as a lightweight yet powerful layer within a defense‑in‑depth strategy, the plugin targets common classes of weaknesses, including injection flaws, unsafe deserialization, insecure DOM APIs, and workflow‑level risks in developer repositories.
Anthropic’s security‑guidance plugin is an official Claude Code plugin that runs locally in the terminal‑based Claude Code environment and is available at no additional cost on all plans.
Once installed, it automatically attaches to coding sessions, reviewing every change Claude makes to the working tree without requiring new commands or manual triggers from developers.
The plugin focuses on AI‑generated edits, acting as a guardrail around Claude’s own coding actions while leaving human commits untouched unless routed through Claude’s Bash tool. This positions it as both an AI code‑quality layer and an application security control that runs close to where code is written.
Enable in cloud sessions and shared repositories
.claude/settings.json
{
"enabledPlugins": {
"security-guidance@claude-plugins-official": true
}
}
Three‑Layer Security Review
The plugin performs security checks at three distinct points in the development loop to minimize the chance of risky changes slipping through.
- On each file edit, it performs fast pattern matching to flag risky constructs such as dynamic code execution calls, unsafe deserialization primitives, DOM injection sinks, and edits under sensitive workflow paths, such as .github/workflows/. This check is deterministic, makes no model calls, and incurs no additional usage cost.
- At the end of each turn, the plugin computes a git diff of all changes Claude made in that interaction and sends it to a dedicated security‑focused Claude review, which runs in the background and feeds findings back to the active session for immediate remediation. This layer targets higher‑level issues, including authorization bypasses, insecure direct object references, injection vectors, server‑side request forgery, and weak cryptography.
- On each commit or push executed via Claude’s Bash integration, the plugin triggers a deeper “agentic” review that reads surrounding context, related files, and sanitization logic to validate whether an apparent issue is real before reporting it, thereby reducing false positives from pattern‑only checks.
None of these stages block writes or commits; instead, the plugin acts as an assistant that surfaces issues and proposed fixes for the coding Claude instance to apply in‑session.
Configuration, Extensibility, and Cost
To use the plugin, developers need Claude Code CLI version 2.1.144 or later, Python 3.8+ on their path, and a git repository for diff‑based reviews.
Installation is handled entirely through Claude Code’s plugin system with a single /plugin install command from Anthropic’s official marketplace, followed by optional activation via /reload-plugins and configuration in .claude/settings.json for shared or cloud environments.
Security teams can extend the plugin in two ways: a Markdown guidance file (claude-security-guidance.md) that describes repository‑specific threat models and security rules, and a patterns file (security-patterns.yaml or JSON) that adds custom regex or substring‑based checks to the per‑edit scanner. Built‑in rules cannot be turned off through these files.
However, individual layers can be turned off via environment variables, and the entire plugin can be temporarily disabled or uninstalled using standard /plugin commands.
From a cost perspective, only the end‑of‑turn and commit reviews consume model usage, with each change‑producing turn and eligible commit typically resulting in one additional Claude call, and deeper commit reviews rate‑limited per rolling hour.
The per‑edit pattern scanner remains free of usage overhead, ensuring developers can keep real‑time feedback enabled without impacting their quota.
Anthropic positions the security‑guidance plugin as the earliest line of defense in a broader security toolchain that also includes on‑demand /security-review scans, pull‑request‑level multi‑agent code review, and existing CI‑based static analysis and dependency scanners.
In practice, that means the plugin aims to reduce the volume and severity of vulnerabilities that reach PR review and CI, rather than replacing traditional AppSec controls.
For security and DevSecOps teams, the launch signals a continued shift toward AI‑assisted secure coding, where the same AI agent that accelerates development is also tasked with continuously interrogating its own output for exploitable flaws.
Follow us on Google News, LinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.





