secure-code-review
Skill22 starsChanged 3 months agoMITView on GitHub
Performs a security-focused review of code or a diff, hunting for injection, broken authentication/authorization, insecure crypto, hardcoded secrets, unsafe deserialization, SSRF, path traversal, and missing input validation, with exploit scenarios and concrete fixes ranked by severity. Use this skill when the user asks to "do a security review", "audit this code for vulnerabilities", "is this code secure", "check for security issues before deploy", "review this auth/crypto code", or wants a security pass on a PR. Complements general code review with a threat-focused lens.
- Deletes or force-pushes
16 other projects use a version of this.
Adopted by
Most recently taken up by
- narlyseorg/superhackerstheir own version, first seen Nov 8, 2026
- kaandgnsh/Claude-Bluetheir own version, first seen Nov 1, 2026
- Lethe044/agentskill-kittheir own version, first seen Nov 1, 2026
- zebbern/claude-code-guidetheir own version, first seen Oct 30, 2026
- Fahrnetic/engineering-agent-skill-workflowtheir own version, first seen Oct 15, 2026
- JayRHa/agent-skillsword for word, first seen Oct 15, 2026
Used with
Projects with it also use threat-modeling 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.
msewellSkillthreat-modeling
Produces structured threat models for software systems using STRIDE on data flow diagrams. Generates DFDs with trust boundaries, identifies threats per element, scores risks, and defines concrete mitigations. Outputs a complete threat model Markdown document through phased, interactive delivery. Use when threat modeling a system, analyzing security threats, identifying attack surfaces, performing STRIDE analysis, assessing security risks in architecture, creating a threat model document, or when the user mentions threat model, attack surface, trust boundaries, STRIDE, or security risk analysis.
Also in 3 projects that use this
AnthropicSkillincident-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
Other versions16 projects use a version of this.
Word for word · 2
- JayRHa/agent-skills★ 12100% same
- JayRHa/AgentSkills★ 12100% same
Edited · 0
None found.
Wrote their own version · 14
- zebbern/claude-code-guide★ 4.7ksame name
- nahid-sparktales/agent-dispatcher★ 59same name
- Lethe044/agentskill-kit★ 48same name
- narlyseorg/superhackers★ 8same name
- Fahrnetic/engineering-agent-skill-workflow★ 2same name
- xAmirHamza77/PenKit51★ 2same name
- Adarshukumar/skills★ 1same name
- alizafarbati/opencode-agents-mcp★ 1same name
- hemapriyan-rk/claude-rigor-skills★ 1same name
- Hayatelin/devsecops-skills★ 0same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository194 other files it gives its agents.
- 0-templateSkill
- ab-test-analyzerSkill
- academy-guideSkill
- add-to-my-skillsSkill
- adr-authorSkill
- ai-tools-setupSkill
- algorithmic-artSkill
- api-and-interface-designSkill
- api-designerSkill
- api-docs-writerSkill
- apple-store-submitSkill
- aws-cost-optimizerSkill
- bash-script-hardeningSkill
- blog-post-writerSkill
- book-summarizerSkill
- branch-cleanupSkill
- brand-copy-landingSkill
- brand-copySkill
- brand-designSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- canvas-designSkill
- changelog-generatorSkill
- changelog-keeperSkill
- chart-chooserSkill
- ci-cd-and-automationSkill
- ci-fix-loopSkill
- claude-apiSkill
- cloudflare-block-countriesSkill
- coderabbitloopSkill
- code-review-and-qualitySkill
- code-reviewerSkill
- code-simplificationSkill
- codexloopSkill
- comms-notionSkill
- comms-slackSkill
- comms-whatsappSkill
- competitive-analysisSkill
- concept-explainerSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- context-repoSkill
- cover-letter-writerSkill
- crash-courseSkill
- cron-schedulerSkill
- data-digestSkill
- data-pipeline-architectSkill
- debug-detectiveSkill
- debugging-and-error-recoverySkill
- decision-matrixSkill
- dependabot-triageSkill
- dependency-upgraderSkill
- deprecation-and-migrationSkill
- dev-instantdbSkill
- discernment-nudgeSkill
- doc-coauthoringSkill
- dockerfile-proSkill
- docs-index-keeperSkill
- documentation-and-adrsSkill
- docxSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Trace tainted data to sinks: Follow each untrusted input to dangerous sinks (SQL, shell, file paths, HTML output, deserializers, redirects, …
- Distinctive: line 32
If uncertain it's exploitable, mark "Possible:" and state what would confirm it.
- Distinctive: line 43
Fix: use a parameterized query:
- Distinctive: line 50
Prefer parameterized queries / prepared statements over string building everywhere.
- Very specific: line 52
Use vetted libraries for crypto and auth — never hand-roll.
- Distinctive: line 54
Keep secrets in a vault/KMS or env, never in source.
- Distinctive: line 55
Add a regression test for each fixed vuln.
“Common” is measured: kept by at least 6 in 10 of the 13 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.
Files
Secure Code Review
Overview
Review code through the eyes of an attacker. For each finding, name the vulnerability class, show how it's exploited, rate severity, and give a concrete fix. Scope to the diff/files provided; pull in just enough surrounding code (callers, trust boundaries) to judge exploitability.
Keywords: security review, secure code review, vulnerability, OWASP, injection, SQLi, XSS, command injection, authentication, authorization, IDOR, broken access control, crypto, secrets, hardcoded credentials, deserialization, SSRF, path traversal, input validation, CSRF.
Workflow
- Map trust boundaries. Identify where untrusted data enters: HTTP params/body/headers, file uploads, env, message queues, DB rows from other tenants, third-party APIs. Untrusted input is where most bugs live.
- Trace tainted data to sinks. Follow each untrusted input to dangerous sinks (SQL, shell, file paths, HTML output, deserializers, redirects, template engines). A flow from source → sink without sanitization is a finding.
- Review each vulnerability class using
references/vuln-patterns.md: injection, broken access control/authz, auth & session, crypto, secrets, deserialization, SSRF, path traversal, CSRF, security misconfig, sensitive-data exposure. - Check authorization on every sensitive operation. Authentication ≠ authorization. Confirm object-level checks (does this user own this record?) to catch IDOR / broken access control.
- Scan for low-hanging fruit with
scripts/secret_scan.py(hardcoded secrets, dangerous function calls). Triage hits — it's a starting point, not proof. - Rate severity (Critical/High/Medium/Low) by exploitability × impact, using
references/checklist.md. - Write findings with: class,
file:line, exploit scenario, severity, and a concrete fix (prefer a diff). End with a verdict and a prioritized fix list.
Decision Heuristics
- Assume all external input is hostile until validated/escaped at the sink.
- Escape at the sink, validate at the boundary — parameterized queries beat input filtering.
- Deny by default for access control; explicit allow per resource and action.
- Never trust client-side checks — they're UX, not security.
- Secrets in code = Critical, even in tests or comments, because of git history.
- If uncertain it's exploitable, mark "Possible:" and state what would confirm it.
Worked Example
# src/api/users.py:88 — VULNERABLE
query = f"SELECT * FROM users WHERE email = '{email}'"
db.execute(query)Finding — [Critical] SQL Injection — src/api/users.py:88
An attacker submitting email=' OR '1'='1 reads all rows; '; DROP TABLE users;-- can destroy data.
Fix: use a parameterized query:
db.execute("SELECT * FROM users WHERE email = %s", (email,))Best Practices
- Prefer parameterized queries / prepared statements over string building everywhere.
- Context-aware output encoding for XSS (HTML, attribute, JS, URL contexts differ).
- Use vetted libraries for crypto and auth — never hand-roll. Use
hmac.compare_digestfor secret comparison. - Allow-list inputs (paths, redirect targets, file types) rather than block-listing.
- Keep secrets in a vault/KMS or env, never in source; rotate anything that leaked.
- Add a regression test for each fixed vuln.
Common Pitfalls
- Treating authentication as authorization — logged-in users still need per-object checks (IDOR).
- Block-list validation that attackers trivially bypass; prefer allow-lists and escaping at the sink.
- Custom crypto (homemade tokens, ECB mode, static IVs, MD5/SHA1 for passwords).
eval/pickle/yaml.load/native deserialization on untrusted data → RCE.- Verbose error messages / stack traces leaking internals to users.
- Reflected user input into HTML, headers, or redirects without encoding/allow-listing.
- Reviewing only the happy path — vulns hide in error handlers and edge cases.
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.

