agentleFS
mgkvibezmgkvibez/sentinel-skills/skills/review-diff-for-vulns/SKILL.md

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.

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
  1. Distinctive:

    Report by severity with a concrete fix: Prefer the fix that matches the codebase's existing pattern.

    line 29
  2. Distinctive:

    Do not flag style, missing tests, or naming here.

    line 46
  3. Distinctive:

    If a secret is added in the diff, report the fingerprint and the commit, never the value.

    line 47

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. 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.
  2. 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".
  3. 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.
  4. 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.
  5. 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 eval without checking whether input reaches it.
  • Blocking a PR for a pre-existing issue that this diff does not worsen.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.