agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/appsec/secure-code-review/SKILL.md

secure-code-review

Skill0 starsChanged 11 days agoMITView on GitHub

Perform a security-focused code review of a change or codebase — authentication, authorization (object/function level), input handling and injection, output encoding, cryptography, secrets, deserialization, SSRF, file handling, logging — with language-specific sinks and a findings format developers can act on. Use when reviewing a pull request for security, auditing a service before release, or verifying a reported vulnerability in source.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use vulnerability-triage, competitive-analysis and 1 more.

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.
  • superagent-aiSkill

    vulnerability-triage

    Triage inbound vulnerability reports - GitHub Advisories (GHSA/CVE), bug bounty submissions, HackerOne/Bugcrowd/Intigriti exports, or a researcher's issue - to decide whether a finding is real, by-design, or noise. Reads the report offline, cross-references the project's documented intent and threat model (SECURITY.md, README, code, closed issues), statically audits any PoC without executing it, and emits a structured markdown triage report with a P0-P3 / By-Design severity and a recommended action. Use whenever the user asks to triage, assess, or score a vulnerability report, advisory, CVE, GHSA, or bug bounty submission, or asks "is this a real finding or by-design?".

    Also in 3 projects that use this

  • AnthropicSkill

    competitive-analysis

    Framework for building competitive landscape decks — market positioning, competitor deep-dives, comparative analysis, strategic synthesis. Use when the user asks for a competitive landscape, competitor analysis, peer comparison, market positioning assessment, strategic review, or investment memo deck. Also triggers on "who are the competitors to X", "benchmark X against peers", "build a market map", or any request to systematically evaluate competitive dynamics across an industry.

    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 3 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 15 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:

    Check authorization on every handler that touches an object by ID (BOLA/IDOR), not only authentication.

    line 17

“Common” is measured: kept by at least 6 in 10 of the 15 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

Approach

  1. Understand the feature and trust boundaries (what input is attacker-controlled? who is the caller?).
  2. Trace sources → sinks: request params/headers/body, files, queue messages, webhooks, DB content written by users → dangerous operations.
  3. Check authorization on every handler that touches an object by ID (BOLA/IDOR), not only authentication.
  4. Review security-sensitive diffs line by line; for large codebases combine with SAST (sast-triage) and grep for sinks.

Sink cheat sheet

ClassSinks / patterns to inspect
SQL/NoSQL injectionString-built queries: cursor.execute(f"...{x}"), "SELECT ..." + x, $where, db.collection.find(JSON.parse(input)), ORM raw()/extra()
Command injectionsubprocess with shell=True, os.system, Runtime.exec with concatenated string, child_process.exec, backticks
Code injection / deserializationeval, exec, pickle.loads, yaml.load (unsafe loader), Java ObjectInputStream, .NET BinaryFormatter, PHP unserialize, template rendering of user input (SSTI: render_template_string)
XSSinnerHTML, dangerouslySetInnerHTML, v-html, `safe, Html.Raw, unescaped template output, URL javascript:` in href
SSRFServer fetches user-supplied URL (requests.get(url), HttpClient, image/PDF renderers, webhooks); check allow-list, DNS rebinding, redirects, cloud metadata (169.254.169.254)
Path traversalopen(base + user_path), send_file, zip extraction without path checks (Zip Slip)
AuthNCustom JWT parsing (alg=none, missing exp/aud checks), password hashing not bcrypt/scrypt/Argon2, session fixation, MFA bypass paths
AuthZMissing ownership check (Order.get(id) without user_id), role checks only in UI, mass assignment (binding all request fields to model)
CryptoECB mode, static IV/nonce, Math.random()/random for tokens, MD5/SHA1 for passwords, disabled TLS verification (verify=False, InsecureSkipVerify)
SecretsHard-coded keys, tokens in logs, secrets in client bundles
LoggingMissing audit of security events; logging PII/secrets; log injection (CRLF)

Findings format

[Severity] <Title> — <file>:<line>
Issue: <what and why exploitable>, attacker-controlled input: <source>
Impact: <data/privilege affected>
Fix: <specific code-level fix, e.g. use parameterized query / check order.owner_id == current_user.id>
Reference: <CWE-xxx, OWASP ASVS x.y.z>

Rate with exploitability + impact; avoid flagging theoretical issues without a reachable source.

Related skills

sast-triage, threat-modeling, security-requirements, api-authorization-testing, security-tool-development

References

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.