Use both. Automated static analysis catches known insecure patterns across every commit at low cost. Human review catches problems of intent, design and business logic that a tool cannot judge. NIST's secure development framework describes code review and code analysis together, and lets organizations choose methods by software stage.
What the framework says
NIST SP 800-218 (SSDF version 1.1) has a practice called PW.7: review and/or analyze human-readable code to identify vulnerabilities and verify compliance with security requirements. It defines code review as a person looking directly at the code, and code analysis as tools finding issues, fully automated or with a person. One listed example is using a static analysis tool with a human reviewing the issues it reports.
Strengths of each
Tools run on every change, report file and line, and detect well known flaws. OWASP says static analysis scales well and can run in nightly builds or CI.
People understand what the code is meant to do. A reviewer can notice that a discount endpoint trusts a price sent by the client, or that an admin check is missing on a new route.
Weaknesses of each
OWASP lists static analysis as weak on authentication, access control and cryptography misuse, and prone to false positives. Humans tire, vary in skill and cannot read every change closely.
Division of labor
| Task | Better suited to |
|---|---|
| Spotting known injection patterns | Tool |
| Checking every pull request for secrets or unsafe functions | Tool |
| Reviewing authorization on a new endpoint | Person |
| Judging whether a design leaks data between tenants | Person |
| Reviewing crypto usage choices | Person, with tool hints |
| Confirming a tool finding is real | Person |
A workable routine
- Let the tool run on each pull request and post findings as comments.
- Ask reviewers to skim tool output first, then spend their time on what tools cannot see.
- Keep a short checklist for risky changes: authentication, payments, file upload, new external calls.
- Record decisions. SSDF asks that discovered issues and remediations are recorded and triaged in the team's workflow.
Common mistakes
One mistake is asking reviewers to find what tools already catch. Reading code for missing semicolons or known unsafe functions wastes expert attention. Another is treating a tool comment as a review. A person still has to decide whether the change is correct. Give reviewers a short security checklist for risky areas and let the tool handle repetitive patterns. Rotate reviewers so that knowledge spreads, and record notable findings so the team learns from them.
Quick check
Does a clean tool report mean the review can be lighter?
No. A clean report says known patterns were not found. It says nothing about missing checks or flawed design.
Who should do the human review?
Someone other than the author, ideally with context on the area. Escalate sensitive code to a reviewer with security experience.
Where Safeguard fits
Safeguard provides pull request policy gates and dependency scanning, so reviewers can focus on logic. A free scan shows your dependency risk in minutes.
Sources
Last reviewed: 19 October 2026.