security-code-review
Skill2 starsChanged 4 months agoMITView on GitHub
Reviews source code and diffs for security vulnerabilities — injection, broken access control, secrets, unsafe deserialisation, SSRF, path traversal, weak crypto, dependency risk — and reports each finding with severity, exploit path, and a concrete patch. Use when the user asks for a security review, shares a pull request or diff, asks whether code is safe or exploitable, mentions a CVE, pentest finding, OWASP category, or hardcoded credentials.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- PiyushSolanki038/security-code-reviewtheir own version, first seen Oct 20, 2026
- NVIDIA/flashdreamstheir own version, first seen Oct 13, 2026
- Wang200935/security-agent-skillstheir own version, first seen Aug 11, 2026
- goodnessibeh/ai-dev-boilerplatetheir own version, first seen Apr 9, 2026
- Ascend/agent-skillstheir own version, first seen Mar 17, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- NVIDIA/flashdreams★ 538same name
- Ascend/agent-skills★ 43same name
- Wang200935/security-agent-skills★ 4same name
- goodnessibeh/ai-dev-boilerplate★ 1same name
- PiyushSolanki038/security-code-review★ 0same name
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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-auditorSkill
- contract-reviewerSkill
- csv-data-profilerSkill
- dependency-auditorSkill
- git-workflow-assistantSkill
- meeting-notes-to-actionsSkill
- prompt-engineering-optimizerSkill
- release-notes-generatorSkill
- rest-api-designerSkill
- sql-query-optimizerSkill
- technical-writing-editorSkill
- web-research-synthesizerSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
4
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
- Distinctive: line 25
Do not use for: infrastructure/cloud config review, compliance questionnaires, or writing exploits against systems the user does not own.
- Distinctive: line 50
If the user cannot answer, assume internet-facing and untrusted input, and say so.
- Distinctive: line 61
Treat every hit as a *lead*, not a verdict.
- Distinctive: line 92
Do list endpoints filter by the caller's tenant in the query, not in code after fetching?
“Common” is measured: kept by at least 6 in 10 of the 4 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
Security Code Review
Find exploitable bugs, not style violations. Every finding must answer: how would an attacker actually use this?
When to use
Pull-request review, pre-release audit, triaging a scanner report, reviewing auth or crypto code, assessing a dependency, responding to a pentest finding.
Do not use for: infrastructure/cloud config review, compliance questionnaires, or writing exploits against systems the user does not own.
Hard rules
- No exploit code for third-party systems. Proof-of-concept is limited to the minimum needed to demonstrate the flaw in the user's own code.
- Never invent a CVE number or a version range. Mark unverified claims
[VERIFY]. - Do not report noise. A finding with no realistic attacker path is a hardening note, not a vulnerability — label it as such.
- Redact secrets you discover: show
AKIA****EXAMPLE, never the full value.
Workflow
1. Establish the threat model in two minutes
| Question | Why it changes severity |
| Internet-facing or internal-only? | Reachability gates exploitability |
| Who are the users — anonymous, authenticated, admin? | Determines privilege gain |
| What data does this touch — PII, money, credentials, health? | Determines impact |
| Is there a WAF, gateway, or auth proxy in front? | May reduce (never eliminate) risk |
| Is the input attacker-controlled, or from a trusted service? | Untrusted input is the root of most findings |
If the user cannot answer, assume internet-facing and untrusted input, and say so.
2. Run the secret and pattern scanners first
Deterministic detection before manual reading:
python3 scripts/scan_secrets.py ./src --format md
python3 scripts/taint_patterns.py ./src --lang autoTreat every hit as a lead, not a verdict. Confirm by reading the code.
3. Trace taint: source → sink
For each dangerous sink, walk backwards to the input source. A vulnerability exists only when untrusted data reaches a sink without effective sanitisation.
| Sink | Vulnerability | Effective control |
| SQL string concatenation | SQLi | Parameterised queries; allowlist for identifiers |
exec, eval, system, child_process | RCE / command injection | Avoid shell; pass argv arrays; allowlist |
HTML rendering, innerHTML, dangerouslySetInnerHTML | XSS | Context-aware escaping; CSP; sanitiser library |
| File path joins | Path traversal | Resolve then verify the prefix; reject .. and absolute paths |
| Outbound HTTP with a user URL | SSRF | Allowlist hosts; block link-local 169.254.169.254, RFC1918, redirects |
pickle, yaml.load, Java/PHP deserialisation | RCE | Use JSON or safe_load; never deserialise untrusted bytes |
| LDAP / XPath / NoSQL query building | Injection | Typed query builders; escape per grammar |
| Template engines | SSTI | Never compile a user-supplied template |
| Redirect targets | Open redirect | Relative paths only, or an allowlist |
| Log lines | Log injection / forging | Strip CR/LF; use structured logging |
| Archive extraction | Zip-slip | Validate each entry path before writing |
| Regex from user input | ReDoS | Bound input length; use a linear-time engine |
4. Check the access-control model explicitly
Broken access control is the most common critical finding and no scanner sees it.
- Is authorisation checked on the object, not only on the route? (IDOR)
- Can a user change
userId,tenantId,roleororderIdin the request and reach another tenant's data? - Are mass-assignment fields filtered on create/update?
- Are admin routes protected server-side, not just hidden in the UI?
- Do list endpoints filter by the caller's tenant in the query, not in code after fetching?
- Are JWTs verified with a pinned algorithm (reject
alg: none, reject HS/RS confusion), an audience check and an expiry check?
5. Review crypto and secrets
| Anti-pattern | Correct |
| MD5/SHA1 for passwords, or SHA256 unsalted | argon2id, scrypt, or bcrypt |
Math.random() / random for tokens | CSPRNG: secrets, crypto.randomBytes |
| AES-ECB, or CBC without a MAC | AEAD: AES-GCM or ChaCha20-Poly1305 |
| Reused or hardcoded IV/nonce | Random per message; never reuse with GCM |
== on secrets/HMACs | Constant-time compare |
| Custom crypto | A vetted library |
| Secrets in code, env files in git, CI logs | Secret manager; rotate anything committed |
| TLS verification disabled | Never in production; flag as critical |
6. Assess dependencies
Direct and transitive. Flag: known-vulnerable versions [VERIFY against an
advisory DB], unmaintained packages, typosquat-looking names, install scripts,
and lockfile absence. Recommend pinning + automated updates.
7. Report
One table, sorted by severity. For each finding: ID, title, severity, file:line, attacker path in one sentence, patch, and effort.
Severity uses impact × exploitability:
| Severity | Meaning |
| Critical | Unauthenticated RCE, auth bypass, mass data exposure |
| High | Authenticated privilege escalation, injection with real data access, secret leak |
| Medium | Requires unusual preconditions, limited data, or chained with another bug |
| Low | Defence-in-depth gap, information disclosure with no direct value |
| Note | Hardening suggestion, no attacker path today |
Worked example
@app.route("/api/invoices/<invoice_id>")
@login_required
def get_invoice(invoice_id):
row = db.execute(
f"SELECT * FROM invoices WHERE id = '{invoice_id}'").fetchone()
return jsonify(dict(row))F-01 — SQL injection via invoice_id · Critical · api/invoices.py:14
Any authenticated user can send
/api/invoices/x' UNION SELECT password_hash,1,1 FROM users-- and read the
users table. Authentication is not a mitigation: any account suffices.
F-02 — IDOR: no ownership check · High · same line
Even patched against SQLi, the query filters only on id. User A can read
user B's invoice by guessing or enumerating the id.
Patch
@app.route("/api/invoices/<invoice_id>")
@login_required
def get_invoice(invoice_id):
row = db.execute(
"SELECT id, number, total_cents, currency, status, created_at "
"FROM invoices WHERE id = ? AND tenant_id = ?",
(invoice_id, current_user.tenant_id),
).fetchone()
if row is None:
abort(404) # 404, not 403 — do not confirm existence
return jsonify(dict(row))Also fixed: SELECT * leaked internal columns to the API response.
Quality checklist
- Every finding names a concrete attacker and a concrete gain
- Severity justified by impact × exploitability, not by CWE class alone
- Each finding has a patch, not just a description
- Access control reviewed at the object level, not only the route
- Secrets redacted in the report; rotation advised for anything committed
- No invented CVEs or version ranges; unverified claims marked
[VERIFY] - False-positive-looking scanner hits explicitly dismissed with a reason
- Hardening notes separated from real vulnerabilities
Failure modes
| Situation | Response |
| Only a snippet is available | State which controls might exist outside the snippet; do not assert exploitability |
| Framework provides implicit protection (ORM, auto-escaping) | Verify it is actually engaged; many have documented escape hatches |
| User asks for a working exploit against someone else's system | Decline; offer defensive verification steps instead |
| Scanner reported 400 issues | Triage by reachability first; report the top exploitable set, summarise the rest |
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.

