Anthropic's Claude Security plugin now ships a GitHub Actions workflow that scans pull request changes, posts a security review, and can block merges when findings exceed your threshold. Official instructions live in Scan your codebase for vulnerabilities on Claude Code Docs and in plugins/claude-security/CI.md inside anthropics/claude-plugins-official.
This is not the standalone Claude Mythos enterprise monitoring product. It is the open plugin developers install with /plugin install claude-security@claude-plugins-official and can mirror in CI.
TL;DR
| Question | Answer |
|---|---|
| Trigger | pull_request types opened, synchronize, reopened, ready_for_review, edited |
| Runner | ubuntu-24.04 GitHub-hosted Linux |
| Credential | ANTHROPIC_API_KEY repository secret |
| Action source | anthropics/claude-plugins-official/plugins/claude-security |
| Fork PRs | Fail by default |
| Merge block | Set fail_on and make the job a required check |
| Billing | API usage on the secret owner |
Risk gauge illustrates severity gates for Claude Security pull request scans
Image: Library illustration · security severity framing
What Anthropic added for CI
Claude Security already ran multi-agent hunts inside a Claude Code session. The November 30 documentation refresh (surfaced widely December 1, 2026) adds a first-class GitHub Actions path with:
-
Pull request review mode — scans only the PR diff, posts review comments, optional suggested patches in a follow-up job when
suggest_patches: later. -
Scheduled full-repo scan — optional second mode for baseline hunts; PR mode is what most product teams adopt first.
Anthropic's docs emphasize trust boundaries: text on the PR branch can steer the scan, and the scan may execute code from the branch. Anyone who can push can also edit the workflow and spend the API key.
Official workflow skeleton
Save .github/workflows/claude-security.yml per CI.md. Critical defaults:
name: Claude Security plugin
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]
permissions:
actions: read
contents: read
pull-requests: write
jobs:
claude-security:
# Anthropic recipe skips merge_group and some dependabot cases — keep upstream conditions.
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
uses: anthropics/claude-plugins-official/plugins/claude-security
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
suggest_patches: later
Concurrency groups in the official file cancel overlapping runs on the same PR except when the base branch changes — copy the full block from CI.md when you ship.
fail_on and merge gates
CI.md documents fail_on severity gates:
| Value | Behavior |
|---|---|
| high (default) | Fails on any CRITICAL or HIGH |
| confident-high | CRITICAL or HIGH with high confidence only |
| medium | Includes MEDIUM |
| any | Any finding fails |
| never | Findings never fail the job |
To block merges, turn the job into a required status check in GitHub branch protection after you trust the false-positive rate.
Teams already running parallel Claude Code QA agents can stack this job after unit tests but before human security review.
Limits and warnings you must read
Anthropic lists hard limits in CI.md and the security doc page:
-
No merge queue support — uncomment merge_group skip; queued merges count as pass when skipped.
-
No push-event scans in the PR workflow — use scheduled scan mode for default-branch baselines.
-
Prompt injection — the older claude-code-security-review README states the action is not hardened against injection; only scan trusted PRs.
-
Public repo disclosure — job summaries may leak actionable vulns; run locally for zero-disclosure needs.
-
Draft PRs — pass with no scan until marked ready; Dependabot PRs may also skip per sample workflow comments.
These constraints align with Anthropic siren honeypot lessons: agents follow plausible malicious context unless your harness contains them.
Jailbreak lock pick motif highlights untrusted pull request prompt-injection risk
Image: Library illustration · exploit review metaphor
How this fits other Claude security layers
Anthropic documents three layers:
-
Security guidance plugin — nudges while Claude writes code.
-
Code Review — human-oriented PR commentary inside Claude Code.
-
Claude Security — multi-agent vuln hunt with independent verification before reporting.
This GitHub Action is layer three in CI, not a replacement for MCP server hardening or AgentBeam-style agent monitoring when agents touch production.
Compare with OpenAI Codex security open sourcing for a different vendor pattern: OpenAI shipped CLI tooling; Anthropic ships a marketplace plugin with Actions glue.
Setup checklist for platform teams
-
Create a dedicated API key with spend caps for CI — not a developer laptop key.
-
Pin the marketplace commit CI.md references when you need reproducibility (
d0d514288960e7a78e1a76e4a3ec694416458726appears in docs for v0.13.0 migrations). -
Require approval for outside contributors on public repos so fork PRs never hit the scanner with untrusted payloads.
-
Start with
fail_on: neverfor two weeks; collect precision metrics, then tighten. -
Log findings to your SIEM; GitHub comments alone do not satisfy SOC-style retention requirements.
-
Pair with stacked PR workflows carefully — each stack layer triggers another scan; use concurrency rules.
Cost and performance expectations
Docs quote minutes to tens of minutes per PR depending on diff size, and hours for full-repo scheduled scans. timeout-minutes: 240 in the sample workflow is intentional.
API spend scales with:
-
Diff size (more files, more agent rounds).
-
change_scan_effort: highoptional input for deeper search. -
Patch suggestion second job when enabled.
Finance leads should treat this like another CI bot, not a seat on Claude Max.
Threat model for AI-on-AI reviews
Attackers may embed prompt injection in:
-
Source comments newly added in the PR.
-
Test fixtures interpreted as instructions.
-
Malicious build scripts executed if the scan runs them.
Mitigations from Anthropic plus standard AppSec hygiene:
-
Restrict who can trigger workflows on forks.
-
Run in isolated runners without production secrets.
-
Never mount cloud credentials into Claude Security jobs on external contributor PRs.
Our Railway engineer agent probe story shows how quickly agent tools jump from lint to recon when prompts go off-script.
Enterprise vs consumer paths
Anthropic notes that managed Claude Security on Mythos targets Enterprise buyers who want vendor-operated monitoring, while the plugin plus GitHub Action targets teams that already run Claude Code and own their API billing.
If your organization standardizes on Microsoft Copilot Studio for low-code automation but lets engineering use Claude Code, place this Action only on application repos, not on workflow repos business users edit without security review.
Legal should also read Anthropic commercial terms for data retention on API calls triggered by CI. Session scans and Actions scans may fall under different subprocessors than Chat consumer accounts.
Scheduled scans vs pull request scans
CI.md contrasts modes:
| Mode | Scope | Output |
|---|---|---|
| Pull request review | Diff only | PR review comments plus optional patches |
| Scheduled scan | Whole repository | Job summary report |
Most teams start with PR mode to catch regressions before merge, then add weekly scheduled jobs on main to find legacy debt. Scheduled jobs take longer and cost more tokens because agents map architecture from scratch.
When you adopt both, deduplicate findings in your tracker so developers do not ignore duplicate comments across modes.
Second job for suggested patches
When suggest_patches: later, the workflow can spawn a follow-up job that consumes the report artifact from the first job and posts patch proposals. Anthropic separates jobs so you can fail fast on discovery without waiting for patch generation.
Platform tip: store the report JSON as an artifact even if you disable patch suggestions, so security engineers can replay findings after incidents.
When not to use the Action
Skip or delay CI deployment when:
-
You cannot trust every pusher (open source with drive-by PRs).
-
Disclosure of a finding in a public Actions log is unacceptable.
-
You are on GitHub Enterprise Server — unsupported.
-
You need merge queue scanning — not supported yet.
Local /security-review inside Claude Code remains the private path docs recommend for embargoed fixes.
Permissions block in the sample workflow
Anthropic keeps permissions narrow on purpose:
-
pull-requests: writelets the job post review comments. -
contents: readavoids granting write unless a patch job needs it. -
actions: readsupports artifact retrieval between jobs.
Do not widen to contents: write on the discovery job; patch application should stay human-approved or in a separate hardened job with CODEOWNERS gates.
Pairing with Claude Code locally
Teams often run three passes on risky features:
-
Security guidance plugin while authoring.
-
Local
/security-reviewbefore pushing. -
GitHub Action on the PR.
Document that sequence in your contributing.md so junior developers know which step blocks merge. Link your internal runbook to Anthropic's support article on automated security reviews.
Version migration note
Docs mention pinning anthropics/claude-plugins-official at commit d0d514288960e7a78e1a76e4a3ec694416458726 when moving to plugin 0.13.0. Platform teams should bump intentionally: each marketplace update can change default graders inside the plugin.
After upgrades, replay a known vulnerable test branch to confirm fail_on still triggers.
Draft pull requests and ready_for_review
Anthropic includes ready_for_review in the trigger list so draft PRs do not burn tokens until authors mark them ready. Product teams using draft-first culture should document that security scans start only after ready, avoiding noisy comments on WIP branches.
If you use GitHub's converted-to-draft flow during incident response, expect another scan when the PR returns to ready — budget API spend accordingly.
Security champions should paste the official warning block from CI.md into internal docs so contractors know fork PRs fail by design, not because the pipeline is broken.
Related reading on explainx.ai
- Claude Mythos 5 security scans and Defender fund
- Mobile agent testers with GitHub Actions
- Anthropic MCP download milestones
- Anthropic siren honeypot sandbox escape
- Cognition acquires Corridor for agent-written code guardrails
- Claude Code commands reference
Workflow fields, version pins, and trust warnings reflect Anthropic documentation checked December 1, 2026.
