review-diff-for-vulns
Skill2 starsChanged 18 days agoMITView on GitHub
Security-review a pull request or diff for vulnerabilities before merge. Use when asked to review a diff for security, check a PR for injection, authz, secrets, or unsafe deserialization.
In this repository4 other files it gives its agents.
- cve-researchSkill
- harden-serviceSkill
- threat-modelSkill
- triage-alertSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Report by severity with a concrete fix: Prefer the fix that matches the codebase's existing pattern.
- Distinctive: line 46
Do not flag style, missing tests, or naming here.
- Distinctive: line 47
If a secret is added in the diff, report the fingerprint and the commit, never the value.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review diff for vulnerabilities
Review the change, not the whole repository. The diff defines the blast radius.
When to use
- A pull request touches authentication, authorization, input handling, file paths, SQL, subprocess calls, deserialization, or crypto.
- Someone asks "is this diff safe to merge".
Procedure
- Read the diff and its context. For each changed function, read the full function, not only the changed lines. Done when: every changed hunk has been read with its enclosing function.
- Classify each hunk by the class of risk it can introduce: injection (SQL/shell/template), path traversal, authz bypass, unsafe deserialization, SSRF, hardcoded secret, weak crypto, unsafe default, information leak. Done when: each hunk has a class or an explicit "no security-relevant change".
- Trace taint for injection classes. Identify the source (request body, query, header, filename), the sink (query, exec, render, file open), and whether a validator or parameterization sits between them. Done when: the taint path is named by file and line, or the hunk is cleared.
- Check authorization explicitly, not just authentication. A new endpoint needs a check on the object it acts on, not only on the caller being logged in. Done when: every new route/action has an authz check identified or a finding filed.
- Report by severity with a concrete fix. Prefer the fix that matches the codebase's existing pattern. Done when: each finding has severity, file:line, exploit path, and a fix.
Output format
## Verdict
merge | merge-with-fixes | do-not-merge
## Findings
| severity | class | file:line | exploit path | fix |
## Cleared
(hunks reviewed with no security-relevant change)Rules
- A finding needs a reachable exploit path; otherwise it is a note, not a finding.
- Do not flag style, missing tests, or naming here. Stay on security.
- If a secret is added in the diff, report the fingerprint and the commit, never the value.
- State clearly what you did not review.
Anti-patterns
- Repeating a linter's output as your own review.
- Flagging every
evalwithout checking whether input reaches it. - Blocking a PR for a pre-existing issue that this diff does not worsen.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

