anthropics/claude-code-security-review
Security & PrivacyAI-powered GitHub Action that reviews pull request diffs with Claude for security vulnerabilities and posts findings as PR comments.
What it is
Claude Code Security Reviewer is an Anthropic-maintained GitHub Action that runs Claude over a pull request diff and reports security issues as review comments. It is aimed at teams that want semantic, context-aware review of proposed code changes alongside conventional SAST, and it supports any programming language. The README positions it as a complement to pattern-based scanning: Claude reads the changed code in context, explains each finding, assigns severity, and suggests remediation automate security reviews with Claude Code.
Quick start
You need a Claude API key enabled for both the Claude API and Claude Code, plus permission to add a workflow file to the target repository. Create .github/workflows/security.yml with the workflow below, store the key as the CLAUDE_API_KEY repository secret, and open or update a pull request. The action analyzes the diff, uploads results, and comments findings on the relevant lines; findings-count and results-file are available as action outputs.
name: Security Review
permissions:
pull-requests: write
contents: read
on:
pull_request:
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 2
- uses: anthropics/claude-code-security-review@main
with:
comment-pr: true
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
If you already work in Claude Code, the built-in /security-review slash command provides the same analysis over pending local changes without the workflow slash commands.
Configuration
Key inputs include comment-pr (default true), upload-results (default true), exclude-directories, claudecode-timeout (20 minutes), and run-every-commit (default false; enabling it may increase false positives on large PRs). The default model is claude-opus-4-1-20250805, and other Claude model names can be supplied model names. Custom scan and false-positive-filtering instructions are read from text files whose paths you pass in, and there are deeper notes in the configuration docs.
Security and limits
The README states the action is not hardened against prompt injection and should only review trusted pull requests; for public repositories it recommends requiring maintainer approval for workflows from external contributors fork workflow controls. False-positive filtering deliberately drops some classes of findings, including denial of service, rate limiting, memory/CPU exhaustion, generic input validation without proven impact, and open redirects, so it should not be treated as a complete SAST replacement. The workflow only scans changed files in PR mode. Running the scanner locally against a specific PR relies on the separate evaluation framework, whose steps are documented in the evaluation README.
Development and license
The implementation is Python under claudecode/, with the audit script, prompt templates, filtering logic, API client, and tests. Tests run with pytest claudecode -v from the repository root. The project is MIT licensed LICENSE.
HotRepo's take
The repository appeared on HotRepo's Python daily list on 2026-11-18 with 24 stars gained that day, a total of 6,988 stars and 798 forks, and a best Python daily position of 12. Since HotRepo has no all-language daily rank or longer trend series for this project, that single snapshot supports only the day's activity, not a broader growth claim. The notable technical point is the trust boundary: the maintainers explicitly scope the action to trusted PRs because prompt injection is unaddressed, which matters more than star count for anyone considering it on public repositories.
Written by AI from the project's README, updated . The project's own docs are the source of truth.
Hacker News
You might also like
- anthropics/claude-code-actionA GitHub Action that lets Claude answer PR and issue questions and implement code changes.
- openai/codex-securityA CLI and TypeScript SDK that scans repositories for security vulnerabilities, validates findings, and proposes fixes.
- cloudflare/security-audit-skillA coding-agent skill that runs six-phase security audits and outputs schema-validated, independently verified findings.
- NVIDIA/SkillSpectorChecks an AI agent skill for malicious patterns and vulnerabilities before you let an agent run it.
- projectdiscovery/nucleiA template-driven scanner for finding known vulnerabilities and misconfigurations across web apps, DNS, networks and cloud.