Run End-to-End Tests from Your Terminal with Kane CLI
Author and Run Tests Right from the Terminal in Natural Language, with an Evidence-Backed Pass or Fail from a Real Browser.
npm install -g @testmuai/kane-cli
Claude Security Plugin in GitHub Actions: Setup and Limits
Anthropic's Claude Security plugin now runs as a GitHub Action that reviews pull requests, suggests fixes and blocks merges. Setup, fail_on levels and limits.
A pull request adds an invoice search endpoint, and line 42 of api/invoices.py drops the q parameter straight into an f-string SQL query. Before anyone approves it, a GitHub check posts a review: HIGH severity, high confidence, CWE-89, and a one-line fix to a parameterized query behind a Commit suggestion button. That is the example Anthropic used when it announced that the Claude Security plugin for Claude Code now runs as a GitHub Action.
You can now run the Claude Security plugin for Claude Code as a GitHub Action. It reviews your pull requests for vulnerabilities, suggests fixes you can commit, and can block the merge.
- ClaudeDevs (@ClaudeDevs) November 30, 2026
You can also triage scanner findings, reduce your attack surface, and watch scans live.
SQL injection makes a fair demo: CWE-89 ranks #2 in MITRE's CWE Top 25 list of the most dangerous software weaknesses, with a score of 28.72, up one place on the previous list.
The job reviews each non-draft pull request for vulnerabilities, posts fixes you can commit, and fails a status check that blocks the merge once you make it required. It runs only on GitHub-hosted Linux runners, and it bills an Anthropic API key or a cloud provider credential instead of a Claude subscription.
TL;DR
The Claude Security plugin is Anthropic's multi-agent vulnerability scanner for Claude Code. Since November 30, 2026, it also runs as a GitHub Action that scans each pull request's changes, posts a review with suggested fixes you can commit, and fails a status check that can block the merge.
What the GitHub Action Does
- Pull request review: The Claude Security GitHub Action scans the changes in each non-draft pull request and posts one comment review, never an approval. With suggest_patches set to later, a second job posts the suggested fixes. GitHub-hosted Linux runners only: Yes.
- fail_on: The fail_on input sets which findings fail the Claude Security job: confident-high, high (the default), medium, any or never. Blocks the merge on its own: No, only when the job is a required status check.
- Scheduled scan: A second Claude Security workflow scans the whole repository on a cron schedule and writes its report to the job summary. Suggested fixes: No. A scheduled scan can take hours on a large repository.
What It Needs and Where It Stops
- Claude API key: The Claude Security GitHub Action accepts a Claude API key scoped to one Claude Console workspace, ideally a standalone workspace with a monthly spend limit. Claude subscription sign-in: No.
- Workload identity federation: Anthropic's recommended sign-in for the Claude Security job, because it keeps no secret in the repository. Stored API key needed: No.
- Cloud providers: The Claude Security job can also run its scan through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, with that account serving the models the scan uses.
- Fork pull requests: The Claude Security job fails a pull request from a fork by default, because its author could steer the scan and spend the model credential. Scanned by default: No.
- Draft and Dependabot pull requests: In Anthropic's sample workflow, both pass the Claude Security check with no scan behind them. Scanned by default: No.
- Runtime behavior: The Claude Security scan reads code and may run tests in a sandbox with no network. Exercises the deployed app: No. Kane CLI by TestMu AI adds that runtime check as a separate required job.
What Is the Claude Security Plugin?
The Claude Security plugin runs a multi-agent vulnerability scan inside Claude Code: agents map your architecture, hunt for vulnerabilities, and independently review every finding before it reaches the report, according to the Claude Security plugin docs. It is one of the Claude Code plugins in Anthropic's official marketplace, and you install it with /plugin install claude-security@claude-plugins-official.
The plugin README describes it as the in-session version of Claude Security, Anthropic's hosted product for vulnerability detection and patching. Each finding in its report lists the impact, exploit scenario, preconditions, severity, confidence and a recommendation, with severity rated CRITICAL, HIGH, MEDIUM or LOW along the lines of the CVSS v4.0 qualitative scale. The same findings ship as JSONL and as a SARIF 2.1.0 log that GitHub code scanning reads.
In the research preview described in Anthropic's Claude Code Security announcement, its team used Claude Opus 4.6 to find over 500 vulnerabilities in production open-source codebases, bugs that had gone undetected for decades despite years of expert review.
Anthropic's docs place the plugin as the deep-scan layer between the in-session security guidance plugin and the managed Claude Security product, alongside the scanners you already run in CI.
| Tool | When it runs | What it covers | Availability |
|---|---|---|---|
| Security guidance plugin | In your session, as Claude writes code | Common vulnerabilities in code Claude writes, fixed in the same session | Claude Code plugin |
| Claude Security plugin | On demand, in a session or from the claude-security shell command | Multi-agent scan of a repository or a diff, with independently reviewed findings and patches | Paid plan, Anthropic API or a third-party provider |
| Claude Security plugin in GitHub Actions | On each pull request, plus optional scheduled scans | Multi-agent scan of the pull request's changes, a review with suggested fixes, and a merge gate | Anthropic API key, workload identity federation or a cloud provider |
| Code Review | On each pull request | Multi-agent correctness and security review with full codebase context; see Claude Code review | Team and Enterprise plans |
| Claude Security (managed) | Continuously, after a baseline scan | Hosted scanning that monitors connected repositories, including scans on Claude Mythos models | Claude Enterprise, public beta |
| Static analysis and dependency scanners | In CI | Language-specific rules, supply-chain checks and policy enforcement | Your existing tools |
| Kane CLI by TestMu AI | In CI, against a running build | Runs the app in a real Chrome browser and checks what a user sees | TestMu AI account |
The managed product's continuous scanning, which the plugin does not do, is covered in this short TestMu AI video.
What Does the Claude Security GitHub Action Do?
On a pull request, the job scans the change, posts one comment review (never an approval or a request for changes), and passes or fails its check. With suggest_patches: later, a second job posts the suggested fixes about 9 to 13 minutes after the first review on a small pull request, per the plugin's GitHub Actions guide.
The same guide also documents a scheduled scan of the whole repository, which runs from a second workflow file on a cron schedule or a manual run.
| Attribute | Pull request review | Scheduled scan |
|---|---|---|
| Use it to | Catch flaws before they merge | Find flaws in code that merged before the action, or that a review missed |
| Scans | Each pull request's changes | The whole repository |
| Result | A review, then its suggested fixes | A report in the job summary, with no suggested fixes |
| Time | Minutes to tens of minutes, based on pull request size | Minutes to hours, based on repository size and model |
| Fails the job on | fail_on, default high | scheduled_fail_on, which follows fail_on unless set |
The announcement also pointed to jobs you start from a Claude Code session rather than from CI:
- Vulnerability Triage -
/claude-security triage results.sarifchecks another scanner's SARIF findings against your code and lists the ones it rejects under Not validated, so you can check those yourself. - Attack surface analysis -
/claude-security:attack-surface-analysislooks for code the default configuration reaches but no default feature uses, sensitive code reachable before login, and option combinations that silently switch off a security feature. - Live scan view - in Claude Code v2.1.292 or later, a terminal pane maps the scan while it runs, and
/claude-security-viewreopens it after you close it.
To track findings as GitHub code scanning alerts, add security-events: write to the workflow's permissions and upload the job's SARIF file with github/codeql-action/upload-sarif.
How the Plugin Job Differs From claude-code-security-review
The claude-code-security-review Action is the CI counterpart of Claude Code's /security-review command. Its README says it is not hardened against prompt injection and should only review trusted pull requests.
| Attribute | claude-code-security-review | Claude Security plugin job |
|---|---|---|
| Workflow reference | anthropics/claude-code-security-review@main | anthropics/claude-plugins-official/plugins/claude-security, pinned to a release commit |
| How findings are checked | A Claude Code review of the diff, then a false-positive filter | A team of agents, with independent verifiers that try to disprove every finding |
| Default model | Claude Opus 4.1 | Fable |
| Merge gate | Comments on the pull request and outputs a findings count; no documented fail threshold | fail_on fails the job, and a required check blocks the merge |
| Fixes | Remediation guidance in the comments | Suggested changes you can commit, in a second review |
| Fork pull requests | Recommends requiring approval for external contributors | Fails the job unless you set dangerously_scan_external_branches |
| Whole-repository scans | Not covered | A second workflow on a cron schedule |
| Results file | A JSON results artifact | A SARIF 2.1.0 log that you can upload to GitHub code scanning |
If a repository already runs the older Action, add the plugin job in its own workflow, compare both reviews on a handful of pull requests, then move the required check to the plugin job.
How to Set Up the Claude Security GitHub Action
- Create a scoped credential - create a Claude API key in a standalone Claude Console workspace with a monthly spend limit, scope the key to that workspace (unscoped keys fail the job with HTTP 400), and save it as the repository secret
ANTHROPIC_API_KEY. The GitHub Actions secrets guide covers how secrets reach a job. Anthropic recommends workload identity federation instead, because it keeps no secret in the repository. - Allow the actions it calls - if your organization allows only listed actions, also allow
anthropics/claude-code-action,oven-sh/setup-bunandactions/upload-artifact. - Add the workflow - save the file below as
.github/workflows/claude-security.yml. It is a trimmed copy of Anthropic's pull request sample, with the release commit filled in. - Pin the release - keep a full commit after the
@, never a branch, because the action runs with sudo. Nothing warns you when a newer release ships, so check the commit the Claude Security docs list before each upgrade. - Try it on a real flaw - open a non-draft pull request that adds the workflow, and add an obvious flaw to code your product runs, such as a shell command built from a request parameter. A flaw in unused code can go unreported. Remove it before you merge.
- Make it required - add the
claude-securityjob as a required status check in your branch protection rule or ruleset. That is the step that lets the job block a merge.
# .github/workflows/claude-security.yml
name: Claude Security plugin
on:
pull_request:
# Drafts pass with no scan, so keep ready_for_review to scan them when they are marked ready.
types: [opened, synchronize, reopened, ready_for_review, edited]
permissions:
actions: read
contents: read
pull-requests: write
concurrency:
group: claude-security-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event.action != 'edited' || github.event.changes.base != null }}
jobs:
# Make this job the required status check.
claude-security:
# Skips the merge queue and Dependabot runs from branches of this repository. Skipped runs pass.
if: >-
github.event_name != 'merge_group'
&& (github.actor != 'dependabot[bot]'
|| github.event.pull_request.head.repo.full_name != github.repository)
runs-on: ubuntu-24.04
timeout-minutes: 240
outputs:
report: ${{ steps.claude-security.outputs.report }}
steps: &steps
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
# Pin the release commit that the Claude Security plugin docs list (here, 0.13.0).
- id: claude-security
uses: anthropics/claude-plugins-official/plugins/claude-security@d0d514288960e7a78e1a76e4a3ec694416458726
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
suggest_patches: later
report: ${{ needs.claude-security.outputs.report }}
# fail_on: high # confident-high, high (default), medium, any or never
# Keep this step: without it, "Re-run all jobs" posts the comments again.
- name: Receipt ${{ steps.claude-security.outputs.receipt }}
if: always()
run: "true"
# Posts the suggested fixes after the first job ends.
claude-security-fixes:
needs: claude-security
if: ${{ !cancelled() && needs.claude-security.outputs.report != '' }}
runs-on: ubuntu-24.04
timeout-minutes: 240
steps: *stepsThe second job, claude-security-fixes, reuses the first job's steps through the &steps anchor and receives its report, so the review lands first and the fixes follow. To draft fixes inside the first job instead, delete the second job, the first job's outputs, and the suggest_patches and report inputs.
Which fail_on Level Should Block the Merge?
A failed job blocks the merge only when it is a required status check, and fail_on decides which findings fail it. AI agents set each finding's severity and confidence, and Anthropic's GitHub Actions guide warns that both can change between runs.
| fail_on value | Fails the job on | Trade-off |
|---|---|---|
| confident-high | CRITICAL or HIGH findings of high confidence | Blocks the fewest merges, and passes a real CRITICAL or HIGH finding rated medium or low confidence |
| high (default) | Any CRITICAL or HIGH finding | The setting in Anthropic's sample workflow |
| medium | Any CRITICAL, HIGH or MEDIUM finding | Catches more flaws and blocks more merges |
| any | Any finding, LOW included | Every LOW finding stops the merge until someone resolves it |
| never | No finding | Still fails on a failed scan, a scan outside auto mode, a report below the job's scan_effort, or no complete report |
The job runs the scan in Claude Code auto mode, and an unverified report or a scan that lost agents fails the job under every value except never.
I'd keep the default high as the required check and set scheduled_fail_on: never on the scheduled workflow, so a whole-repository scan reports old flaws without a red run that nobody is waiting on. Move to medium once the team has cleared the backlog that the first scheduled scan surfaces.
When Does a Required Check Pass Without a Real Scan?
A job that GitHub skips reports its status as Success, and it does not prevent a pull request from merging even when it is a required check, per GitHub's job conditions docs.
Anthropic's sample workflow skips some runs on purpose, and its guide lists other ways a check turns green without a scan behind it:
- Draft pull requests - a draft passes with no scan until it is marked ready for review, unless you set
scan_draftsto true. - Dependabot pull requests - a Dependabot pull request from a branch of your repository passes with no scan, so review its changes yourself.
- Merge queue runs - the job is skipped in a merge queue, which counts as passing. Scanning in a merge queue or on push events is not supported.
- Re-runs and manual runs - a required check can turn green on a commit whose scan failed, for example after a manual run, a re-run, or another pull request with the same head. Keep
scheduleandworkflow_dispatchtriggers in a second workflow whose job has a different name. - Skipped external branches - adding your own condition that skips forks turns them green. The default fails fork pull requests instead, which is the safer outcome.
- Base branch changes - after a change of base branch, don't re-run an older run, and after a force-push of the base branch, push a new commit.
- Older flaws - flaws that the review's agents judge older than the pull request don't fail the job by themselves.
- Sparse checkouts - a scan of a sparse checkout, or one that skipped a top-level folder, can still pass.
The guide also states that a clean review is not proof of absence, and the Claude Security plugin docs add that two scans of the same code can surface different findings. Treat a green check as one signal, and keep the scheduled scan running to build coverage over time.
How Much Does a Claude Security Scan Cost?
A scan in GitHub Actions is billed to the account that owns the job's model credential, and the Claude Security plugin docs say its token cost grows with the size of the repository, the scan effort and the model. Anthropic's GitHub Actions guide names the settings that move that cost:
- Model - Fable is the default and Anthropic's recommendation. Sonnet 5.5 or Opus 5.5 also perform well on smaller pull request scans, with a final Fable scan before merging where possible.
- Scheduled scans - a whole-repository scan can take hours and cost much more than a review. Fable costs several times as much as Opus there, which is why the scheduled sample sets
model: opus. - change_scan_effort - setting it to high puts more agents on the change and costs several times as much as high scan effort.
- fast_mode - the same model runs faster at about twice the price per token, if your provider and admin allow it.
- Spend limit - a standalone Console workspace with a monthly spend limit caps what the job's key can spend.
- suggest_patches - setting it to false leaves out the suggested fixes, which the guide also lists as a fix for jobs that time out.
Check the time and token cost of the first scheduled run before you leave it on a weekly cron, then lower scan_effort or change the model if it runs long.
Limits of a Pull Request Security Scan
The plugin's trust model treats the code you scan as trusted, and the GitHub Action trusts everyone who can push in the same way. The plugin does not try to stop a hostile repository from influencing a scan.
- Pull request text - anyone who adds text or code to a pull request's branch can steer the scan, have it run that code, and spend the job's model credential. The Copilot CLI prompt injection case shows the same class of risk in another agent.
- Public repositories - the review, the job summary or the report artifact can disclose a live vulnerability. Scan in your own Claude Code session to keep findings private.
- Sandbox - the scan has no network, no sudo and not the job's token, and it loads none of the repository's Claude Code settings, hooks, skills, MCP servers or CLAUDE.md files.
- Hosting - only GitHub-hosted Linux runners on GitHub.com work. GHE.com and GitHub Enterprise Server are not supported.
- Credentials in code - masking a credential in a review, a job summary or a code scanning upload is a model's best effort, so keep secrets out of the repository.
- Other scanners - the plugin does not replace static analysis, dependency scanning or code review. The AI code security guide shows how those layers fit, and security testing covers the wider practice.
A security review also never runs your deployed app. The agents that check a fix may run your tests inside the sandbox, where downloads and services fail, but no step opens the invoice search in a browser to confirm the parameterized query still returns the right invoices.
That check belongs in its own required job. Kane CLI by TestMu AI is an agentic quality verifier: it runs the app in a real Chrome browser, checks a plain-English objective against what a user sees, and exits 0 on pass, 1 on fail, 2 on error and 3 on timeout, so GitHub can gate the merge on it next to claude-security.
Note: Add a runtime check with Kane CLI by TestMu AI, which installs with npm install -g @testmuai/kane-cli and runs headless in GitHub Actions with your TestMu AI username and access key as repository secrets. To try it, start free.
Conclusion
Add the pull request workflow with the default fail_on: high, open a non-draft pull request with a planted flaw to watch the check fail, then make the claude-security job a required status check. Put a runtime check beside it with the Kane CLI CI/CD guide, so a merge needs both a clean security review and a passing run of the app.
Testing from the terminal? Kane CLI by TestMu AI lets SDETs and developers plan, write, run and debug tests from the command line.
Was this helpful?
Authors

Vipul Verma
Author · 27 posts
Vipul Verma is Group Senior Vice President of Engineering at TestMu AI, where he heads the entire engineering organization that builds KaneAI, HyperExecute, and the broader testing cloud. He brings 15+ years architecting, securing, and scaling large enterprise applications across multiple sites. Before TestMu AI he was India Head at LogicHub, where he built the India R&D site from the first employee to a 30-plus engineering team, and Principal Software Engineer at Sumo Logic, where he was the first engineer in the India office and shipped search-performance and pricing-model initiatives. Earlier he worked on trading platforms at Portware and D. E. Shaw. Vipul holds a B.Tech in Computer Science from IIT Kharagpur.

Prakaash Ojha
Reviewer
Prakaash is the Senior Vice President, InfoSec, Compliance & AI Governance at TestMu AI. He has over 24 years of experience building and maturing enterprise security, privacy, risk, and GRC programs. An ISO/IEC 42001:2023 Lead Auditor, Prakaash helps organizations adopt AI responsibly by turning complex regulatory and risk requirements into practical controls that support innovation, customer trust, and sustainable growth.
Claude Security Plugin FAQs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance
- Advanced access controls
- Advanced data retention rules
- Advanced Local Testing
- Premium Support options
- Early access to beta features
- Private Slack Channel
- Unlimited Manual Accessibility DevTools Tests



