Application securityChecklist3 min readUpdated September 2026

Secure Code Review: A Checklist for Everyday Pull Requests

A secure code review checks that each change enforces who can do what, handles untrusted input safely, keeps secrets out of code, and doesn't add risky dependencies. Reviewers don't need to be security experts to catch most issues if they use a short, consistent checklist.

Use the list below on every pull request that touches authentication, data access, external input or infrastructure, and let automated tools cover the routine checks.

Vendors Covered in this Article

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

What should a reviewer ask on every pull request?

Before reading line by line, ask five questions about the change:

  1. Who can trigger this code? Anonymous users, signed-in users, admins, another service?
  2. What data does it touch? Customer data, credentials, payment details, logs?
  3. What does it trust? Anything from a request, a file, a webhook or a third-party API is untrusted until validated.
  4. What changes if it fails? Does it fail open (grants access) or closed (denies)?
  5. What did it add? New dependencies, new endpoints, new permissions, new environment variables.

If a pull request is too large to answer these, ask the author to split it. Large diffs invite skimming, while five small ones get read.

Authentication and authorization checks

Broken access control is the flaw reviewers most often miss, because the code works for the happy path. Check:

  • Every endpoint has an authorization check, not only a login check. Being signed in doesn't mean being allowed.
  • Object-level checks. When a request names an ID, the code verifies the caller owns or may access that record, not just that the ID exists.
  • Tenant boundaries. Queries include the tenant or organization filter, and it comes from the session, not the request body.
  • Role logic is centralized. Scattered role checks drift. Prefer a shared policy function.
  • Sensitive actions are re-verified. Changing email, exporting data or altering permissions may need fresh confirmation.

A quick test: ask 'what happens if I change this ID to another customer's?'

Input, output and secrets: the common injection points

Trace untrusted data from where it enters to where it's used:

  • Queries. Parameterized queries or an ORM's safe methods, never string-built SQL or shell commands.
  • Output. Data rendered into pages is escaped by the framework. Look closely at anywhere raw HTML is inserted.
  • File and URL handling. Uploaded filenames, paths and user-supplied URLs are validated. Server-side requests to user-provided addresses can reach internal services.
  • Deserialization and templates. Untrusted data isn't fed into unsafe parsers or template engines.
  • Secrets. No keys, tokens or passwords in code, tests, config samples or logs. If one appears, treat it as leaked and rotate it.
  • Cryptography. Standard libraries, not homemade schemes. Passwords use a slow, salted hashing function, and random tokens come from a secure generator.

Dependencies, logging and error handling

Check what the change brings in and what it leaves behind:

  1. New packages. Is it maintained, is it needed, and does its license fit? A scanner such as Snyk or GitHub Advanced Security can help surface known vulnerabilities and license problems during review. Confirm in a demo how each fits your repositories and workflow.
  2. Fix timelines. CISA's federal directives required agencies to patch critical vulnerabilities on internet-facing systems within 15 days and high ones within 301. Set your own deadlines and enforce them in review.
  3. Errors. Messages shown to users don't reveal stack traces, queries or internal names.
  4. Logs. Security events (login failures, permission changes) are logged, and sensitive values (passwords, tokens, full card numbers) never are.
  5. Configuration. Debug modes and permissive settings aren't shipped to production.

How do you build the checklist into the workflow?

Checklists that live in a wiki are ignored. Put this one where reviewers work:

  • Add a short security section to the pull request template with the five questions and the checks above as tick boxes.
  • Automate the mechanical checks: secret scanning, dependency scanning and static analysis on every pull request, so humans review logic.
  • Require a second reviewer for changes to authentication, payments and infrastructure.
  • Keep a short list of past findings, so reviewers learn from real mistakes.

Code written with AI assistants deserves the same scrutiny, and often more; the AI-generated code security review checklist covers what to look for. For help choosing scanners, see the scanner comparison.

Executive Capability Standard

What Good Looks Like

Every pull request answers the five security questions, automated scans run before review and sensitive changes get a second reviewer.

Building The Capability (5-Stage Skill Ladder)

1. Learn:Read through the five reviewer questions and the checks for access control, input, secrets and dependencies.
2. Do Manually:Apply the checklist by hand to the last five merged pull requests that touched data access and note what it would have caught.
3. Delegate:Nominate a security champion on the team to maintain the checklist and review sensitive changes.
4. Automate:Run secret, dependency and static analysis scans on every pull request and block merges on critical findings.
5. Buy:Adopt a code security platform once the number of repositories makes manual triage of scanner output too slow.

How to Get Started

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

Frequently Asked Questions

What is a secure code review?

It's a review of code changes specifically for security flaws, such as missing authorization, unsafe input handling, leaked secrets and risky dependencies. It can be done by teammates using a checklist, supported by automated scanners in the pull request workflow.

Who should perform secure code reviews?

Any engineer can do the routine review with a checklist. For sensitive areas such as authentication, payments or cryptography, involve someone with security experience. Rotate reviewers so knowledge spreads across the team.

Can automated tools replace manual secure code review?

No. Tools catch known patterns like vulnerable packages, hardcoded secrets and some injection flaws. Humans catch logic errors such as missing authorization checks and abuse cases. Use tools for the routine and reviewers for design and business logic.

How long should a secure code review take?

For a small change, a few extra minutes with the checklist. Keep pull requests small so reviews stay thorough. If a change is too large to reason about, split it, because large diffs tend to get skimmed.

Sources

Where we quote a benchmark, we show its source. Other figures in this guide are estimates or general guidance, so check them against your own numbers.

  1. Security patch remediation SLAs (CISA federal mandates, used as industry norm). CISA Binding Operational Directives 19-02 and 22-01 (CISA briefing hosted at NIST CSRC), 2022.

Related Guides