Pull Request Security Checklist Mapped to the OWASP Top 10:2025
A pull request security checklist mapped to every OWASP Top 10:2025 category, showing what scanners catch and what human code reviewers must still check.
By Victor Sanchez
A pull request security checklist is the cheapest control you can add to a team, and the one most teams skip. In our remediation work on .NET and Angular applications, most of the findings that reached a scanner report had passed code review first. Reviewers were checking naming and tests; nobody asked "who is allowed to call this?". This checklist maps each OWASP Top 10:2025 category to concrete questions, and separates what automation catches from what a human has to check.
What changed in the OWASP Top 10:2025?
The 2025 edition keeps Broken Access Control at the top and folds Server-Side Request Forgery (SSRF) into it. It adds A03 Software Supply Chain Failures, which expands the old "vulnerable and outdated components", and a new A10 Mishandling of Exceptional Conditions. Security Misconfiguration moved up to A02.
What should automation catch before review?
Let the pipeline do the repetitive work, so reviewers can spend their attention on logic:
- SAST (SonarQube, Veracode, CodeQL): injection patterns, weak crypto, dangerous APIs.
- Dependency audit:
npm audit, NuGet Audit, Dependabot. See outdated and compromised packages. - Secret scanning: gitleaks and push protection. See hardcoded secrets.
- Build rules: analyzers as errors, banned APIs, lockfile checks.
Tools are good at patterns. They are poor at intent: they cannot know that only the account owner should see a statement.
The PR security checklist, mapped to the OWASP Top 10:2025
| Category | Ask in review | Automation helps with |
|---|---|---|
| A01 Broken Access Control | Does every new endpoint have an authorization policy? Is the resource checked against the current user, not only the ID in the URL? Can a URL from the user make the server call internal hosts? | Little. Some SAST rules flag missing [Authorize] |
| A02 Security Misconfiguration | Did CORS, headers, error pages or debug flags change? Are new settings safe by default in production? | Config scanners, IaC linters |
| A03 Software Supply Chain Failures | Is the new package needed, correctly named and maintained? Did the lockfile change more than expected? | Audits, Dependabot/Renovate, signatures |
| A04 Cryptographic Failures | Is sensitive data encrypted in transit and at rest? Any custom crypto, MD5/SHA-1 for passwords, or hardcoded keys? | SAST, secret scanning |
| A05 Injection | Is any input concatenated into SQL, shell commands, LDAP, HTML or file paths? Any FromSqlRaw or innerHTML? | SAST is strong here |
| A06 Insecure Design | What happens if this flow is abused: replayed, run in parallel, run with negative amounts? Are limits and rate limits in place? | Almost none |
| A07 Authentication Failures | Are tokens validated (issuer, audience, expiry)? Are sessions invalidated on logout and password change? | Partial |
| A08 Software or Data Integrity Failures | Is untrusted data deserialized? Are webhooks and updates verified with signatures? Can CI run code from forks with secrets? | Some SAST rules, pipeline policies |
| A09 Security Logging and Alerting Failures | Are security events (login failures, permission denials, admin actions) logged? Are secrets and personal data kept out of logs? | Little |
| A10 Mishandling of Exceptional Conditions | Do errors fail closed? Is a catch swallowing an exception and continuing as if the check passed? Do error responses leak stack traces? | Some analyzers flag empty catch blocks |
The most common review miss: access control
This is the finding we see most in APIs, and no scanner flagged it in the code below:
// Vulnerable: any authenticated user can read any statement by changing the id
[Authorize]
[HttpGet("statements/{id:int}")]
public async Task<ActionResult<StatementDto>> Get(int id, CancellationToken ct)
{
var statement = await _db.Statements.FindAsync([id], ct);
return statement is null ? NotFound() : Ok(statement.ToDto());
}
// Fixed: the query is scoped to the caller
[Authorize]
[HttpGet("statements/{id:int}")]
public async Task<ActionResult<StatementDto>> Get(int id, CancellationToken ct)
{
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
var statement = await _db.Statements
.Where(s => s.Id == id && s.Account.OwnerId == userId)
.Select(s => s.ToDto())
.FirstOrDefaultAsync(ct);
return statement is null ? NotFound() : Ok(statement); // 404, not 403: do not confirm it exists
}
Hiding a button in Angular is not access control either; the API must enforce it.
A10 in practice: fail closed
// Vulnerable: if the limits service fails, the transfer goes through
bool withinLimit;
try { withinLimit = await _limits.CheckAsync(request, ct); }
catch (Exception ex) { _logger.LogWarning(ex, "Limit check failed"); withinLimit = true; }
// Fixed: an error means "no"
bool withinLimit;
try { withinLimit = await _limits.CheckAsync(request, ct); }
catch (Exception ex) { _logger.LogError(ex, "Limit check failed"); withinLimit = false; }
How to run the security review in practice
- Start with the diff's attack surface: new endpoints, new inputs, new dependencies, changed config.
- Read the PR description: ask authors to fill in a short security section ("new endpoints: ...; auth: ...; data touched: ...").
- Check only the categories that apply. A CSS change does not need ten questions.
- Look at what is missing: the absent
[Authorize], the absent ownership filter, the absent test for the forbidden case. - Ask for a negative test. "User B cannot read user A's statement" is worth more than a comment.
The same checklist works for AI-generated code, which tends to skip authorization and error handling; see reviewing AI-generated code.
Pitfalls
- Treating a green pipeline as a security sign-off.
- Reviewing only the changed lines, not the code paths they open.
- Giant PRs: nobody reviews security in 3,000 lines.
- Checklists so long that people tick every box without reading.
- No negative tests for authorization.
Checklist
- SAST, dependency audit and secret scanning run on every PR.
- PR template includes a short security section.
- Every new endpoint has authorization and ownership checks.
- No input reaches an interpreter without parameters or encoding.
- Errors fail closed and do not leak internals.
- Security-relevant events are logged without secrets.
- Negative tests cover forbidden access.
Key takeaways
- Automation finds patterns; humans find missing intent.
- Access control is the category reviewers must own.
- The 2025 list adds supply chain and exceptional conditions: review both.
- Short, relevant checklists get used. Long ones get ticked.
Sources
Need help with secure code review?
Santhor runs security reviews of existing .NET and Angular applications, fixes what we find, and helps teams set up review checklists and pipelines that catch issues before they ship. We are based in Costa Rica and work nearshore with teams in the U.S. and Latin America. Tell us about your project.