Security
Inside Claude Security's GitHub Action: Trust Boundaries, Merge-Queue Audit, and CI Hardening
Anthropic brought its Claude Security plugin to GitHub Actions on November 30, 2026, enabling multi-agent pull request scans, SARIF 2.1.0 output, and follow-up patch suggestions. However, a December 1, 2026 documentation audit and Anthropic's own SECURITY.md highlight critical trust-boundary constraints: the sample workflow skips merge_group scans while reporting green, and untrusted PR branches can steer the scanner.
9 min read
Inside Claude Security's GitHub Action: Trust Boundaries, Merge-Queue Audit, and CI Hardening
Executive Summary
On November 30, 2026, Anthropic documented a first-class GitHub Actions integration for its open Claude Security plugin (anthropics/claude-plugins-official/plugins/claude-security), enabling development teams to scan pull request diffs, enforce fail_on severity gates, emit SARIF 2.1.0 reports, and generate follow-up patch proposals in CI (Claude Code Docs; explainx.ai).
While the plugin adds a 3-voter adversarial verification panel (REACHABILITY, IMPACT, DEFENSES) before surfacing findings, both Anthropic's own SECURITY.md and a December 1, 2026 documentation audit (Superpower Daily) surface critical operational trade-offs. Specifically, the sample workflow's merge_group handling can satisfy GitHub merge-queue required checks without scanning queued revisions, fork PRs fail by default to protect ANTHROPIC_API_KEY, and the scanner has no isolation boundary against malicious code or prompt injection inside an untrusted branch.
Trust Model & Architecture
Anthropic separates its AppSec tooling into four distinct layers: the in-session security-guidance plugin (which hooks into ~/.claude/security/ on first run to review code Claude writes in the same session), the local/CI claude-security plugin, team/enterprise Code Review, and the managed enterprise Claude Security product (powered by Claude Mythos with continuous commit monitoring). The GitHub Action brings the open plugin's multi-agent pipeline into ubuntu-24.04 runners using the repository owner's ANTHROPIC_API_KEY.
| Stage | Tool | Scope & Verification Model |
|---|---|---|
| In session | security-guidance plugin |
Reviews common flaws in code Claude writes within the same session |
| On demand / local | claude-security plugin |
Multi-agent scan of full repo or diff, with 2-of-3 panel & scratch-clone patches |
| On pull request | Code Review (Team/Enterprise) |
Multi-agent correctness and security review with full codebase context |
| On PR deep scan | claude-security GitHub Action |
Multi-agent scan of PR diff with fail_on gates and suggest_patches job |
| Managed continuous | Claude Security (Enterprise) |
Hosted scanning on Claude Mythos with Knowledge-tab threat models & webhooks |
Multi-Agent Verification & Artifact Pipeline
Rather than running single-pass regex or AST rules, the claude-security plugin executes a multi-phase agentic audit (README.md):
- Architecture & Threat-Model Mapping: On full-repository scans (
highormediumeffort), agents map components and build a threat model;loweffort skips the architecture map, and pull-request mode scopes directly to the PR diff. - Adversarial Verification Quorum: Candidate findings are challenged by a 3-voter panel checking
REACHABILITY,IMPACT, andDEFENSES, requiring a 2-of-3 quorum to reach the report (non-unanimous panels cap stated confidence atmedium). - Deterministic Output & Revision Stamping: Each run writes a timestamped
CLAUDE-SECURITY-<timestamp>/directory containingCLAUDE-SECURITY-RESULTS.md(with severity ratingsCRITICAL,HIGH,MEDIUM, orLOWmodeled on the CVSS v4.0 qualitative scale),CLAUDE-SECURITY-RESULTS.jsonl(carrying persistentclaudeSecurityPluginFindingIdidentifiers for cross-scan deduplication),CLAUDE-SECURITY-RESULTS.sarif(SARIF 2.1.0), andCLAUDE-SECURITY-REVISION-<sha12>.json(appending-dirtyif uncommitted changes exist). - Two-Job Patch Separation (
suggest_patches: later): In CI, the primary job evaluates findings and enforcesfail_onso builds fail fast; an optional follow-up job consumes the report artifact and posts suggested patches—taking roughly 9 to 13 minutes after the first review on a small PR (Gridinsoft). Patches are built in a scratch clone, verified against three claims, and never applied automatically.
flowchart LR
A[GitHub PR Event: opened / synchronize / ready_for_review] --> B{Trust & Event Gate}
B -->|Draft PR / Fork PR| C[Skip or Fail by Default]
B -->|merge_group in Sample| D[Skipped Job Marked Green by GitHub]
B -->|Trusted Branch Diff| E[Job 1: Multi-Agent Hunt + 2-of-3 Panel]
E --> F{fail_on Gate: high / confident-high / medium / any}
F -->|Exceeds Threshold| G[Block Merge via Required Check]
F -->|Passes or never| H[Upload SARIF / JSONL Artifact]
H --> I[Job 2: suggest_patches: later]
I --> J[Post Human-Reviewed Patch Proposals]Explicit Trust-Boundary Assumptions
Anthropic's SECURITY.md is unusually candid about what the plugin does not isolate:
- Scanned Code Is Trusted: The plugin runs under the caller's permissions with no built-in sandbox. Repository
.git/configand.claude/settings/hooks still apply, and a hostile branch can influence the scan or execute code during analysis. Even the helper command runs outside the sandbox on the first Python onPATH(requiring Python3.10+), meaning untrusted repositories with local virtual environments must be deactivated before scanning. - Prompt Injection Risk: While a hook blocks certain agent shell commands to guard against accidental slips, Anthropic explicitly states it is not a security boundary. Comments, test fixtures, or findings text referencing external code can attempt to steer Claude into running commands or exfiltrating secrets if the runner is not isolated.
- Permission Model: Local Node.js views run under Node 20's permission model with two pipes and no environment credentials, which Anthropic likewise describes as a guard against mistakes rather than a formal sandbox; the live view loads directly into Claude Code's own unsandboxed process.
What Researchers & Analysts Say
Security analysts and documentation auditors examining the November 30 / December 1, 2026 release—alongside independent static-analysis benchmarks—highlighted four concrete findings that platform teams must account for before making the Action a required merge gate:
- The
merge_groupFalse-Green Bypass: In a December 1, 2026 documentation audit, Superpower Daily noted that Anthropic's sample workflow enablesmerge_grouptriggers while retaining a job-level condition that skipsmerge_groupevents. Because GitHub treats conditionally skipped required jobs as successful, a merge queue can pass the requiredclaude-securitycheck without scanning the queued revision. Anthropic explicitly documents that merge-queue scanning is unsupported, meaning the green check is a queue compatibility accommodation rather than security coverage. - Path/Branch Filters vs. Pending Deadlocks: The same audit distinguishes job-level
ifskips (which report success) from workflow-levelpaths,branches, or commit-message filters—which can leave a required check permanently pending and block merges entirely. - CI Runner & API Key Exposure: As explainx.ai notes, anyone with push access to a branch can modify
.github/workflows/claude-security.ymlor craft prompt-injected comments/fixtures that spendANTHROPIC_API_KEYor probe the runner environment. Fork PRs fail by default for this reason; widening triggers topull_request_targetwithout isolation would expose repository secrets. - Public Repository Vulnerability Disclosure & SAST Gaps: Because GitHub Actions job logs and summaries on public repositories are world-readable, running the Action publicly can disclose unpatched vulnerabilities before maintainers fix them. Anthropic recommends running
/security-reviewlocally inside Claude Code for embargoed or zero-disclosure fixes. Furthermore, independent SAST comparisons (such as DerScanner's November 2026 evaluation of 630 lines of Claude Opus-generated code, which surfaced 31 security findings—6 critical, 24 medium, 1 low—plus 700 code-quality findings) underscore that LLM-based reviews should complement rather than replace deterministic SAST and Software Composition Analysis (SCA) for transitive dependencies.
Hardening & Implementation Blueprint
To deploy claude-security safely in CI without hitting the merge_group bypass, secret exposure, or runaway token bills, platform teams should apply least-privilege permissions, pin the marketplace commit, and enforce staged fail_on rollouts.
Hardened GitHub Actions Workflow Skeleton
name: Claude Security PR Audit
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Cancel stale runs on the same PR when new commits arrive
concurrency:
group: claude-security-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
actions: read
contents: read
pull-requests: write
jobs:
claude-security:
# Only scan non-draft PRs from the same repository (never untrusted forks)
if: >-
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository
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
- id: claude-security
# Pin to a reviewed commit SHA (e.g., v0.13.0 migration pin from CI.md)
uses: anthropics/claude-plugins-official/plugins/claude-security@d0d514288960e7a78e1a76e4a3ec694416458726
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
fail_on: confident-high
suggest_patches: later
Severity Gate Options (fail_on)
fail_on Value |
Gate Behavior | Recommended Rollout Stage |
|---|---|---|
never |
Findings never fail the job | Weeks 1–2 baseline (measure precision & noise) |
confident-high |
Fails only on CRITICAL or HIGH with high confidence |
Initial required branch-protection gate |
high (default) |
Fails on any CRITICAL or HIGH finding |
Mature application repositories |
medium |
Fails on CRITICAL, HIGH, or MEDIUM |
High-assurance / regulated services |
any |
Any finding fails the check | Strict zero-tolerance policies |
Operational Overhead & Hardening Checklist
- Use a Dedicated, Spend-Capped CI API Key: Never reuse a developer's personal key. Full-repo scheduled scans can run for hours (
timeout-minutes: 240), and PR scans scale with diff size,change_scan_effort: high, and whethersuggest_patches: laterspawns a second job. - Disable GitHub Merge Queues or Pair with Deterministic SAST: Because
claude-securitydoes not supportmerge_groupscanning, do not rely on it as the sole merge-queue gate; pair it with deterministic SAST/SCA scanners that validate the final merged tree. - Never Mount Cloud Credentials in Scan Runners: Keep
persist-credentials: false, mount zero AWS/GCP/production secrets into the scan job, and require maintainer approval for any external contributor workflows. - Archive JSONL/SARIF Artifacts to Your SIEM: GitHub PR comments alone do not provide immutable audit trails; upload
CLAUDE-SECURITY-RESULTS.sarifandCLAUDE-SECURITY-RESULTS.jsonlto GitHub Code Scanning or your SIEM. - Mind GitHub Enterprise Server Limits: Anthropic documents that the GitHub Action path is unsupported on GitHub Enterprise Server (GHES); use local
/claude-securityCLI runs in isolated containers there instead.
Frequently Asked Questions
Why does Anthropic's sample Claude Security workflow skip merge_group events?
Anthropic explicitly states that merge-queue scanning is not supported yet. Its sample workflow includes a job condition that skips merge_group events so queued merges are not blocked, but because GitHub treats conditionally skipped required jobs as passing, the check reports green without scanning the queued commit.
Is the Claude Security GitHub Action safe to run on public open-source fork PRs?
No, not without strict isolation. Fork PRs fail by default to protect ANTHROPIC_API_KEY, and Anthropic's SECURITY.md warns that the plugin has no built-in sandbox against malicious .claude/ hooks, .git/config settings, or prompt injection in untrusted branch files. Additionally, public Actions logs can disclose unpatched vulnerabilities.
How long does a Claude Security PR scan take?
Simple PR diff scans typically take minutes to tens of minutes depending on diff size, while the optional suggest_patches: later follow-up job arrives roughly 9 to 13 minutes after the initial review on a small pull request. Scheduled full-repository scans can take hours (timeout-minutes: 240).
How does Claude Security verify findings before failing a build?
Findings pass through a 3-voter adversarial panel (REACHABILITY, IMPACT, DEFENSES) and must clear a 2-of-3 quorum to be included in the report. Non-unanimous panels cap stated confidence at medium, which fail_on: confident-high uses to filter out lower-confidence alerts.
Does the GitHub Action work on GitHub Enterprise Server (GHES)?
No. Per Anthropic's CI documentation, GitHub Enterprise Server is currently unsupported for the GitHub Actions integration; teams on GHES should run /claude-security locally inside an isolated container or evaluate managed enterprise Claude Security.
Sources
- Anthropic — Scan your codebase for vulnerabilities (Claude Code Docs) (Updated November 26–30, 2026): https://code.claude.com/docs/en/claude-security
- Anthropic — SECURITY.md (
anthropics/claude-plugins-official/plugins/claude-security) (GitHub, accessed December 1, 2026): https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/SECURITY.md - Superpower Daily — Claude Security's sample passes merge-queue checks by skipping the scan (Published December 1, 2026): https://superpowerdaily.com/posts/claude-security-s-sample-passes-merge-queue-checks-by-skipping-the-scan
- explainx.ai — Claude Security GitHub Action: PR Scan Guide (Published December 1, 2026): https://explainx.ai/blog/claude-security-github-action-pull-request-scan-december-2026
- Gridinsoft — Claude Security Comes to GitHub Pull Requests (Published December 1, 2026): https://blog.gridinsoft.com/claude-security-github-pull-requests/
- DerScanner — Claude Code Security vs SAST — Where Agent Review Stops (Published November 20, 2026): https://dersecur.com/knowledge/claude-code-security