Skip to content
Back to Blog
·9 min read·guides

Secure Code Review Checklist for Indian Development Teams

A practical secure code review checklist for Indian dev teams: authorization, tenant scoping, secrets, deserialization, and crypto flaws that SAST misses.

BR

Bachao.AI Research Team

Cybersecurity Research

Get Your Free VAPT Scan

What this means for your business

Indian SMBs without documented security controls face 3× higher breach costs (IBM Cost of a Data Breach 2024). This guide helps you close that gap.

A secure code review catches what SAST tools cannot reason about: whether a handler actually enforces authorization, whether tenant data is scoped correctly, whether a deserialization call trusts attacker-controlled input, and whether crypto is used correctly rather than merely present. Static analysis is necessary but not sufficient — it flags known bad patterns in isolation; it cannot trace whether the object ID in a request maps to the caller's own tenant. Indian engineering teams shipping fast under delivery pressure need a checklist that a human reviewer can run against every pull request without becoming a bottleneck.

Why SAST alone is not enough

Static Application Security Testing (SAST) tools are pattern matchers. They are excellent at catching hardcoded secrets, use of deprecated crypto functions, obvious SQL string concatenation, and known-vulnerable library versions. What they are structurally bad at is business-logic context: a SAST scanner cannot tell you that GET /api/invoices/:id fetches an invoice by primary key without checking whether the invoice belongs to the requesting tenant. That is an authorization bug, not a syntax pattern, and it is invisible to a tool that reads code line by line without understanding your data model.

OWASP's own guidance is explicit about this gap. The OWASP Code Review Guide states that manual review is required to catch business-logic flaws, and the OWASP Top 10 for 2021 elevated "Broken Access Control" to the number one risk category precisely because these flaws are pervasive and hard to detect automatically (owasp.org). Access-control and authorization defects are logic errors specific to your application; no generic scanner ships with knowledge of your tenant model.

🛡️
SECURITY
If your SAST pipeline is green, that tells you the code has no known-bad patterns. It does not tell you the code is authorized correctly, scoped correctly, or safe to deserialize. Treat SAST as a floor, not a ceiling.

What a human reviewer must check that tools miss

1. Authorization on every handler, not just the "protected" ones

The single most common defect a human reviewer finds is a handler that authenticates the caller (confirms who they are) but never checks whether that caller is allowed to perform the requested action on the requested resource. This is broken access control, and it is routinely exploited as an Insecure Direct Object Reference (IDOR) — changing an ID in a URL or payload to access another user's data.

Checklist for every new or modified handler:

    1. Does this endpoint check authentication AND authorization separately?
    2. Is the authorization check performed on the object the caller is trying to access, using an ID from the request — not just a role check that ignores which record is being touched?
    3. Are admin-only or internal endpoints reachable only through the intended route, with no unauthenticated debug/test path left in?
    4. Does every new route added in this diff inherit the same authorization middleware as sibling routes, or was it added ad hoc?

2. Tenant scoping in multi-tenant SaaS

For any Indian SaaS product serving multiple customers from shared infrastructure, every database query that reads or writes tenant data must be scoped to the caller's tenant ID. A missing WHERE tenant_id = ? clause, or an ORM query that fetches by primary key alone, is a cross-tenant data leak waiting for a curious or malicious user to change one number in a request.

Checklist:

    1. Does every query touching multi-tenant tables filter by tenant/organization ID derived from the authenticated session — never from a client-supplied field?
    2. Do background jobs, webhooks, and admin tools apply the same tenant scoping as user-facing endpoints?
    3. Are joins across tables tenant-scoped on both sides, not just the outer query?

3. Secrets in code, config, and logs

SAST and secret-scanning tools catch obvious hardcoded API keys reasonably well, but reviewers still need to check for secrets that leak through logging statements, error messages returned to clients, or committed .env.example files that were later filled in and committed for real. A human reviewer should also check whether a secret that was previously exposed has actually been rotated, not just removed from the current diff — removing a key from git history requires more than a new commit.

4. Unsafe deserialization

Deserializing untrusted input into native objects — via libraries like Python's pickle, Java's native serialization, or unsafe YAML loaders — is a well-documented path to remote code execution. This is exactly the class of bug behind the Log4Shell vulnerability (CVE-2021-44228) in Apache Log4j, where a crafted string passed to a logging call triggered JNDI lookups and remote code execution; it remains one of the most cited examples of why input handling in serialization/lookup paths deserves manual scrutiny even in trusted-looking library code (nvd.nist.gov). Reviewers should flag any deserialization of request bodies, cookies, or queue messages using non-safe loaders, and confirm yaml.safe_load (not yaml.load), safe JSON parsing, or an allow-listed deserializer is used.

5. Injection sinks beyond SQL

SAST catches naive string-concatenated SQL well. It is weaker on: NoSQL query injection (MongoDB operator injection via unsanitized JSON), command injection through exec/subprocess calls built from user input, template injection in server-side rendering, and LDAP/XPath injection in enterprise integrations. A reviewer should trace every place user input reaches a sink that interprets it as code or a query, and confirm parameterization or a safe API is used rather than string building.

6. Cryptography misuse

Presence of encryption is not the same as correct encryption. Common defects a scanner misses because the crypto library itself is "approved": ECB mode used for anything beyond a single block, IVs/nonces reused across encryptions, keys derived from low-entropy secrets without a proper KDF, and JWTs verified without checking the algorithm (the classic alg:none bypass). NIST's guidance on cryptographic standards (NIST SP 800-57 and related publications) is the reference point for correct key management and algorithm choice (nist.gov); reviewers should confirm the usage pattern matches guidance, not just that an approved library is imported.

1OWASP Top 10 2021 rank of Broken Access Control (OWASP)
28,961CVEs disclosed in 2023 across the CVE Program, illustrating scale of known-pattern vulnerabilities alone (NVD/CVE Program 2023)
⚠️
WARNING
A green SAST dashboard combined with zero human review of authorization and tenant-scoping logic is one of the most common root causes behind cross-tenant data exposure incidents in Indian SaaS products. The scanner did its job; nobody did the job it cannot do.

Fitting this into PR review without slowing delivery

The objection every engineering lead raises is fair: a full manual security review of every line in every PR is not sustainable at delivery velocity. The fix is not to review everything deeply — it is to route review depth by risk, automating the parts that automation is good at and reserving human attention for the parts that automation cannot see.

graph TD A[Pull request opened] --> B[Automated SAST scan] B --> C[Dependency and secret scan] C --> D{Touches auth
payments or
data access} D -->|Yes| E[Deep human security review] D -->|No| F[Standard peer review] E --> G{Authz tenant
scoping crypto
checks pass} G -->|Yes| H[Merge approved] G -->|No| I[Request changes] F --> H I --> A style A fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style B fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style C fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style D fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style E fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0 style F fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style G fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0 style H fill:#1e3d2f,stroke:#10B981,color:#e2e8f0 style I fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0

The routing logic in that diagram is the entire discipline: every PR gets automated SAST and dependency/secret scanning by default — cheap, fast, catches known patterns. Only PRs that touch authentication, payments, or data-access layers get pulled into a deeper human review pass focused specifically on the six checklist items above. Everything else proceeds through standard peer review. This keeps average review time low while ensuring the highest-risk diffs — the ones that actually cause breaches — get the scrutiny automation cannot provide.

The split below is qualitative, not a precise statistic — but it reflects the well-documented pattern in secure development literature: automation dominates on syntactic, known-pattern defects, while business-logic flaws like broken access control skew heavily toward findings that only a human reviewer with context on the system catches.

pie title Vulnerability classes by typical catch layer "Access control flaws - human review" : 30 "Injection and deserialization - human review" : 15 "Crypto misuse - human review" : 10 "Known CVEs and bad patterns - automation" : 30 "Secrets and config exposure - automation" : 15
Review layerCatchesSpeedWhen it runs
SAST / lintingKnown bad patterns, deprecated APIs, obvious secretsSecondsEvery PR, CI-gated
Dependency / SCA scanVulnerable library versionsSeconds–minutesEvery PR, CI-gated
Standard peer reviewLogic errors, readability, test coverageMinutesEvery PR
Deep security reviewAuthz gaps, tenant scoping, deserialization, crypto misuse15–45 minutesAuth, payment, data-access diffs only
Independent VAPT / pen testChained exploits, real-world attack pathsDaysPeriodic, pre-release
🎯Key Takeaway
SAST tells you the code has no known-bad patterns; it cannot tell you whether the code is authorized correctly, scoped to the right tenant, or safe to deserialize. Route every PR through automated scanning, but reserve focused human review — using an explicit checklist for authorization, tenant scoping, secrets, deserialization, injection sinks, and crypto usage — for diffs that touch auth, payments, or data access. That routing is what keeps security review fast enough to survive contact with a real delivery schedule.

Know your vulnerabilities before attackers do

Run a free VAPT scan — takes 5 minutes, no signup required.

Book Your Free Scan

Building secure code review into your workflow

Codify the six checks above as a PR template checklist item, not tribal knowledge held by one senior engineer. Indian teams growing past their first few engineers lose this discipline exactly when it matters most — during rapid hiring, when reviewers with the security context are outnumbered by reviewers without it. A written checklist, enforced as a PR template section that must be explicitly checked off for auth/payment/data-access diffs, survives team turnover in a way that "ask the senior dev to look at it" does not.

Pair this discipline with periodic independent verification. A checklist-driven human review reduces the rate at which access-control and logic flaws reach production, but it does not replace a full penetration test that chains multiple findings the way a real attacker would. Combining continuous automated scanning, checklist-driven human PR review, and periodic professional VAPT — delivered with a CERT-In empanelled partner where a compliance mandate requires it — covers the layers that any single control misses on its own. DSCI's guidance to Indian enterprises on secure development consistently emphasizes this layered approach rather than reliance on any one tool (dsci.in).

For organizations building toward DPDP Act compliance, secure code review is also a documented control that demonstrates "reasonable security safeguards" under the Act — the standard MeitY has signaled will be assessed in the event of a personal-data breach investigation. Read more on the DPDP compliance page.

💡
TIP
Start small: add the six checklist items as a required PR template section only for files matching auth, payment, and data-access paths in your repo. Expanding the checklist to every PR immediately is how security review dies a slow death from reviewer fatigue.

Bachao.AI runs automated VAPT scanning that complements this human review layer — surfacing the known-pattern vulnerabilities and misconfigurations continuously, so your engineers' limited manual-review time stays focused on the authorization and business-logic defects that only a human can catch. Dhisattva AI Pvt Ltd built the platform specifically for Indian teams that need continuous coverage without a dedicated in-house security function. You can book a free VAPT scan to see where your current pipeline's blind spots are, or browse our security blog for more on secure development practice.

Frequently Asked Questions

What is the difference between SAST and a manual secure code review?
SAST is automated pattern matching that catches known-bad code patterns like hardcoded secrets or deprecated crypto calls in seconds. Manual review adds business-logic context a scanner cannot infer, such as whether an endpoint checks authorization against the specific resource being accessed, or whether a query is properly scoped to the caller's tenant.
How do we do secure code review without slowing down every PR?
Route review depth by risk. Run automated SAST and dependency scanning on every PR by default, and reserve a deeper, checklist-driven human security review only for diffs touching authentication, payments, or data access. Standard peer review handles everything else.
What is an IDOR vulnerability and why does SAST miss it?
An Insecure Direct Object Reference occurs when an application exposes an internal object ID and fails to verify the requesting user is authorized to access that specific object. SAST tools read code syntactically and cannot trace whether an authorization check exists for a given ID at runtime, which is why OWASP classifies broken access control, including IDOR, as requiring manual review.
Why is unsafe deserialization dangerous even if the library is trusted?
Deserializing untrusted input into native objects can let an attacker construct payloads that trigger unintended code execution, as seen in the Log4Shell vulnerability (CVE-2021-44228). The library being "trusted" does not matter if the input feeding it is attacker-controlled and the deserialization path is unsafe.
Does secure code review replace penetration testing?
No. Code review catches individual defects during development; penetration testing chains multiple findings together the way a real attacker would, across the deployed system rather than the diff in front of a reviewer. Indian teams should run both, along with continuous automated scanning, as complementary layers.
Is secure code review relevant to DPDP Act compliance?
Yes. Documented secure development practices, including code review for authorization and data-scoping defects, support the "reasonable security safeguards" requirement under the DPDP Act 2023, which MeitY has indicated will be scrutinized following any personal-data breach.
BR

Bachao.AI Research Team

Cybersecurity Research

AI-powered security research and threat intelligence from the Bachao.AI team. Covering the latest vulnerabilities, CVEs, and cybersecurity developments affecting Indian businesses.

Get cybersecurity insights for Indian SMBs

Weekly vulnerability alerts, DPDP compliance tips, and security guides. No spam — unsubscribe anytime.

We respect your privacy. Your email is never shared.

Know your vulnerabilities before attackers do

Free automated scan — risk score in under 2 hours. No credit card required.

Get Your Free VAPT Scan
Find your vulnerabilitiesStart free scan →