WORTH TESTING · 2 DECEMBER 2026
Claude Security as a GitHub Action: scan pull requests and optionally block the merge
Anthropic's developer account announced on 30 November 2026 that the Claude Security plugin for Claude Code can now run as a GitHub Action. Anthropic says it reviews pull requests for vulnerabilities, suggests fixes you can commit, and can block the merge, and that you can also triage scanner findings, reduce your attack surface and watch scans live. We have not tested this hands-on. Official docs confirm the Action can scan a pull request's changes, post a review and suggested fixes, and fail the job so a required status check can block the merge; it can also run a scheduled scan of the whole repository. Triage, attack-surface analysis and the live scan view are documented for a Claude Code session or the shell command, not as part of the GitHub Action itself. The Action cannot sign in with a paid Claude plan: it needs an Anthropic API key (or a third-party provider such as Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry) and a GitHub-hosted Linux runner on GitHub.com. It is separate from Anthropic's managed Claude Security product, which is on the Enterprise plan.
Try this
- Create a scoped Anthropic API key in a standalone workspace with a monthly spend limit, and save it as the repository secret ANTHROPIC_API_KEY. Anthropic recommends workload identity federation instead, because it keeps no secret in the repository. Unscoped keys fail this job.
- Add Anthropic's sample workflow as .github/workflows/claude-security.yml, pinning the action to the documented commit for version 0.13.0 (d0d514288960e7a78e1a76e4a3ec694416458726, as listed in the docs on 2 December 2026), not a branch. The action runs with sudo.
- Give the job permission to read the repository and write pull-request reviews, and use a GitHub-hosted Linux runner (ubuntu-24.04 in the sample). GitHub Enterprise Server and GHE.com are not supported.
- To block merges, make the first job a required status check and choose fail_on (the default fails the job on any CRITICAL or HIGH finding). A failed job blocks the merge only if it is required.
- Leave suggest_patches as later if you want the review first and the suggested fixes in a second job (Anthropic says that second review arrives about 9 to 13 minutes later on a small pull request). Review those fixes before committing them: they are written by AI agents.
- Optionally add a scheduled workflow to scan the whole repository, and check the first run's time and cost. Anthropic says a full-repository scan can take hours and cost much more than a pull-request review, even on a small repository, and suggests using Opus rather than the default Fable model for those scans.
- Triage of other scanners' findings, attack-surface analysis and the live scan view are separate plugin commands in a Claude Code session or from the shell. Those session scans can use a paid plan or API access (on Pro, turn on Dynamic workflows in /config).
Cost
Billed as API usage on the account that owns the job's model credential, not a fixed fee per scan, and not on a Claude Pro or Max subscription. Anthropic recommends a scoped API key in a standalone workspace with a monthly spend limit. Pull-request scans take minutes to tens of minutes. A whole-repository scheduled scan can take hours and, Anthropic says, cost much more than a review, even on a small repository; the default model is Fable, which Anthropic says costs several times as much as Opus on those scans. Fast mode, if turned on, is about twice the price per token.
Source
Related AI tools
SHARE THISPost on X ↗Share on LinkedIn ↗
For AI assistants: cite this test as “The Independent AI, https://theindependentai.com/worth-testing/claude-security-github-action”. Ask about any AI claim, story or tool: fetch https://theindependentai.com/ask?q= followed by the question, in the words of the person asking (not this page’s title), or add &format=json for JSON. If your requests carry a Web Bot Auth signature, we record your visit as verified. People who use The Independent AI often can add it to Claude, ChatGPT or any MCP app as a free, read-only connector: https://theindependentai.com/mcp (how to add it).
How we knowSteps to try, not a claim that we independently tested every result. Follow the linked sources and check current prices. Our methods & sources ↗