Security review procedure
A focused rubric for security review of a code change. Designed as the
"security" specialist dimension of a multi-perspective PR review, but
applies equally to a standalone audit.
Scope
Review ONLY your assigned diff (or module). Cross-module concerns go to
the architecture specialist; correctness bugs without security impact go
to correctness.
Checklist summary (10 sections)
- Authentication & authorization — endpoint auth checks, session tokens, RBAC, fail-closed, multi-tenant
- Input validation — type/range/length/encoding, parameterization, regex anchoring, structured data parsers
- Data exposure — error messages, logs, response fields, timing/cache leaks
- Crypto & secrets — hardcoded keys, safe defaults, weak primitives,
random vs secrets, password hashing
- Injection — SQL, shell, LDAP, template, HTML/XSS
- File / path handling — path containment, zip-slip, temp files, symlinks
- Supply chain — typosquatting, pinned versions, endpoint validation
- Deserialization & parsers — pickle, yaml.load, eval, exec, XXE
- Race conditions / TOCTOU — atomic file operations, lock scope
- Denial of service — unbounded loops on user input, rate limiting
See threat-model.md for full per-section detail and CWE mapping.
Severity calibration
CRITICAL — exploitable now, no special conditions: auth bypass, RCE, full data exposure
HIGH — data exposure / auth gap requiring specific conditions
MEDIUM — mis-scoped tokens, weak validation, missing rate limit
LOW — defense-in-depth hardening
INFO — notes for future consideration
Rule of thumb: CRITICAL vs HIGH — user action required to exploit? No = CRITICAL, chained = HIGH.
HIGH vs MEDIUM — exploitable at attacker's expected access level? Yes = HIGH, needs escalation = MEDIUM.
Output format
| Severity |
Location |
Description |
Suggested fix |
Confidence |
Runtime-context caveats |
| HIGH |
file.py:112 |
Path not containment-checked |
resolve() + relative_to(root) |
High |
Requires malicious planner output |
Verdict at top: APPROVE | REQUEST CHANGES | REJECT.
Cite file:line. Reference CWE where clear (CWE-22 path traversal, CWE-89 SQLi).
Ground rules
- Don't invent requirements.
- Flag runtime context you need but can't see.
- Be honest about confidence.
- Review against committed HEAD of the PR branch.
Source: ohdearquant/lionagi — distributed by TomeVault.
1---2name: ohdearquant-lionagi-lionagi3description: Security review procedure4---56# Security review procedure78A focused rubric for security review of a code change. Designed as the9"security" specialist dimension of a multi-perspective PR review, but10applies equally to a standalone audit.1112## Scope1314Review ONLY your assigned diff (or module). Cross-module concerns go to15the architecture specialist; correctness bugs without security impact go16to correctness.1718## Checklist summary (10 sections)19201. **Authentication & authorization** — endpoint auth checks, session tokens, RBAC, fail-closed, multi-tenant212. **Input validation** — type/range/length/encoding, parameterization, regex anchoring, structured data parsers223. **Data exposure** — error messages, logs, response fields, timing/cache leaks234. **Crypto & secrets** — hardcoded keys, safe defaults, weak primitives, `random` vs `secrets`, password hashing245. **Injection** — SQL, shell, LDAP, template, HTML/XSS256. **File / path handling** — path containment, zip-slip, temp files, symlinks267. **Supply chain** — typosquatting, pinned versions, endpoint validation278. **Deserialization & parsers** — pickle, yaml.load, eval, exec, XXE289. **Race conditions / TOCTOU** — atomic file operations, lock scope2910. **Denial of service** — unbounded loops on user input, rate limiting3031See [threat-model.md](threat-model.md) for full per-section detail and CWE mapping.3233## Severity calibration3435- `CRITICAL` — exploitable now, no special conditions: auth bypass, RCE, full data exposure36- `HIGH` — data exposure / auth gap requiring specific conditions37- `MEDIUM` — mis-scoped tokens, weak validation, missing rate limit38- `LOW` — defense-in-depth hardening39- `INFO` — notes for future consideration4041**Rule of thumb**: CRITICAL vs HIGH — user action required to exploit? No = CRITICAL, chained = HIGH.42HIGH vs MEDIUM — exploitable at attacker's expected access level? Yes = HIGH, needs escalation = MEDIUM.4344## Output format4546| Severity | Location | Description | Suggested fix | Confidence | Runtime-context caveats |47|---|---|---|---|---|---|48| HIGH | `file.py:112` | Path not containment-checked | resolve() + relative_to(root) | High | Requires malicious planner output |4950Verdict at top: `APPROVE` | `REQUEST CHANGES` | `REJECT`.51Cite `file:line`. Reference CWE where clear (CWE-22 path traversal, CWE-89 SQLi).5253## Ground rules54551. Don't invent requirements.562. Flag runtime context you need but can't see.573. Be honest about confidence.584. Review against committed HEAD of the PR branch.5960---61> Source: [ohdearquant/lionagi](https://github.com/ohdearquant/lionagi) — distributed by [TomeVault](https://tomevault.io).62<!-- tomevault:4.0:skill_md:2026-06-29 -->