Skip to content

Claude Code Security Review #13

Claude Code Security Review

Claude Code Security Review #13

name: Claude Code Security Review
on:
pull_request_review:
types: [submitted]
workflow_dispatch: # temporary: manual trigger for testing
permissions:
contents: read
pull-requests: write
jobs:
security-review:
if: github.event_name == 'workflow_dispatch' || github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- uses: anthropics/claude-code-security-review@main
id: scan
with:
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
- name: Fail if security findings
if: steps.scan.outputs.findings-count > 0
run: |
echo "::error::Security review found ${{ steps.scan.outputs.findings-count }} finding(s). Review the comments on this PR."
exit 1