/security-review is a prompt-based command that reviews the pending diff using a public prompt file, and none of the sources I found give a recall or false-positive rate for it. So you have to build your own number. This post covers how to write a labeled set of synthetic diffs, run the review the same way every time, score expected against observed findings, and sort the misses and false positives into causes. It reports no results, because no run is claimed here. The tables are templates, not data. The scope is the tool's behaviour, not installing the Action or testing in general.
Pin down what you are evaluating
The commands reference describes /security-review as a check of the diff for security vulnerabilities, listed under its 'Before you ship' workflow step. Its behaviour is defined in a public prompt file, which GitHub displays as 191 lines. That file is your specification, and it is more specific than most people assume.
The parts you can turn into test assertions:
- Scope: focus only on security implications newly added by the change, and do not comment on existing concerns.
- Confidence: flag only issues where it is more than 80% confident of actual exploitability.
- Exclusions: denial of service, secrets or sensitive data stored on disk, and rate limiting or resource exhaustion.
- Categories: input validation, authentication and authorisation, crypto and secrets management, injection and code execution, data exposure.
- Output: file, line number, severity, category, description, exploit scenario and fix recommendation.
Every one of those is checkable. That's the whole point of writing the labels first.
Three surfaces, one question per result set
There are at least three ways to run this reviewer: the terminal command, the GitHub Action, and the repo's eval runner. They are not guaranteed to behave identically, so keep their results in separate columns. Installing the Action is out of scope here. If you use the eval runner you are exercising the Action's audit engine, and that's a different surface from typing the slash command in a session.
And don't confuse it with /code-review . That's a separate bundled skill that reviews for correctness bugs, and its ultra option runs a multi-agent review in the cloud. Neither is described as part of /security-review.
Limits to write down before you start
- The command's allowed tools include
Read,GlobandGrepalongside git commands, so don't assume it never looks beyond the diff text. Equally, don't assume it does. - StackHawk points out that neither this command nor Claude Code Security runs your application. Anything that only appears at runtime is outside what you're measuring.
- It is non-deterministic, so one run per case is a anecdote, not a measurement.
- Availability varies. The commands reference says not every command appears for every user, and the Help Center names individual Pro or Max plans and pay-as-you-go API Console accounts.
- A set you wrote measures behaviour on your set. It says little about general recall.
Build the labeled test cases
Use a small repository you own, with a base branch and one branch per case. Each branch adds a single, self-contained change. Anonymised real diffs are possible, but synthetic ones avoid leaking client code, and you control exactly what is planted.
Write the labels before the first run and commit them. If you label after seeing output, you'll unconsciously bend the labels toward what the tool said. (Everyone does it.)
A useful set has five kinds of case, not just planted bugs:
- Planted vulnerabilities in the prompt's own categories.
- Clean diffs that look risky, such as a parameterised query next to string-building code. Expected: no finding.
- Scope-out cases for the exclusions: a DoS-shaped change, a rate-limit gap. Expected: no finding, by design.
- Pre-existing issues sitting near a harmless change. Expected: no finding, because the prompt says not to comment on existing concerns.
- Open questions, where you don't know the expected result.
That last kind matters. The Help Center lists dependency vulnerabilities among the things the command identifies, while the prompt excerpt listing the five categories doesn't mention them. So a diff bumping a package with a known issue is labeled 'open', and you record what happens instead of pretending to know.
An illustrative template (the cases are examples of shape, not a recommended or complete set):
| Case | Diff adds | Expected |
|---|---|---|
| A | Query built by concatenating a request parameter | Finding: injection |
| B | Same query, parameterised | No finding |
| C | Admin route with the permission check removed | Finding: authorisation |
| D | Loop with no limit on request size | No finding (excluded class) |
| E | Harmless edit beside an old, untouched weakness | No finding (not newly added) |
| F | Dependency bump to a package with a known issue | Open |
If your stack is Supabase, a case where a new table ships without a row-level policy is worth adding, and the Supabase RLS guide shows what the correct version looks like. If you're weighing CMS architectures, the shape of the attack surface moves, which the headless vs WordPress security piece covers. Cases follow your stack.
One more case type is optional: a code comment that tries to instruct the reviewer. The fork's README, which states its audit engine is byte-identical to upstream as of 2026-07-01, warns that the action is not hardened against prompt injection attacks and should only review trusted PRs. Since you wrote the set, it's trusted. Keep untrusted code out of the harness.
Run the review the same way every time
Consistency is the part people skip. Here's the procedure I'd follow.
- Freeze the environment. Record the Claude Code version, the model, the account type, the date, and the commit of the prompt file you're reading. Don't copy a model name from a README. The fork documents
claude-opus-4-1-20250805as the Action's default model input and20minutes as the timeout default, but record what your run actually used. - Start a fresh session per case. No carried-over conversation, the same
CLAUDE.mdand permissions each time. - Check the diff base. The prompt injects the output of
git diff --merge-base origin/HEAD, plus git status, modified files and commits. Each case branch needsorigin/HEADpointing where you think it does. Read the status block at the top of the transcript to confirm the diff is the one you meant. - Repeat each case several times. Pick a repeat count up front and stick with it. Semgrep's own write-up used a single run of Claude Code (v1.0.32, Sonnet 4) per setup, which is exactly the habit to avoid if you want to talk about variance.
- Save raw output verbatim. Don't summarise it while the run is fresh. Score it later, separately.
- Change one variable at a time. A new model, a new Claude Code version or an edited prompt starts a new result set.
Using the repo's eval runner
The repo's evals README describes a tool for running the reviewer on individual GitHub pull requests, which it says is useful for evaluating performance and accuracy. It needs Python 3.9+, Git 2.20+ for worktree support, the GitHub CLI, and ANTHROPIC_API_KEY , with GITHUB_TOKEN recommended. The call looks like this:
python -m claudecode.evals.run_eval owner/repo#123 --verbose
Results land in ./eval_results by default and repositories are cloned under ~/code/audit. Each output file carries success or failure status, runtime metrics, a findings count, and detailed findings with file, line, severity and description. It clones once, makes a worktree per PR, runs the audit there and cleans up.
The catch: it takes PRs, so your synthetic cases need to be opened as pull requests in a repository you control. That's a modest chore for a machine-readable output file.
If you customise the prompt
A customised prompt is a different tool, so evaluate it as a separate variant. The skills docs say custom commands have been merged into skills, and that a file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy . They also say a project code-review skill replaces /code-review . Whether a same-named override behaves identically for security-review is something to check locally before you rely on it.
Line up expected findings against observed ones
Define a match before you look at any output. A workable rule: the finding names the right file, points into the changed hunk, and carries a category in the same family as the label. Because the prompt requires file, line, severity and category fields, you can score mechanically for the first two and by eye for the third.

Then sort every case-run into one of five outcomes:
- Hit: a labeled finding was reported.
- Miss: a labeled finding was not reported.
- False positive: a finding was reported where the label says none, or one that matches no label.
- Correct silence: a no-finding case produced no finding.
- Scope-out: an excluded class produced no finding, as the prompt directs.
Keep scope-out apart from correct silence. If you fold them together you will blame the model for misses that the prompt asked for.
Here's a blank scoring template (rows are illustrative, nothing here is an observed result):
| Case | Expected | Observed, run by run | Outcome | Notes |
|---|---|---|---|---|
| A | Injection finding | to be recorded | to be recorded | |
| B | None | to be recorded | to be recorded | |
| D | None (excluded) | to be recorded | to be recorded | |
| F | Open | to be recorded | to be recorded |
Report counts per case across repeats. With a small set, a percentage looks precise and means very little. And resist comparing your numbers to Semgrep's. Its headline figures (Claude Code reporting 46 vulnerabilities at 14% TPR and 86% FPR) come from a prompted experiment across 11 real-world Python projects, not from this command.
Work through the misses and false positives
The scores tell you what happened. They don't tell you why, and the why is where an evaluation earns its keep.
Misses
Ask these in order, because the cheap explanations come first:
- Is the label right? A planted bug that isn't actually exploitable is a bad case, not a bad review.
- Did the prompt exclude it? DoS, secrets on disk and rate limiting are told to stay quiet.
- Was it plausibly under the confidence bar? The prompt says to skip anything it isn't more than 80% sure about, so a subtle planted bug may get dropped on purpose.
- Does exploitability depend on code outside the diff? Then it's a context miss, and the tools it can use may or may not have gone looking.
- Is it variance? If the same case hits on some repeats and misses on others, say that. Snyk's CTO Danny Allan, quoted by StackHawk from Dark Reading in August 2025, put it this way: "I also worry about nondeterministic mechanisms being your deterministic guardrails."
False positives
The same discipline applies. A finding on an old weakness near your change breaks the prompt's own scope rule, so log it as a scope violation. A finding in an excluded class is a prompt-adherence failure. A theoretical issue with no exploit scenario cuts against the 'avoid noise' instruction. And sometimes the tool found a real bug you didn't plant. Fix the label, note it, and don't count it as noise.
Tally the causes, not just the totals. Three misses from one cause are a pattern you can act on. Three misses from three causes are a shrug.
Semgrep reported that when it ran the command on three of its apps it found only one XSS, unlike what its per-vulnerability-class prompting turned up. Treat that as a hypothesis to test on your set, not a verdict.
Line up the review with tests and release policy
Suppose your set shows the command catches some planted classes in some runs. What do you do with that?
StackHawk's position is that the command is explicitly a complement to existing security practices, not a replacement for manual review or broader AppSec controls. That matches how the prompt is written. It is told to be conservative, it ignores whole classes, and it doesn't run your app. A quiet report is therefore not clearance.
A release policy that fits those properties:
- Treat findings as triage input. A reported finding gets a human look and, where possible, a failing test that reproduces it.
- Don't gate on its silence. Gate on deterministic checks: tests, type checks, rule-based scanners that return the same answer twice.
- Convert every confirmed finding into a regression test. The test outlives the model version.
- Keep manual review for authorisation and data-access changes. Those are the cases where a plausible-looking miss costs most.
- Re-run your set when the model, the Claude Code version or the prompt changes. The labels are cheap to reuse.
It also helps to know there are different layers. The security-guidance plugin's per-edit check is described in the docs as a pattern match with no model call, so it adds no usage cost. That's a different mechanism from reviewing a diff, and you'd evaluate it differently.
If you want someone to wire a repeatable review-and-regression step like this into a team's workflow, you can hire a Claude Code developer to set it up.
FAQ
Can I use real client diffs instead of synthetic ones?
You can, but anonymise them properly: strip names, hostnames, credentials and anything contractually sensitive, and check your agreement first. Synthetic cases are safer and let you control the label. Whichever you use, say which it is when you report anything.
Why not just evaluate /code-review instead?
It's a different tool with a different job. The commands reference describes /code-review as reviewing for correctness bugs, with an ultra variant that runs a multi-agent review in the cloud. If you evaluate it, build a separate label set around correctness defects, not security ones.
Will my numbers match Semgrep's?
They shouldn't be compared. Semgrep's headline figures came from per-vulnerability-class prompting on 11 open source Python projects, with single runs and specific tool versions. Its remark about /security-review is narrower: one XSS across three apps.
Who can actually run the command?
The Help Center says it's available to individual Pro or Max users and to individual users or enterprises on pay-as-you-go API Console accounts. The commands reference adds that availability depends on platform, plan and environment, so check what your own session offers.
The sharpest caveat is built into the prompt: it tells the model to stay quiet unless it is more than 80% confident and to ignore several issue classes, so a silent run on your set says as much about the prompt's scope as about the model. And since no source supplies a recall figure for this command, that number only exists once you've run your own labeled set.