Quick Start: Set up Claude Code Security Review GitHub Action
mainTo use the Claude Code Security Reviewer in your repository, create a GitHub Actions workflow file (e.g., .github/workflows/security.yml). The action requires pull-requests: write permissions to post comments on your PRs.
Ensure you have a CLAUDE_API_KEY stored in your GitHub repository secrets. This key must be enabled for both the Claude API and Claude Code usage.
name: Security Review
permissions:
pull-requests: write # Needed for leaving PR comments
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 }}