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 Code Security Review in GitHub Actions: Setup, Limits and the Missing Test Gate
The Claude Security plugin now runs as a GitHub Action that reviews PRs and can block merges. Setup, fail_on, fork rules, limits and what it skips.
Claude Code security review is now running in CI. On 30th November 2026 Anthropic announced that the Claude Security plugin is now running as a GitHub Action (it will scan the changes in each PR, suggest fixes and can fail a required check). The scan runs in a no-network sandbox with no app server even started, so it can't actually verify that the user flows still work.
TL;DR
A Claude Code security review in GitHub Actions runs Anthropic's Claude Security plugin, a Claude security tool for security code review, as a pull request job. It scans the diff, posts one review with suggested fixes, and fails a required check when a finding meets fail_on. It reads code, not the running app, so pair it with Kane CLI tests.
- What runs in CI? The Claude Security plugin, as
anthropics/claude-plugins-official/plugins/claude-security - What it scans: The pull request's changes (PR mode) or the whole repository (scheduled mode)
- Can it block merges? Yes, when its job is a required status check. Default threshold: any CRITICAL or HIGH finding
- Auth and billing: Claude API key, workload identity federation, Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry or a model gateway. No Claude Pro or Max subscription token
- Runners: GitHub-hosted Linux runners on GitHub.com only
- What it doesn't check: Whether user flows still work after the change. Pair it with functional tests such as Kane CLI
What Did Anthropic Announce on 30th November 2026?
Anthropic's @ClaudeDevs account posted on X on 30th November 2026 to announce the Claude Security GitHub Action. The post stated that the plugin can now run as a GitHub Action that "reviews your pull requests for vulnerabilities, suggests fixes you can commit, and can block the merge". It also noted the ability to triage scanner findings, attack surface reduction and live scan views.
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.
The CI code itself is a bit older. The GitHub Actions guide (CI.md) and the action.yml file first appeared in plugin v0.13.0 on 24th November 2026 and v0.13.1 on the 25th November 2026 according to the repo commit history.
What's the Difference Between Claude Security, Claude Code Review and /security-review?
Anthropic now have seven ways to get a security review on code written with Claude Code. The Claude Code docs list five of those as separate layers, and the other two are the /security-review command and a GitHub Action that runs in your own workflows. They differ in terms of when they run, whether they can fail a PR check and which plan you need:
| Tool | When it runs | Can it fail a PR check? | Plan |
|---|---|---|---|
| Security guidance plugin | Automatically in your session, on each edit, turn and commit Claude makes | No. "None of the layers block writes or commits" | All plans |
/security-review | One pass over the current branch, when you run it | No | Built into Claude Code |
| Claude Security plugin | Deep multi-agent scan of a repo or diff, in a session or your shell | No (runs locally) | Plugin in beta for all Claude Code users |
| Claude Security GitHub Action (new) | The same plugin on each PR or on a schedule, on a GitHub Actions runner | Yes, via fail_on plus a required check | Claude API key, federated identity or cloud account |
| Code Review | On each pull request; multi-agent correctness and security review on Anthropic infrastructure | No. "By itself, a review doesn't approve or block the pull request" | Team and Enterprise plans |
| Claude Security (hosted) | Anthropic's service, scanning connected repositories continuously | Not documented as a PR check; findings go to the app, an API and webhooks | Public beta for Claude Enterprise |
| claude-code-security-review Action (August 2025) | On each PR; its README says it is "not hardened against prompt injection" | Not on its own; it comments and logs | Claude API key |
Of the seven, only the Claude Security Action is built to fail the required security finding check out of the box. Code Review's check run "doesn't conclude as a failure".
For a quick visual walkthrough of this concept, watch the video below from TestMu AI.
Subscribe to the TestMu AI YouTube channel for more tutorials on testing and automation.
What Does the Claude Security Plugin's GitHub Action Do?
The Claude Security GitHub Action has two modes, and you can use either or both. Pull request review scans each PR's changes and takes "minutes to tens of minutes, based on PR size," according to CI.md. A scheduled scan covers the whole repository and takes "minutes to hours."
In pull request mode, each scan will post one comment review and will never approve or request changes. With suggest_patches: later a second job will post the agent-written fixes (approx. 9-13 mins later on a small PR - Anthropic's estimate), and you'll need to review each one before you commit it.
fail_on input determines which findings fail the job: confident-high, high (default is any CRITICAL or HIGH), medium, any or never. Findings can also be sent to GitHub code scanning as SARIF.
The announcement's other features run in a Claude Code session or your shell, per the plugin README:
| Feature | Command | What it does |
|---|---|---|
| Vulnerability triage | /claude-security triage <path> | Three agents check each finding in a SARIF file from another scanner and write the valid ones, in fix order, to FINDINGS-TRIAGE.md |
| Attack surface analysis | /claude-security:attack-surface-analysis | Finds reachable code nobody needs, sensitive code reachable before login, and option combinations that switch off a security feature. Takes one to two and a half hours |
| Live scan view | /claude-security-view (Claude Code 2.1.292+) or claude-security --tui | Shows a live map of the code while a scan runs |
How Do You Set Up a Claude Code Security Review in GitHub Actions?
The Claude Security Action requires a Claude API key, federated identity or a cloud provider account, one workflow file and one required check. These steps are taken from Anthropic's CI.md at commit 0fbfda5 (25 Nov 2026).
- Create a scoped Claude API key. Anthropic recommends a dedicated workspace for this use case with a monthly spend cap. An unscoped key will fail the job with an HTTP 400. Save it as the secret
ANTHROPIC_API_KEYor use workload identity federation (Anthropic recommends this as it means you don't have any secret in the repo at all). - Allow the actions it uses if your organization allowlists the actions:
anthropics/claude-code-action,oven-sh/setup-bunandactions/upload-artifact. - Pin a release commit. CI.md is very clear on this: pin the full commit SHA of the release (not a branch) as the Action runs with
sudo, and the plugin docs page has the latest. On Dec 1st, 2026, that page still listed the v0.13.0 commit. The latest release on main was v0.13.1 (commitbd81c1af22a21a4466a3bb516b6156064a78551d), which was from Nov 25th, 2026. There's nothing to warn you that a new release has gone out. - Save the workflow as
.github/workflows/claude-security.yml. That's Anthropic's pull request sample from CI.md, unaltered other than the pinned commit on theuses:line.
name: Claude Security plugin
on:
pull_request:
# Scan when a pull request opens, gets commits, leaves draft or changes its base branch.
# Keep ready_for_review: drafts pass with no scan, so a draft must be scanned when it is marked ready.
types: [opened, synchronize, reopened, ready_for_review, edited]
# With a merge queue, uncomment the next line: the job is skipped there, which counts as passing.
# merge_group:
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:
# To block merges, make this job a required status check. First read "Blocking the merge".
claude-security:
# Keep this: it skips the merge queue, and Dependabot's runs on branches of your 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 # Keep this: only GitHub-hosted Linux runners work.
timeout-minutes: 240
outputs:
report: ${{ steps.claude-security.outputs.report }}
steps: &steps
# Keep this step as it is.
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- id: claude-security
uses: anthropics/claude-plugins-official/plugins/claude-security@bd81c1af22a21a4466a3bb516b6156064a78551d # v0.13.1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# Draft fixes in the second job. "false" leaves them out.
suggest_patches: later
# Empty in the first job. The second job passes the first job's report.
report: ${{ needs.claude-security.outputs.report }}
# Uncomment an input to use it. "Inputs" lists all options.
#
# Which findings fail the job. If it is a required check, they block the merge.
# confident-high CRITICAL or HIGH, of high confidence
# high any CRITICAL or HIGH (the default)
# medium any CRITICAL, HIGH or MEDIUM
# any any finding
# never no finding
# fail_on: medium
#
# change_scan_effort: high # Search harder, at a higher cost.
# scan_drafts: "true" # Also scan draft pull requests.
# model: opus # See "Choosing the model".
# fast_mode: "true" # Faster scans at a higher price. See "Inputs".
# Keep this step as it is: without it, "Re-run all jobs" posts the comments again.
- name: Receipt ${{ steps.claude-security.outputs.receipt }}
if: always()
run: "true"
# Suggested fixes, after the first job has ended. The same steps.
# To draft fixes in the first job, delete this job, the first job's outputs, and the
# lines suggest_patches and report with their comments.
claude-security-fixes:
needs: claude-security
if: ${{ !cancelled() && needs.claude-security.outputs.report != '' }}
runs-on: ubuntu-24.04
timeout-minutes: 240
steps: *steps- Make it a required check. A failed job will only block a merge if the
claude-securityjob is a required status check in branch protection or a ruleset. - Test it. Open up a non-draft PR that adds the workflow and an obvious bug in the code that your product runs (e.g. a shell command constructed from a request parameter). CI.md says you're to keep that bug out of the preview deployments and remove it prior to merge, which is obviously important if you're running functional tests against that preview.
To record the findings as code scanning alerts, we add security-events: write to permissions and then we put those two steps from CI.md after the action step. CI.md does note that an alert can be closed as a result of a later scan not reporting it again.
- name: Find the report
id: claude-security-report
# Runs even when the job fails on findings.
if: ${{ !cancelled() }}
run: |
REPORT="$(cat "$RUNNER_TEMP/claude-security-report-dir" 2>/dev/null || true)"
echo "sarif=${REPORT:+$REPORT/CLAUDE-SECURITY-RESULTS.sarif}" >> "$GITHUB_OUTPUT"
- uses: github/codeql-action/upload-sarif@v4
if: ${{ !cancelled() && steps.claude-security-report.outputs.sarif != '' }}
with:
sarif_file: ${{ steps.claude-security-report.outputs.sarif }}Choosing fail_on. AI agents set the severity and confidence, and CI.md states both "can change between runs". medium blocks more merges.
confident-high will block fewer and will allow through a real CRITICAL or HIGH finding of medium or low confidence. Start on high and then adjust after a few weeks of findings.
What to Record on Your First Run
CI.md provides estimates, not measurements. On your first test PR, record those and set your own fail_on and timeouts from your own numbers:
- Minutes to the first review and to the suggested-fixes review
- Token spend, from the Console workspace you made for the job
- Each finding's severity, confidence and CWE, and whether the planted flaw was caught
- The same numbers from a second run on the same commit, to see how much results vary
Note: Add the functional half of the gate. The Claude Security Action will tell you whether the diff opens a hole. Kane CLI will tell you whether the app still works after the change (it runs end-to-end tests in a real browser, in plain English and reports a pass or fail with evidence on the PR). npm install -g @testmuai/kane-cli · Start free.
How Does Claude Security Stack Up Against CodeQL, Semgrep, Snyk and CodeRabbit?
Claude Security is an LLM-based reviewer as opposed to CodeQL, Semgrep and Snyk, which run rules or queries. Anthropic states that the plugin "doesn't replace your existing source-code security tools" and is intended to complement their deterministic checks. All of the rows are taken from the vendor's own documentation or pricing page (checked December 1st, 2026).
| Tool | How it finds issues | Can it block a merge? | Fixes | Cost |
|---|---|---|---|---|
| Claude Security Action | Agents review the diff; independent verifier agents try to disprove each finding | Yes, via fail_on plus a required check | Yes, posted in a review | Model tokens on your Claude API key or cloud account; no per-scan price published |
| claude-code-security-review Action (Aug 2025) | Claude Code reviews changed files, then filters false positives | Not on its own; outputs findings-count | Fix recommendations in PR comments | Claude API key |
| GitHub code scanning (CodeQL) | CodeQL queries; also ingests third-party SARIF | Yes, with a branch ruleset ("Require code scanning results") | Copilot Autofix | Available on public repos; private repos need a GitHub Code Security license |
| Semgrep | Rules; diff-aware PR scans on Semgrep AppSec Platform | Yes, Block-mode rules return exit code 1 | See Semgrep docs | Semgrep CE runs without a token; semgrep ci connects to the AppSec Platform |
| Snyk (snyk/actions) | Per-language, IaC and container scans | Yes, the action fails the workflow when issues are found | See Snyk docs | Needs SNYK_TOKEN; see Snyk's pricing page |
| CodeRabbit | AI PR review with Security Code Review on all plans | Security merge blocking on Advanced and Enterprise plans | One-click fixes for review comments | $24, $48 or $72 per user per month billed annually (Essentials, Team, Advanced) |
What Are the Limits of the Claude Security GitHub Action?
CI.md and the Claude Code docs list these limits for the Claude Security GitHub Action:
- Trusted pushers only. "Text in a pull request can steer the scan, and the scan can run the pull request's code."
- Forks fail by default. A PR from a fork will fail the job unless you set
dangerously_scan_external_branches: true(which Anthropic says they don't encourage). - Platform limits. No merge queue or push-event scans. GitHub-hosted Linux runners only. No GHE.com (data residency) or GitHub Enterprise Server.
- Public repos can leak. A review or job summary can expose a live vulnerability.
- No repo config. The scan loads none of the repository's Claude Code settings (hooks, skills, MCP servers, etc.) or its
CLAUDE.md. - A green check doesn't mean there are no vulnerabilities. "A clean review is not proof of absence", and you can have a commit that has a failed scan (e.g. after a manual re-run) and yet the required check can still go green.
- Separate workflow required. "Keep unrelated steps and jobs in another workflow: the action changes the runner."
- Results are all over the place. The Claude Code docs state "two scans of the same code can surface different findings".
Why Isn't a Security Review a Test Gate?
A security review reads the source code and a test gate runs the app and checks what the user sees. The Claude Security scan runs in a sandbox with no network, and nothing in CI.md's sample starts a server in the job. Agents that are reviewing a suggested fix may run your existing tests in that sandbox, but of course downloads and services will all fail in that environment.
Anthropic's security guidance docs say the same thing about their review tools in general: "the review reads the source code in your checkout, not a running site or deployed service."
A coding agent can re-write a payment handler to validate input and get through a security review, while removing a discount rule which a scanner would not treat as a vulnerability. Anthropic's patch flow is the same: a patch is only written if a reviewer agent can say it "leaves behavior otherwise unchanged", and they record in their note when the code in question wasn't covered by any tests.
Claude Security's verifier agents are separate from the agents that actually discovered the issue (they all read the source though). A merge gate also requires a check that runs the change against the real app and retains the evidence that a person can open. See our guides on testing AI-generated code, what Claude Code auto mode checks and what it doesn't.
What Should a PR Merge Gate for AI-Generated Code Be Checking?
A merge gate for AI-written code should answer four separate questions, and each of those requires its own check and its own evidence.
| Question | Check | What fails it | Evidence |
|---|---|---|---|
| Does the diff add an exploitable flaw? | Claude Security Action (plus CodeQL or Semgrep rules) | A finding meets fail_on (default: CRITICAL or HIGH) | PR review with finding, exploit scenario and severity; SARIF alert |
| Does a known bad pattern or vulnerable dependency appear? | Rule-based SAST and dependency scanning | A block-mode rule matches, or a vulnerable package is added | Scanner alert in code scanning |
| Do the main user flows still work? | Kane CLI functional tests on a preview or staging URL | Any test fails (exit code 1) | PR comment with verdict and evidence pack: step screenshots, console and network logs |
| Did something that used to work break? | Kane CLI regression suite, tagged and run in parallel | Any regression test fails | The same evidence pack per test, kept as a build artifact |
Repeat runs are different. The Anthropic docs state that two Claude Security scans of the same code "can surface different findings". After the first run of a Kane CLI test, you can have "unchanged steps replay from cache with no LLM cost" as per the Kane CLI product page.
Reference Merge-Gate Workflow
The reference setup uses two workflow files as per Anthropic's statement that the Claude Security Action must run in its own workflow:

.github/workflows/claude-security.yml: Anthropic's example from the setup section, pinned to a release commit..github/workflows/kane-smoke.yml: the Kane CLI GitHub Action from TestMu AI's guide to gating a PR with the Kane CLI, pinned to release tag 0.10.14 (commit fb315e0, 1 Dec 2026), withkane-versionset so that the version of the CLI it installs is also pinned (the input defaults tolatest):
name: kane-smoke
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
smoke:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
# build and start your app here if the tests open localhost
- uses: LambdaTest/kane-cli/integrations/github-action/kane-cli-browser-run@0.10.14
with:
test-files: "tests/**/*_test.md"
parallel: "4"
extra-args: "--tags smoke"
kane-version: "0.10.14"
username: ${{ secrets.LT_USERNAME }}
access-key: ${{ secrets.LT_ACCESS_KEY }}- In a branch ruleset on main, mark both
claude-securityandsmokeas required status checks. For both Actions, a failing check will block a merge only if it is a required check.
Kane CLI exits 0 (pass), 1 (a test failed), 2 (nothing ran) or 3 (canceled). For secrets setup, see running Kane CLI in GitHub Actions.
PR Gate Checklist
- Claude Security Action pinned to a full release commit SHA, in its own workflow file
fail_onchosen on purpose and written down in the repo's contributing guide- Fork PRs handled: Claude Security fails them by default; Kane CLI can't sign in to them as they're forks and have no secrets
- Kane CLI test files set their start page in
url:frontmatter; point it at a preview or staging URL that serves up the PR's change with no planted test flake in it. - A person reviews every suggested security fix before committing it
For the broader risk list (leaked secrets, hallucinated packages, prompt injection), see our guide to AI code security risks and tools.
Conclusion
Start with the two workflow files above on a sandbox repository: plant an obvious flaw, open a non-draft pull request, and confirm that the claude-security check fails while the smoke suite passes. Then mark both as required checks on main, and record your first-run numbers before you tune fail_on.
Ship the security check and the test check together. Kane CLI runs end-to-end tests from your terminal (from Claude Code, Cursor, Codex or Gemini CLI) and from GitHub Actions, and every run saves its evidence. The CLI is free to install. Start free with 10k credits for 30 days.
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.
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


