Skip to content
Hidden Logic Lab

Claude Security 0.13.1 can run pull request code — pin the GitHub Action the official sample leaves on main

Published

Anthropic’s official Claude Security plugin can now review pull requests from GitHub Actions. That path is new in plugin v0.13.0 (landed 24 November 2026, America/New_York) and is still the current Action at v0.13.1. Official documentation is unusually direct about the trust model: text in a pull request can steer the scan, and the scan can run the pull request’s code. Anyone who can push can also edit the workflow, spend the model credential, and pass the check.

If you paste the official sample workflow today, you are not pinning a release. CI.md tells you to pin a full commit “never a branch,” because the Action runs with sudo. The copy-paste YAML in the same file has no @ SHA. The official docs page that CI.md says “gives the latest commit,” fetched 2 December 2026 (06:20 Asia/Hong_Kong), still tells you to move to v0.13.0 at d0d514288960e7a78e1a76e4a3ec694416458726. The plugin on main is 0.13.1.

This is a static review of a pinned official tree. We did not run the Action with a live key, and a clean review of your repository would not prove the absence of bugs. Treat the job as an extra reviewer, not as a hard security gate.

What to do before you turn this into a required check

  1. Pin the Action to the v0.13.1 tree that is on main as of 1 December 2026, not to a branch and not to the un-ref’d sample:
- uses: anthropics/claude-plugins-official/plugins/claude-security@795e7de78ce245afe553d299be32b3eac3e741f0

That commit is “Keep the claude-security samples as they are on main,” immediately after the version-label commit bd81c1af22a21a4466a3bb516b6156064a78551d. The plugin tree is c183d17f8fe35404a394b097865e5f1bab71d613. The merge 0fbfda5a91f4adc311daca25acc99132f40f0b6e has the same plugin tree. There is no official git tag.

  1. Keep the official checkout step as written. The Action reviews the pull request head, not GitHub’s merge ref. If HEAD is not that head SHA, post_review.py refuses to scan. Use persist-credentials: false and fetch-depth: 0, and do not add filter: or sparse-checkout: (the Action rejects a partial clone).
- uses: actions/checkout@v5
  with:
    ref: ${{ github.event.pull_request.head.sha }}
    fetch-depth: 0
    persist-credentials: false
  1. Compare your permissions: to the official PR sample: actions: read, contents: read, pull-requests: write. Add id-token: write only for workload identity federation or a documented cloud provider. Add security-events: write only if you also upload SARIF. Do not add pull_request_target, uses: ./..., or services:.

  2. Leave dangerously_scan_external_branches off. By default a fork pull request fails the job. That is intentional. Skipping the job for a fork would count as passing. Do not turn the fail into a skip.

  3. Read the official warnings in CI.md (Getting started, External branches, Blocking the merge, Limits) and SECURITY.md (Trust model) at the pin, not a third-party summary.

  4. If you want to inspect the tree yourself, clone that commit only and read it. Do not run hook or script entrypoints, and do not point a live ANTHROPIC_API_KEY at an untrusted pull request.

git -c core.hooksPath=/dev/null clone --filter=blob:none --sparse --no-checkout \
  https://github.com/anthropics/claude-plugins-official.git
cd claude-plugins-official
git -c core.hooksPath=/dev/null sparse-checkout set plugins/claude-security
git -c core.hooksPath=/dev/null fetch --filter=blob:none origin \
  795e7de78ce245afe553d299be32b3eac3e741f0
git -c core.hooksPath=/dev/null -c advice.detachedHead=false \
  checkout 795e7de78ce245afe553d299be32b3eac3e741f0

python3 -c "import json; print(json.load(open('plugins/claude-security/.claude-plugin/plugin.json'))['version'])"
# expect: 0.13.1

git grep -n 'uses: anthropics/claude-plugins-official/plugins/claude-security' \
  -- plugins/claude-security/CI.md
# official samples have no @sha after the path

git grep -n 'Pin a release' -- plugins/claude-security/CI.md

What this plugin is, and what we pinned

The in-session plugin is Anthropic’s vulnerability-scan product packaged for Claude Code: /claude-security can scan a repository or a change, suggest patches you apply yourself, triage existing findings, and build a threat model. Install it from the official marketplace with /plugin install claude-security@claude-plugins-official. A session scan uses whatever model access you already have in Claude Code; official docs say the plugin “makes no model calls of its own.” Those session scans run under your permissions, with no isolation of their own: the checkout’s .git/config and .claude/ settings and hooks apply. On Linux (not WSL 2 or macOS), the claude-security command can run a scan inside scripts/sandbox.py.

The GitHub Action is a separate job, not a Claude subscription login. It arrived in v0.13.0 on 24 November 2026 (15:54 America/New_York; 25 November 2026, 04:54 Asia/Hong_Kong). v0.12.0 had no action.yml and no CI.md. v0.13.1, labeled 25 November 2026 (16:43 America/New_York), changes the Action code only in documentation and in the in-session CLI/sandbox helpers; action.yml is byte-identical to the 0.13.0 merge. We reviewed the 0.13.1 tree as it actually sits on main: commit 795e7de78ce245afe553d299be32b3eac3e741f0. Current main at review time was ced2fd37d768999db82a2f95fe90ea8c0e8cc34b (1 December 2026, 17:05 America/New_York; 2 December 2026, 06:05 Asia/Hong_Kong), with the same plugin tree.

The plugin’s own LICENSE is proprietary to Anthropic, PBC (copyright 2026). The monorepo root is Apache-2.0. If you assumed the marketplace listing inherited the repo license, check the file in plugins/claude-security/LICENSE.

The trust model is the product, not a footnote

CI.md puts this above the sample:

Use the action only where you trust everyone who can push (see SECURITY.md). Text in a pull request can steer the scan, and the scan can run the pull request’s code. Anyone who can push can also edit the workflow, use its model credential and pass the check.

The official docs page says the same in a warning box: anyone who adds text or code to a pull request’s branch can steer the scan, have it run that code, and make it send model requests on the job’s credential.

That is not marketing noise, and it is visible in the Action itself. CI.md has a section “Letting the job run your tests”: agents that check a fix may run your tests in the sandbox. The scan runs in auto mode. The sandbox is real — no outbound network, no sudo, no job token — but a relay still spends the model credential, and “What it reads can leave by a model request or the review.” Default host in first-party code is api.anthropic.com. Workload identity federation, documented at the pin, exchanges a GitHub OIDC token at https://api.anthropic.com/v1/oauth/token. Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and a model gateway are also documented.

SECURITY.md is consistent with that design: “The code you scan is trusted.” A hook may refuse some shell commands of the plugin’s agents; the same file says that hook “is not a security boundary.”

So the useful question is not “does this replace a human security review?” Official Limits already answer that: “A clean review is not proof of absence.” Official docs also say the plugin does not replace existing static analysis and dependency scanners. The useful question is whether your repository matches the trust model: everyone who can push is someone you would allow to run code on a runner that can spend your model credential and post on the pull request.

Official samples float main, after the release had a placeholder pin

In the v0.13.0 merge d0d51428…, every sample uses: line was …/plugins/claude-security@RELEASE_COMMIT. Twenty minutes later, commit 1da4bcbd7648e82771db21c9a2841e1c42c22643 (“Remove specific commit reference for claude-security”) took the placeholder off and left the path unpinned. v0.13.1 briefly put @RELEASE_COMMIT back; the next commit, 795e7de, put the unpinned samples back “as they are on main.”

CI.md Limits still say:

Pin a release’s full commit, never a branch: the action runs with sudo. Nothing warns you of a newer release. The plugin’s page gives the latest commit: put it after the @ in each workflow.

The plugin’s page, at review time, gives the 0.13.0 merge SHA, not 0.13.1. If you follow only the sample, GitHub resolves the Action at job time against default-branch main of a busy monorepo. If you follow only the docs pin, you install 0.13.0. Pin 795e7de78ce245afe553d299be32b3eac3e741f0 yourself, and re-read CI.md when you move.

The Action does pin its own inner downloads and actions. At this tree it fetches Claude Code 2.1.326 from downloads.claude.ai and Bun 1.4.4 from GitHub releases, and refuses to run them if the SHA-256 does not match sums in action.yml. It calls anthropics/claude-code-action at 6070f08d2b4766348e0acded463606a7b176417b (v1.0.279) and actions/upload-artifact at 043fb46d1a93c77aae656e7c1c64a875d1fc6a0a (v7.0.1). Those pins do not replace a pin on claude-security.

Who the job posts as, and what it will not do

The official PR workflow posts a comment review, then, with suggest_patches: later, a second job posts suggested fixes. We confirmed in scripts/lib/review.py that the review payload is typed as event: "COMMENT". It is not an approval and not a request for changes, which matches CI.md. Suggested patches are review comments, not commits pushed to the branch. Official session docs say patches are never applied automatically; you apply a .patch file when you choose.

The job uses ${{ github.token }} to read the merge base, list earlier reviews, post the comment review, and upload a receipt artifact. With suggest_patches: later, a report artifact is kept for one day; CI.md notes that anyone who can read the repository can download it. In a public repository, the review or job summary can disclose a live vulnerability. Masking of credentials that appear in the scanned tree is, officially, “a model’s best effort.”

The Action needs no GitHub App. If you also use the Claude GitHub App and grant id-token: write, CI.md warns that a step outside the scan’s sandbox can obtain that App’s token, “which can write to the repository.”

A required check is easier to get wrong than the sample suggests

You can make claude-security a required status check. The job fails unless the verdict is pass, or the run is a documented skip. Default fail_on is high (any CRITICAL or HIGH finding). Agents assign severity and confidence, and “both can change between runs.” Findings the agents judge older than the pull request do not fail the job by themselves. An unverified report fails under every fail_on except never. A scan of a sparse checkout, or one that skipped a top-level folder, can still pass.

Then the part that matters for branch protection:

A required check can turn green on a commit whose scan failed, for example by a manual run, a re-run, or another pull request with the same head.

CI.md lists the mitigations: keep scheduled and manual runs in a second workflow with a different job name; do not skip fork jobs; do not build a step name from pull request text; after a base-branch force-push, push a commit. Read that list before you require the check.

Drafts, Dependabot, and the merge queue are easy to misread as “scanned.” The sample skips same-repository Dependabot and merge_group. Official docs say a Dependabot pull request “passes with no scan,” so review it yourself. Drafts also pass with no scan unless you set scan_drafts: true; keep ready_for_review in on.pull_request.types or a draft can be marked ready and merge without this job having run. Merge-queue and push-event scanning are not supported. GitHub-hosted Linux runners on GitHub.com are required; GHE.com and GitHub Enterprise Server are not supported.

Authentication and spend, without running a paid scan

The sample stores ANTHROPIC_API_KEY as a repository secret. Official guidance is to prefer workload identity federation, and if you do use a key, to create it in a standalone workspace with a monthly spend limit, not the Default Workspace. Unscoped keys fail this job with HTTP 400. The Action does not accept a Claude subscription token, and it does not read ANTHROPIC_API_KEY from the job’s env: — the key has to be the input. A whole-repository scheduled scan “can take hours and cost much more than a review”; the scheduled sample defaults to Opus because, officially, the default model Fable “costs several times as much as Opus here.”

None of that requires you to spend money to verify the workflow shape. You can pin the SHA, inspect permissions and checkout, and confirm the official warnings in the tree above.

Who should install this, and who should not

Install the Action in a private repository where write access is already limited to people you trust, and use it as one more pull request reviewer alongside human review, secret scanning, and your existing SAST and dependency tools. Pin the SHA. Prefer federation or a tightly scoped, spend-capped key. Keep fork scanning off. Do not treat a green required check, a skipped Dependabot run, or a draft that “passed” as a completed security review.

Do not install it as the security gate for a public project that accepts fork pull requests, or in any repository where people you do not trust can push. Do not turn on dangerously_scan_external_branches to make fork PRs look covered. Do not run it on a public repository if a posted finding would be a disclosure. Do not use it on GitHub Enterprise Server. Do not point it at code you do not own or have permission to test.

The in-session plugin is the right tool when you want to scan a checkout you already trust, under your own account, and apply patches yourself. Official docs distinguish it from the security guidance plugin (issues in code Claude is writing), from Claude Code’s Code Review, and from the managed Claude Security product on the Enterprise plan. This page is only about the official plugin at v0.13.1, especially the new GitHub Action path.

Nearby discussion on 1 December 2026, which we did not independently verify here, included operators talking about AI reviewers missing malicious pull requests, and about SKILL.md supply-chain risk. That is context for why a green AI review is not a gate. It is not a test result for this plugin, and this is not a SKILL.md review.

What this review is not

We cloned and read the official tree at 795e7de78ce245afe553d299be32b3eac3e741f0. We did not execute hooks or scripts, did not download the pinned Claude Code or Bun binaries, and did not start the Action against a repository with a live model credential. URLs in the first-party files we opened point at expected Anthropic, GitHub, Azure, Bedrock, CWE, and localhost relay hosts, and the Action hashes its two downloads before running them. That is not a clean bill of health. A workflow that follows the official sample will run whatever main is when the job starts, which may not be this pin.

We also do not claim that the scanner will catch, or will miss, any specific vulnerability class. Official Limits already refuse that claim: a clean review is not proof of absence. Scans are officially nondeterministic; two scans of the same code can surface different findings.

More skill reviews

← All skill reviews