Claude Security Now Runs in GitHub Actions to Check Pull Requests for Vulnerabilities
Anthropic's Claude Security plugin, which until now ran only inside a Claude Code session, can now run as a GitHub Action. Once you add it to a repository's workflows, its multi-agent vulnerability scan checks new pull requests, posts fixes you can commit and, if you set it up to, blocks the merge when it finds something serious. The change came in plugin version 0.13.0 on 24 November 2026, Anthropic announced it on 30 November on its ClaudeDevs account on X, and it is in beta. Setup details are in the Claude Security documentation and the plugin's GitHub Actions guide.
What is new in Claude Security?β
Anthropic released the plugin in July 2026. Up to version 0.12.0 (September 2026), a developer had to start each scan by hand in Claude Code. Version 0.13.0 moved it into CI and added a few other tools:
| Before (up to 0.12.0) | Now (0.13.0 and later) | |
|---|---|---|
| Where scans run | Only inside a Claude Code session | A Claude Code session, a claude-security shell command, or GitHub Actions |
| Pull request reviews | Only when a developer scanned the branch by hand | Runs on new pull requests once you add the workflow, with findings posted as a review |
| Suggested fixes | Patch files saved on your machine | Also posted on the pull request, ready to commit |
| Blocking merges | Not possible | The check fails at a severity level you choose (fail_on) |
| Whole-repository scans | By hand | Also on a schedule, for example weekly |
| Checking other scanners' results | Not available | Vulnerability Triage reads their SARIF files |
| Finding code you don't need | Not available | Attack surface analysis |
Anthropic has offered a separate, simpler action for pull request security reviews since August 2025, called Claude Code Security Review. It only comments on the changed files, and it is still on GitHub.
Claude Security is also sold as a separate hosted product for Claude Enterprise customers, which has been in public beta since April 2026. The GitHub Action belongs to the plugin, which any Claude Code user can install.
How does the vulnerability scan work?β
Instead of matching code against a fixed list of rules, the scan uses several AI agents. One group maps how the application is built, others hunt for vulnerabilities across its parts, and separate verifier agents check each finding before it goes into the report. Anthropic says a finding only reaches the report after that independent check, which is meant to cut down false alarms.
Each finding comes with its impact, an exploit scenario, a severity, a confidence level and a recommendation. Findings are also sorted into CWE categories (the standard list of software weakness types), and the report is saved as a SARIF 2.1.0 file, the format GitHub code scanning reads.
How hard it looks is up to you. Scan effort can be set to low, medium (the default) or high, and more effort means more hunting and more tokens.
Anthropic hasn't published detection rates, false-positive rates or benchmarks against other scanners, so you'll have to measure how well it does on your own code.
What does a pull request review look like?β
Each scan posts one review on the pull request. It never approves the pull request and never requests changes, so a person still makes that call. The heading of the review says whether the check passed and why.
Suggested fixes can come in a second review. With the suggest_patches: later setting from Anthropic's sample workflow, they follow 9 to 13 minutes behind the first review when the pull request is small, by Anthropic's estimate. Anthropic points out that AI agents write these fixes, so you should read them before you commit them. Draft pull requests are skipped unless you turn on scan_drafts, and so are most Dependabot updates.
How do you set up Claude Security in GitHub Actions?β
Before you add it to CI, it's worth trying the plugin on your own machine. In Claude Code, run /plugin install claude-security@claude-plugins-official, then /claude-security scan my branch. That shows you what kind of findings it reports on your code before anything blocks a merge.
To set up the GitHub Action:
- Create an API key. The action can't sign in with a Claude Pro or Max subscription, so it needs Anthropic API access. In the Claude Console, create a separate workspace with a monthly spend limit, then create a key scoped to that workspace. Anthropic warns that an unscoped key fails with an HTTP 400 error.
- Save the key as a secret. In your GitHub repository, go to Settings > Secrets and variables > Actions and add it as
ANTHROPIC_API_KEY. - Allow the actions it uses. If your organisation only allows listed actions, add
anthropics/claude-code-action,oven-sh/setup-bunandactions/upload-artifact. - Add a workflow file. Create
.github/workflows/claude-security.yml. Here is a shortened version of the sample:
name: Claude Security
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]
permissions:
actions: read
contents: read
pull-requests: write
jobs:
claude-security:
runs-on: ubuntu-24.04
timeout-minutes: 240
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- uses: anthropics/claude-plugins-official/plugins/claude-security@<commit-sha>
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
fail_on: high
- Pin the version. Replace
<commit-sha>with the full commit hash given in the Claude Security docs. Anthropic says to pin a commit, not a branch name, because the action runs withsudo. - Open a test pull request and check that the review appears.
For real use, copy the full workflow from the CI guide rather than the short version above. It adds a second job for suggested fixes, cancels old runs when new commits come in, and skips Dependabot.
Storing an API key isn't the only option. The action also works with workload identity federation (which Anthropic recommends over a stored key), Amazon Bedrock, Google Cloud, Microsoft Foundry or your own model gateway.
If you'd rather see the findings next to your CodeQL alerts in GitHub's Security tab, an optional extra step uploads the SARIF report to GitHub code scanning. It needs the security-events: write permission. An alert there closes once a later scan stops reporting it, and since results vary from run to run, a closed alert doesn't always mean the bug was fixed.
How do you block a merge when it finds a vulnerability?β
The fail_on setting decides when the job fails:
fail_on value | The check fails when the scan finds⦠|
|---|---|
confident-high | a critical or high finding with high confidence |
high (default) | any critical or high finding |
medium | any critical, high or medium finding |
any | any finding at all |
never | never (report only) |
A failed job alone doesn't stop anyone from merging. To block the merge, open your branch protection rules (or rulesets) in GitHub and mark the claude-security job as a required status check.
Before you make it required, ask what happens when it flags something you've checked and decided is safe. Anthropic's guide doesn't describe a way to dismiss a finding in the action. A finding it has already commented on can keep counting in later runs until the lines it points at change, so one false alarm could hold up a pull request.
It can go wrong in the other direction too. When someone re-runs the workflow by hand, or a second pull request points at the same commit, a scan that failed earlier can end up showing as a passed check. The guide lists workflow settings that prevent this, so stay close to its sample if you rely on the check to stop merges.
If you're unsure, start with never for a week or two. You'll see how many findings it reports, and how many are real, before you let it stop merges.
Can you scan the whole repository on a schedule?β
Anthropic's guide includes a second workflow file for this, claude-security-scheduled.yml, which runs every Monday at 04:23 UTC and can also be started by hand. You read the results in the run's summary page, and this kind of scan doesn't propose fixes.
A full scan covers code that changed before the action was installed, which a pull request review never looks at. It is much slower, though. Anthropic says scanning a full repository may run for hours, while the job is capped at 360 minutes. If it runs out of time, there's no report.
How much does Claude Security cost?β
Installing the plugin costs nothing, but you pay for the model tokens each scan uses, billed to whichever account owns the API key or cloud credential in the workflow. Anthropic hasn't published a typical cost per scan.
According to the guide, a bigger codebase, a higher scan effort and a pricier model all push the cost up. Claude Fable, the default model, is several times more expensive than Opus here, and you can switch with the model setting. A scheduled scan of a whole repository costs much more than a pull request review. The separate workspace with a monthly spend limit from step 1 stops a busy week from turning into a large bill.
What are the risks and limits?β
Anthropic is unusually direct about the limits in its own guide:
- Only for trusted repositories. Whatever someone writes into a pull request is read by the agents, so it can influence what they report, and the scan may execute that code. People with push rights can also change the workflow file, spend from your API key or force the check to pass. That's why Anthropic limits it to repositories where every person who can push is trusted.
- Forks fail by default. Pull requests from forked repositories make the job fail. There is an override called
dangerously_scan_external_branches, and Anthropic says it doesn't encourage using it. - Public repositories can leak. A review comment or job summary can describe a live vulnerability to anyone who reads it. For public projects, Anthropic suggests scanning locally instead.
- Results change between runs. Scanning the same code twice may not give the same findings, and a clean result isn't proof the code is safe.
- GitHub.com only. It needs a GitHub-hosted Linux runner. GitHub Enterprise Server, GHE.com and merge queues aren't supported.
Earlier in 2026, researcher RyotaK of GMO Flatt Security showed that a single malicious GitHub issue could take over repositories through Anthropic's separate Claude Code GitHub Action, so the prompt-injection risk is real. Anthropic fixed it in version 1.0.94. The new action runs its scan in a sandbox with no network access and no GitHub token, but it can still spend your API credit.
Does it replace CodeQL, Snyk or other code scanners?β
No, and Anthropic says so in its docs. Claude Security doesn't replace static analysis or dependency scanners.
Rule-based tools like GitHub's CodeQL, Semgrep or SonarQube give the same answer every time, which makes them good merge gates. Dependency scanners like Snyk or Dependabot look for known vulnerabilities in the packages you install, which an AI code review doesn't cover. An AI scanner is better at bugs that depend on context across several files, such as a missing permission check in one route or a logic flaw in a login flow, which fixed rules tend to miss.
Because each catches what the other misses, it makes sense to run both, with rule-based scanners for repeatable checks and an AI review like this one for the harder bugs. One developer commenting on the launch suggested keeping merge blocking for repeatable checks only, and posting AI findings as comments, because re-running a failed AI scan can turn it green.
Because the scan reads source code in the checked-out repository and never touches a running copy of your app, it doesn't replace dynamic application security testing (DAST) or penetration tests against a deployed system.
How do Vulnerability Triage and attack surface analysis work?β
- Vulnerability Triage. You give it a SARIF file from another scanner, and agents check each finding (three agents per finding) and return the valid ones in the order to fix them. That could cut down the noise from tools that report hundreds of warnings, but Anthropic warns triage can wrongly reject real findings.
- Attack surface analysis. It looks for exposed code you may not need, like unused endpoints or risky default settings, and proposes patches to remove it. It takes one to two and a half hours.
Scans in the terminal now also show a live view of what each agent is doing.
What does it mean for testers and QA engineers?β
Security checks are moving into the same pull request flow where unit tests and end-to-end tests already run. If you own the CI pipeline, you'll likely be the one who sets up the workflow, picks the fail_on level and decides whether it becomes a required check.
It also adds a new kind of result to deal with. Unlike a unit test, an AI scan can pass on one run and fail on the next with the same code. Treat its findings the way you treat a flaky test (read why it failed before you re-run it), and keep a record of which findings were real. After a few weeks you'll know whether it is worth a required check, and at which level.