/harness:pr-riskfrom harness
Rates PR security risk on a fixed scale (Rare to No-go) using NIST SP 800-53 controls and NVD data. Outputs a five-line verdict for non-specialists.
Ships in harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Output is a verdict anyone can read. Do the work of a reviewer, then say it like you would to a product manager. Never inflate: a wrong "Critical" teaches people to ignore the scale.
gh pr view <n> --json title,body,baseRefName,files and gh pr diff <n>.git diff $(git merge-base origin/HEAD HEAD). Uncommitted: git diff HEAD..harness/graph.db exists, python3 "${CLAUDE_PLUGIN_ROOT}/scripts/graph.py" impact --diff <base>
shows which callers inherit the change.Follow the secure-review skill steps 2 to 4: run the scanners that are installed, read the
diff for injection, access control, secrets, outbound requests, crypto, supply chain, CI and
agent code, and keep only what you can trace from attacker input to a sink. Dependencies:
for each added or bumped package, run osv-scanner scan source -r . and take the CVE ids.
Look it up; do not cite from memory. If the script cannot run (no shell, no network),
use the table below and end the NIST line with (not verified); do not explain why.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/nist.py" control AC-3 # SP 800-53 Rev 5 text
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/nist.py" search session token
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/nist.py" cve CVE-2024-3094 # NVD: CVSS, CWE, CISA KEV
Starting points (confirm with control, pick the closest one):
| Problem | SP 800-53 Rev 5 |
|---|---|
| Missing authorization, IDOR, privilege escalation | AC-3 Access Enforcement, AC-6 Least Privilege |
| SQL, shell, template, path or XSS injection; unsafe deserialization | SI-10 Information Input Validation |
| Secret or key in code, config or logs | IA-5(7) No Embedded Unencrypted Static Authenticators |
| Login, MFA or password handling | IA-2, IA-5, AC-7 Unsuccessful Logon Attempts |
| Session or token forgery, CSRF | SC-23 Session Authenticity |
| Weak or home-made crypto | SC-13 Cryptographic Protection |
| Plain HTTP, TLS checks disabled | SC-8 Transmission Confidentiality and Integrity |
| SSRF, new outbound or open network path | SC-7 Boundary Protection |
| Sensitive data stored unprotected | SC-28 Protection of Information at Rest |
| Stack traces or internals in errors | SI-11 Error Handling |
| Sensitive data in logs, missing audit trail | AU-3 Content of Audit Records |
| No rate limit on an expensive or public path | SC-5 Denial-of-service Protection |
| Known-vulnerable dependency | SI-2 Flaw Remediation, plus the CVE from NVD |
| New or unpinned dependency or action, install scripts | SR-3 Supply Chain Controls, SR-11 Component Authenticity |
| CI with broad permissions or untrusted code with secrets | CM-5 Access Restrictions for Change, AC-6 |
| Agent or LLM tool with more power than needed | AC-6 Least Privilege, SI-10 |
The level is the probability that merging this PR leads to a security problem. Rate the worst finding, then raise one level if several independent findings stack.
| Level | When |
|---|---|
| Rare | Nothing security-relevant changed, or the change only reduces risk. |
| Low | Security-relevant code changed and checked; nothing found, or hardening nits only. |
| Medium | A real weakness without a proven exploit path, a missing defense layer, or a CVE with CVSS 4 to 6.9 in reachable code. |
| High | A traced exploit path that needs a precondition an ordinary user cannot meet (admin role, a specific setup, a victim clicking a link) or has limited impact; reachable CVE with CVSS 7 to 8.9. |
| Critical | A traced path with little or no precondition and serious impact: other users' data, account takeover, code execution; reachable CVE with CVSS 9 or more. |
| No-go | Exploitable now or already exposed: a live secret in the diff, authentication removed, remote code execution from unauthenticated input, or a CVE marked known exploited (CISA KEV) in reachable code. |
Acceptable to merge: Rare and Low. Medium: acceptable with a tracked follow-up. High, Critical and No-go: not acceptable until fixed. A No-go with a leaked secret also means rotating the secret, since removing it from the branch does not un-leak it.
Use the user's language, plain text, no code block and nothing before or after the five
lines. No jargon without a plain explanation in the same line. Point at the code with
path:line. A user who can sign up counts as an attacker without precondition.
Risk: <Level>. <Acceptable to merge | Acceptable with a follow-up | Not acceptable to merge>.
Problem: <what is wrong and where, in one plain sentence>
What could happen: <the consequence for a real user or the company, concretely>
NIST: SP 800-53 <ID> "<title>" <+ NVD CVE-id, CVSS n.n, known exploited if so>
Fix: <the smallest change that brings the level down, and to which level>
For Rare or Low with nothing found, line 2 says what was checked, line 3 says why it is safe, line 4 names the control that the change respects, and line 5 says "Nothing to fix".
Only after the five lines, and only if there is more than one finding, add one line:
Also found: <n> lower findings. Ask for details. Keep the full trace ready if asked.
Example:
Risk: Critical. Not acceptable to merge.
Problem: the new GET /orders/:id route (api/orders.ts:42) returns any order to any logged-in user.
What could happen: a customer can change the number in the address and read other customers' names, addresses and purchases.
NIST: SP 800-53 AC-3 "Access Enforcement".
Fix: check that the order belongs to the logged-in user before returning it; that brings it to Low.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
6 skills in this plugin
/depsDependency health and update triage - find vulnerable and outdated packages, judge whether a Renovate or Dependabot PR is safe to merge, and vet a new dependency before adding it. Use when the user asks about outdated or vulnerable dependencies, a dependency update PR, "should I add package X", or supply-chain risk./graphAnswer structural questions about a codebase from a Joern call graph - who calls a function, what a change affects and which tests cover it, and which functions look unused. Use when the user asks for the impact or blast radius of a change, callers or callees of a symbol, dead code, or before refactoring or deleting a function in a large or unfamiliar repo./secure-reviewSecurity review of the current change (diff, branch or PR) that reports only verified, exploitable findings. Use when the user asks to review a change for security, check a PR before merging, or "is this safe", and before opening a PR that touches auth, input handling, file or network access, crypto, dependencies, CI, or LLM/agent code.npx claudepluginhub pierry/harness --plugin harness