Security code review is the last line of defense before vulnerabilities reach production. This checklist covers injection, authentication, cryptography, error handling, and automated tools — with language-specific guidance.
Anay Pandya
1,577 words
Anay Pandya
Founder of ZeriFlow · 10 years fullstack engineering · About the author
Key Takeaways
Security code review is the systematic examination of source code to identify vulnerabilities before the software is deployed. While automated tools catch many issues, human review remains essential for finding logic flaws, authorization gaps, and architectural weaknesses that static analysis cannot detect.
<div class="zf-stat-callout" style="background:#0d1117;border:1px solid rgba(16,185,129,0.25);border-left:3px solid #10b981;border-radius:4px;padding:16px 20px;margin:24px 0"> <p style="margin:0 0 4px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.15em;color:#10b981;font-family:monospace">ZeriFlow Data — 12,400+ sites analyzed</p> <p style="margin:0;font-size:13px;color:#e2e8f0;line-height:1.6;font-family:monospace">In ZeriFlow's corpus of 12,400+ scanned sites, 72% score below 70/100 on security. Only 7% achieve a score above 85 — a threshold that corresponds to passing all OWASP-aligned header and configuration checks.</p> </div>
Keep reading
Is your site actually secure?
Run a free check — 60 seconds
This guide provides a comprehensive checklist organized by vulnerability category, explains the best automated tools to support human review, and offers language-specific guidance for the most common stacks.
After fixing code-level issues, check your deployment: Run ZeriFlow to verify that your deployed application's security configuration — headers, SSL checker, exposed paths — matches the security of your code. 80+ automated checks in under a minute.
Security code review should be integrated into your standard code review process, not treated as a separate activity. The most effective approach:
Injection flaws occur when untrusted data is sent to an interpreter as part of a command or query.
raw(), execute()) are audited for user-supplied input.Dangerous patterns to flag:
# Python — DANGEROUS
cursor.execute('SELECT * FROM users WHERE id = ' + user_id)
# Python — SAFE
cursor.execute('SELECT * FROM users WHERE id = %s', (user_id,))exec(), system(), subprocess, os.popen()) are identified.HttpOnly, Secure, and SameSite=Strict (or Lax) attributes.Authorization flaws (Broken Access Control) are the #1 OWASP vulnerability category.
secrets module in Python, crypto.randomBytes() in Node.js, not Math.random()).alg: none attack vector in JWT handling is checked.Semgrep is the best open-source SAST tool for security code review support:
# Install
pip install semgrep
# Run OWASP Top 10 rules
semgrep --config p/owasp-top-ten .
# Run security audit rules
semgrep --config p/security-audit .
# Run language-specific security rules
semgrep --config p/javascript .
semgrep --config p/python .Semgrep's rule library covers injection, hardcoded secrets, insecure crypto, and dozens more categories.
GitHub's CodeQL performs deep inter-procedural taint analysis — tracking data from source to sink:
# .github/workflows/codeql.yml
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript, python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3CodeQL is particularly strong at finding injection vulnerabilities that span multiple functions.
eval(), Function(), setTimeout(string), setInterval(string) with user input are flagged.innerHTML, outerHTML, document.write()) are audited.child_process.exec() with user input is replaced with execFile() with argument arrays.prototype pollution vulnerabilities in object merging functions are checked.pickle.loads() on untrusted data is flagged (arbitrary code execution).yaml.load() is replaced with yaml.safe_load().subprocess.shell=True with user input is flagged.Raw(), extra() query methods audited for injection.render_template_string() with user input is flagged.ObjectInputStream) is flagged.Runtime.exec() with string concatenation is replaced.@RequestParam values used in SQL or LDAP queries are checked.A: For routine changes, a security-focused review adds 15-30 minutes to a normal code review. For authentication systems, payment flows, or other high-risk components, dedicated security reviews of 2-4 hours per hundred lines of critical code are appropriate.
A: Every developer should have basic security awareness for their language. For high-risk changes (auth, payments, user data), bring in a developer with dedicated security expertise. Security champions programs — one security-focused developer per team — scale this effectively.
A: No. Automated tools catch pattern-based vulnerabilities well (injection, hardcoded secrets, insecure API usage). They cannot find authorization logic flaws, business logic vulnerabilities, or design-level security issues. Manual review remains essential for these categories.
A: Authentication and authorization flaws are consistently the highest-impact vulnerabilities — they give attackers access to data and functionality they should not have. Start every security review by tracing authentication and authorization code paths.
A: Security code review and ZeriFlow address different layers. Code review finds vulnerabilities in application logic. ZeriFlow scans the deployed application for configuration security — headers, TLS, exposed paths. Both are necessary; neither replaces the other.
The most effective security code review is not a separate, heavyweight process but security questions integrated into your existing pull request workflow. Use this checklist as a starting point, automate what you can with Semgrep and CodeQL, and focus human attention on the logic and architecture decisions that tools cannot evaluate.
After every significant deployment, run ZeriFlow to confirm that the application-level security in your code is matched by the configuration-level security of your deployment.
<!-- zf-internal-links -->
Related resources
Website Vulnerability Scanner
Run a broader website security audit across headers, TLS, DNS, cookies, SEO, and disclosure checks.
Security Headers Checker
Check CSP, HSTS, X-Frame-Options, and other response headers.
SSL Checker
Review TLS certificate, HTTPS, and transport security signals.
DMARC Checker
Validate email authentication records for domain spoofing protection.
CSP Checker
Review Content-Security-Policy coverage and common gaps.
June 24, 2026
Best Security Tools for AI Startups
Monitor your security score
Schedule recurring scans and catch regressions after deployments.