agentleFS
hemapriyan-rkhemapriyan-rk/claude-rigor-skills/skills/secure-code-review/SKILL.md

secure-code-review

Skill1 starsChanged 2 months agoMITView on GitHub

Review code, a diff, or a PR for real security and correctness bugs — not style nitpicks. Use before merging anything that crosses a trust boundary (service-to-service calls, user input, file/network I/O, auth checks), whenever the user asks for a code review or security review, or before a patent PoC / project component gets treated as production-ready. Prioritizes exploitable findings over cosmetic ones.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use secrets-management and incident-response.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    secrets-management

    Implement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.

    Also in 3 projects that use this

  • AnthropicSkill

    incident-response

    Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 1

    Distinctive

    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:

    Don't review line-by-line in isolation — a change that looks fine alone can break an invariant defined elsewhere in the file.

    line 12

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

Secure Code Review

A review that produces forty style comments and misses the one auth bypass is worse than no review — it burns the reviewee's attention on noise and buries the thing that matters. This skill finds the thing that matters first.

Read the whole diff/file before judging anything

Don't review line-by-line in isolation — a change that looks fine alone can break an invariant defined elsewhere in the file. Understand what the code is supposed to guarantee before checking whether it does.

Check these classes explicitly, in priority order

  1. Trust boundaries — every point where data crosses from a less-trusted zone to a more-trusted one (user input, another service's response, a file read, a sensor reading, a retrieved document). Is it validated at the boundary, or does validation happen somewhere downstream where it's easy to skip on a new code path?
  2. Auth/authz — is every internal service-to-service call actually authenticated, or does the code assume "it's internal, it's fine"? That assumption is the single most common real-world breach vector in distributed systems — internal trust is not a security boundary.
  3. Race conditions / TOCTOU — check-then-act patterns on shared state, especially across async boundaries or between a permission check and the operation it gates.
  4. Injection — anywhere a string gets built from untrusted input and then interpreted (SQL, shell, template, deserialization). Check the actual sink, not just whether input "looks sanitized."
  5. Error handling that swallows security-relevant failures — a caught exception that logs and continues past a failed auth check or failed validation is a silent bypass.
  6. Secrets — hardcoded keys/tokens, secrets in logs, secrets in error messages returned to a client.
  7. Unsafe defaults — fail-open instead of fail-closed on any check that matters.

Output format

## Critical
- [location] — [the actual exploit scenario, concretely, not "this could be unsafe"] — fix: [specific change]

## High / Medium / Low
- same format

Rank by exploitability, not by how easy the finding was to spot. A theoretical issue with no realistic attacker path goes in Low even if it's technically incorrect; an easy-to-trigger auth gap goes in Critical even if the fix is a one-liner. State plainly if nothing critical was found — don't manufacture severity to look thorough.

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.