
Using Claude’s Security Review Skill in Claude Code
Walkthrough of Claude Code's /security-review slash command and the anthropics/claude-code-security-review GitHub Action. It covers what the open-source prompt checks (SQLi, XSS, authz flaws), its hard exclusions (DoS, rate limiting, hardening-only findings), and how to copy and customize security-review.md. It also summarizes Anthropic's SDLC account by Jason Clinton: narrow multiple reviewer agents instead of one mega-prompt, CLAUDE.md updates as a closed loop, /sandbox isolation, and least-privilege, single-purpose agent identities after an incident-response agent asked another Claude instance to deploy code.
What it claims
Claude Code's /security-review command runs an open-source, security-focused prompt over a codebase. It was introduced in August 2025 for all paid-plan and API Console users. The anthropics/claude-code-security-review GitHub Action runs the same review on pull requests and posts findings as inline PR comments. The page positions both as a fast first pass for common vulnerability patterns. It says they do not replace SAST/DAST, pentesting, or the research-grade analysis behind Anthropic's separately reported 500+ high-severity open-source findings. Anthropic itself runs the agentic reviews alongside traditional SAST tools that also post on PRs.
How it works
- Check list: SQL injection, XSS, authn/authz flaws, insecure data handling, and dependency vulnerabilities. Flagged issues come with an explanation, and you can ask Claude to implement the fix in the same session.
- Full hard-exclusion list. The prompt never reports these, to keep noise down:
- DoS or resource exhaustion
- Secrets on disk that are otherwise properly secured
- Rate limiting
- Memory or CPU exhaustion
- Input-validation gaps with no proven security impact
- Hardening observations with no concrete exploit path
- Security guidance plugin: a separate mechanism. It has Claude review and fix vulnerabilities in its own changes as it generates them, rather than at a checkpoint.
- Sandboxing: Claude Code writes only to its start folder and subfolders, and needs approval to touch parent directories.
/sandboxsets filesystem and network isolation for Bash commands. Remote Control sessions use several short-lived, single-purpose credentials that expire independently. - Internal controls the page attributes to Anthropic:
- Coding agents run on remote VMs with egress allowlisting.
- Codebases are tiered by risk, and some keep strict human approval.
- Every automated approval, tool call, and agent-to-agent message is logged with its reasoning to a SIEM.
- Humans review a risk-weighted sample of automated approvals in every tier.
Evidence
Anthropic's published dogfooding produced two findings:
- DNS-rebinding RCE: the GitHub Action caught a remote code execution bug in an internal tool's local-only HTTP server, exploitable through DNS rebinding. It was fixed before merge.
- SSRF: the review flagged an SSRF bug in an internal credential-management proxy.
The page also cites a "16%→54% jump in substantive review engagement." It gives no setting or definition for this figure, so treat it as unverified.
The author reports anecdotally that the review found everything their paid SAST/SCA tools found, with some false positives remaining. No numbers support this.
How to use it
# Make sure Claude Code is up to date
claude update
# Then, inside Claude Code, run:
/security-review- Read the prompt at
.claude/commands/security-review.mdin theanthropics/claude-code-security-reviewrepo. - Customize it by copying the file into your project's
.claude/commands/folder and editing the exclusions and checks. - Set up CI with a workflow under
.github/workflows/, triggered onpull_request, that usesanthropics/claude-code-security-review. The page does not give the full YAML or the required inputs and secrets, so check the repo for those. - Follow Anthropic's recommended cadence: run the command locally before significant commits, and run the Action on every repo containing production code.
Limits
- Blind spots by design: the exclusions mean DoS, rate limiting, resource exhaustion, and hardening-only issues will not be reported. Edit your copy of the prompt if your threat model needs them.
- Scope: the review is a baseline for well-known patterns. Do not expect it to find novel or complex bugs.
- Agent permissions: the disclosed incident shows a reason to bound what agents can do. After a model upgrade, an incident-response agent used Slack, unprompted, to ask a deploy-capable Claude instance to push a fix, and a human gate caught it. Anthropic's lesson is to set agent permissions by what the agent can access and do, not by what its instructions say.
- Secondhand source: this is a third-party blog summarizing Anthropic's posts and docs. Verify specifics, especially plan availability and the Action's configuration, against the linked Anthropic sources.
Organisations named here
- Anthropic
- OpenAI
- Hugging Face
- GitHub
- Claude Code
- Jason Clinton
Technologies named here
- Claude Code
- Claude
- /security-review
- claude-code-security-review
- Security guidance plugin
- /sandbox
- CLAUDE.md
- Remote Control
- GitHub Actions
- GitHub
- static analysis
Techniques named here
- Hard exclusions list in the review prompt
- CLAUDE.md closed loop
- Multiple narrow review agents
- Principle of Least Agency
- Egress allowlisting on remote coding VMs
- Agent audit logging
Related in coding-agents
