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)

  1. 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
  2. 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
  3. 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)

  1. 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
  2. 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
  3. 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)

  1. 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
  2. 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
  3. 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)

  1. 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
  2. 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)

  1. 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.

  1. Critical · Injection · Discourse benchmark copy, PR 10

    An admin controller builds SQL with string interpolation ('#{h}').

    The check: SQL takes parameters

  2. Critical · Injection · Discourse benchmark copy, PR 4

    The Referer header goes into JavaScript unescaped: cross-site scripting.

    The check: Output is escaped for where it lands

  3. Critical · SSRF · Discourse benchmark copy, PR 4

    open(SiteSetting.feed_polling_url) fetches any URL the setting holds.

    The check: URLs the server fetches are validated

  4. Critical · Identity · Discourse benchmark copy, PR 3

    A case-sensitive email lookup lets User@Example.com past a block on user@example.com.

    The check: Identities compare without case

  5. High · Access · Grafana PR 103633

    Cached grants are trusted, cached denials ignored, so a revoked permission can still pass.

    The check: Cached permissions are trusted both ways or neither

  6. High · Identity · Cal.com PR 14740

    The blocked-guest list is lowercased but guest emails are not, so capitals get through.

    The check: Identities compare without case

  7. Medium · Identity · Sentry PR 67876

    OAuth state reuses a static pipeline signature instead of a per-request random value.

    The check: Sessions and OAuth state are unguessable

  8. Low · Injection · Keycloak PR 37429

    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.

Known security issues each AI reviewer caught in 13 pull requests
ReviewerCaughtShareF1False alarms
Qodo v2Caught: 11 of 18Share: 61%F1: 73.3%False alarms: 1
IonWarp · DeepSeek V4.1 FlashCaught: 10 of 18Share: 56%F1: 62.5%False alarms: 4
CodeRabbitCaught: 10 of 18Share: 56%F1: 54.0%False alarms: 9
Greptile v4.1Caught: 7 of 18Share: 39%F1: 53.8%False alarms: 1
Cursor BugbotCaught: 6 of 18Share: 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]

The checklist against OWASP Top 10:2025 and the 2025 CWE Top 25
CheckOWASP Top 10:2025CWE Top 25 (2025)
Output is escapedOWASP Top 10:2025: A05 InjectionCWE Top 25 (2025): #1 CWE-79 Cross-site scripting
SQL takes parametersOWASP Top 10:2025: A05 InjectionCWE Top 25 (2025): #2 CWE-89 SQL injection
Sessions and OAuth state are unguessableOWASP Top 10:2025: A01 Broken Access ControlCWE Top 25 (2025): #3 CWE-352 Cross-site request forgery
Every route checks who is askingOWASP Top 10:2025: A01 Broken Access ControlCWE Top 25 (2025): #4 CWE-862 Missing authorization
URLs the server fetches are validatedOWASP Top 10:2025: A01 Broken Access ControlCWE Top 25 (2025): CWE-918 Server-side request forgery
New dependencies are known-safeOWASP Top 10:2025: A03 Software Supply Chain FailuresCWE Top 25 (2025): n/a
Errors fail closedOWASP Top 10:2025: A10 Mishandling of Exceptional ConditionsCWE 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.

The IonWarp app’s Bugs screen in the sample Acme workspace: 16 bugs caught on pull requests, 1 escaped, 3 issues open
What the IonWarp app showsThe Bugs screen, in the sample workspace: each bug its agents caught on a pull request, next to the ones that got past.

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.

  1. OWASP, OWASP Top 10:2025, read .
  2. MITRE, 2025 CWE Top 25 Most Dangerous Software Weaknesses, read .
  3. OWASP, A01:2025 Broken Access Control (includes CWE-918 SSRF and CWE-352 CSRF), read .
  4. OWASP Cheat Sheet Series, Server-Side Request Forgery Prevention Cheat Sheet, read .
  5. OWASP Cheat Sheet Series, SQL Injection Prevention Cheat Sheet, read .
  6. OWASP Cheat Sheet Series, Session Management Cheat Sheet, read .
  7. GitHub Docs, About secret scanning, read .
  8. Gitleaks on GitHub, gitleaks, read .
  9. GitHub Docs, About Dependabot alerts, read .
  10. Martian on GitHub, code-review-benchmark, Core set: 50 pull requests and their answer key, revision e616e849 (MIT), read .
  11. IonWarp, Security Review benchmark: 13 pull requests, 18 known issues (provisional, release 2026-10-12), read .
  12. Winding Labs on GitHub, ai-code-review-benchmark: every row, pull request and verdict (CC BY 4.0), read .
  13. GitHub, CodeQL documentation, read .
  14. Semgrep, Semgrep documentation, read .
  15. OWASP, OWASP Code Review Guide, read .
  16. OWASP, Application Security Verification Standard 5.0.0, read .
  17. GitHub Docs, Creating a pull request template for your repository, read .

FAQ

Quick answers

What is a secure code review?

A review of a code change for security flaws: missing access checks, injection, exposed secrets, weak authentication, unsafe dependencies and errors that fail open. It reads the code itself, before the change ships.

What is the OWASP secure code review checklist?

OWASP publishes a Code Review Guide and the Application Security Verification Standard (ASVS 5.0.0), not one short checklist. The 12 checks on this page follow the OWASP Top 10:2025 categories.

How is secure code review different from SAST?

SAST tools such as CodeQL and Semgrep match known code patterns automatically. A secure code review also judges access rules and business logic, which a pattern can’t know.

What are the benefits of a secure code review?

It finds what scanners can’t see, such as access rules and business logic, before the change ships, and it ties each finding to a standard an auditor knows: an OWASP category or a CWE number.

How often should you do a secure code review?

On every pull request that touches authentication, authorization, input handling, secrets or dependencies, and as a deeper review before a major release. Add a line to the checklist each time a security bug gets past review.

What are the most common security bugs in code review?

In the 50 open-source pull requests of the benchmark: SQL built from strings, unescaped output, unvalidated server-side fetches, case-sensitive identity checks and weak OAuth state.

Get a security review on every PR.

Get started

See pricing

By , Co-founder, IonWarp. Published .

Co-founder of Segment (acquired by Twilio, 2020). Builds IonWarp at Winding AI, Inc. See something wrong? Send us a correction.