Guides / Code review checklist
Secure code review checklist: 12 checks mapped to OWASP 2025
A secure code review checklist checks each pull request for the ways code gets attacked: missing access checks, injection, exposed secrets, weak login flows, unsafe dependencies and errors that fail open. The 12 checks below follow the OWASP Top 10:2025, and most come with a real security bug from an open-source pull request.
The general list is the code review checklist; this is its security layer. For the product that runs it on every pull request, see security code review.
Checked
What should a secure code review check?
A secure code review should check 12 things in five groups: access, injection, identity, secrets and dependencies, and failure. Each group names its OWASP Top 10:2025 category.[1]
Access (A01)
- Every route checks who is askingBroken access control is first on the OWASP Top 10:2025,[1] and missing authorization fourth on the 2025 CWE Top 25.[2] Check role and ownership on the server, on every new route.
IonWarp Security Review checks this - Cached permissions are trusted both ways or neitherGrafana trusted cached grants but ignored cached denials, so a stale grant could reach a revoked resource.
IonWarp Security Review checks this - URLs the server fetches are validatedOWASP 2025 files server-side request forgery under A01.[3] Discourse opened a feed URL from a setting with no check; allow-list hosts and schemes.[4]
IonWarp Security Review checks this
Injection (A05)
- SQL takes parametersSQL injection is second on the 2025 CWE Top 25.[2] Discourse built an admin query with string interpolation; use bound parameters.[5]
IonWarp Security Review checks this - Output is escaped for where it landsCross-site scripting is first on the 2025 CWE Top 25.[2] Discourse put the Referer header into a script unescaped.
IonWarp Security Review checks this - Sanitizers are tested with hostile inputKeycloak’s anchor sanitizer matched translated links against the English ones, and a translation with more links than the English could be validated wrongly.
IonWarp Security Review checks this
Identity (A04, A07)
- Identities compare without caseDiscourse’s email block list compared case-sensitively, so User@Example.com got past a block on user@example.com; Cal.com lowercased one side only.
IonWarp Security Review checks this - Sessions and OAuth state are unguessableSentry’s GitHub login used a static pipeline signature as the OAuth state. Session IDs need at least 64 bits of entropy and a new value at login.[6] Cross-site request forgery is third on the CWE Top 25.[2]
IonWarp Security Review checks this - Crypto providers and keys are explicitA Keycloak change returned the default keystore instead of BouncyCastle. Name the provider, the algorithm and the key size, and send data over TLS only.
IonWarp Security Review checks this
Secrets and dependencies (A03)
- No secret in code, logs or the client bundleGitHub secret scanning and gitleaks find committed keys;[7][8] a found key is rotated, not just deleted.
IonWarp Security Review checks this - New dependencies are needed and known-safeSoftware supply chain failures are third on the OWASP list.[1] Dependabot alerts flag known-vulnerable versions,[9] and the lockfile or SBOM records exactly what shipped.
IonWarp Security Review checks this
Failure (A09, A10)
- Errors fail closed, and logs keep no secretsMishandling of exceptional conditions is tenth and security logging and alerting failures ninth.[1] A failed check denies, an error page shows no stack trace, and denials are logged without the token or personal data.
IonWarp Log & Errors checks this
Which security bugs reach real pull requests?
The security bugs that reach real pull requests are mostly injection and identity mistakes: 11 of the 158 known issues in the answer key for 50 open-source pull requests are security bugs, seven of them in Discourse.[10] These eight show the patterns.
An admin controller builds SQL with string interpolation (
'#{h}').The check: SQL takes parameters
The Referer header goes into JavaScript unescaped: cross-site scripting.
The check: Output is escaped for where it lands
open(SiteSetting.feed_polling_url)fetches any URL the setting holds.The check: URLs the server fetches are validated
A case-sensitive email lookup lets User@Example.com past a block on user@example.com.
The check: Identities compare without case
Cached grants are trusted, cached denials ignored, so a revoked permission can still pass.
The check: Cached permissions are trusted both ways or neither
The blocked-guest list is lowercased but guest emails are not, so capitals get through.
The check: Identities compare without case
OAuth state reuses a static pipeline signature instead of a per-request random value.
The check: Sessions and OAuth state are unguessable
The anchor sanitizer can give the wrong result when a translation has more links than the English text.
The check: Sanitizers are tested with hostile input
How many security bugs do AI code reviewers catch?
AI code reviewers caught at most 11 of 18 known security issues on IonWarp’s Security Review benchmark of 13 open-source pull requests: Qodo v2 caught the most, and IonWarp caught 10, 2nd of 5 on F1 at 62.5%.[11][12] So keep the checklist: let an AI reviewer flag the patterns, and a person judge who may do what.
| Reviewer | Caught | Share | F1 | False alarms |
|---|---|---|---|---|
| Qodo v2 | Caught: 11 of 18 | Share: 61% | F1: 73.3% | False alarms: 1 |
| IonWarp · DeepSeek V4.1 Flash | Caught: 10 of 18 | Share: 56% | F1: 62.5% | False alarms: 4 |
| CodeRabbit | Caught: 10 of 18 | Share: 56% | F1: 54.0% | False alarms: 9 |
| Greptile v4.1 | Caught: 7 of 18 | Share: 39% | F1: 53.8% | False alarms: 1 |
| Cursor Bugbot | Caught: 6 of 18 | Share: 33% | F1: 50.0% | False alarms: 0 |
Caught means the judge matched a reviewer’s comment to a known security issue; false alarms are comments that matched none. The lane is provisional: one run per reviewer and pull request. Every row and PR is on the Security Review benchmark.
How does the checklist map to OWASP and CWE?
Each check lands on an OWASP Top 10:2025 category, and four map to the top four of the 2025 CWE Top 25, so a reviewer can tie a finding to the standard an auditor asks about.[1][2]
| Check | OWASP Top 10:2025 | CWE Top 25 (2025) |
|---|---|---|
| Output is escaped | OWASP Top 10:2025: A05 Injection | CWE Top 25 (2025): #1 CWE-79 Cross-site scripting |
| SQL takes parameters | OWASP Top 10:2025: A05 Injection | CWE Top 25 (2025): #2 CWE-89 SQL injection |
| Sessions and OAuth state are unguessable | OWASP Top 10:2025: A01 Broken Access Control | CWE Top 25 (2025): #3 CWE-352 Cross-site request forgery |
| Every route checks who is asking | OWASP Top 10:2025: A01 Broken Access Control | CWE Top 25 (2025): #4 CWE-862 Missing authorization |
| URLs the server fetches are validated | OWASP Top 10:2025: A01 Broken Access Control | CWE Top 25 (2025): CWE-918 Server-side request forgery |
| New dependencies are known-safe | OWASP Top 10:2025: A03 Software Supply Chain Failures | CWE Top 25 (2025): n/a |
| Errors fail closed | OWASP Top 10:2025: A10 Mishandling of Exceptional Conditions | CWE Top 25 (2025): n/a |
Which tools help a secure code review?
The tools that help a secure code review are static analysis such as CodeQL or Semgrep, secret scanning and Dependabot: they catch the known patterns, while access rules and business logic still need a reviewer who knows who may do what.[13][14][7][9]
OWASP’s Code Review Guide explains the method, and ASVS 5.0.0 lists requirements to check against.[15][16] IonWarp’s Security agent reads each pull request for auth gaps, injection, exposed secrets and vulnerable dependencies, and comments on the line.

Is there a secure code review checklist template?
Yes, a secure code review checklist template is below: paste it into .github/pull_request_template.md for changes that touch auth, input or data.[17]
## Security review
- [ ] Every new route checks role and ownership on the server (A01)
- [ ] Cached permissions: grants and denials handled the same way
- [ ] Server-side fetches use an allow-list of hosts (SSRF)
- [ ] SQL uses bound parameters (A05)
- [ ] Output escaped for HTML, JS or URL context (XSS)
- [ ] Sanitizers tested with hostile input
- [ ] Emails and usernames compared case-insensitively
- [ ] OAuth state and session IDs random; new session at login; CSRF tokens on writes
- [ ] Crypto provider, algorithm and key size are explicit
- [ ] No secrets in code, logs or the client bundle
- [ ] New dependencies needed and free of known CVEs (A03)
- [ ] Failed checks deny; errors leak no stack trace (A10)Sources
Sources checked : each one says the day we read it.
- OWASP, OWASP Top 10:2025, read .
- MITRE, 2025 CWE Top 25 Most Dangerous Software Weaknesses, read .
- OWASP, A01:2025 Broken Access Control (includes CWE-918 SSRF and CWE-352 CSRF), read .
- OWASP Cheat Sheet Series, Server-Side Request Forgery Prevention Cheat Sheet, read .
- OWASP Cheat Sheet Series, SQL Injection Prevention Cheat Sheet, read .
- OWASP Cheat Sheet Series, Session Management Cheat Sheet, read .
- GitHub Docs, About secret scanning, read .
- Gitleaks on GitHub, gitleaks, read .
- GitHub Docs, About Dependabot alerts, read .
- Martian on GitHub, code-review-benchmark, Core set: 50 pull requests and their answer key, revision e616e849 (MIT), read .
- IonWarp, Security Review benchmark: 13 pull requests, 18 known issues (provisional, release 2026-10-12), read .
- Winding Labs on GitHub, ai-code-review-benchmark: every row, pull request and verdict (CC BY 4.0), read .
- GitHub, CodeQL documentation, read .
- Semgrep, Semgrep documentation, read .
- OWASP, OWASP Code Review Guide, read .
- OWASP, Application Security Verification Standard 5.0.0, read .
- GitHub Docs, Creating a pull request template for your repository, read .

