Report #30364
[counterintuitive] AI code review misses injection and auth bypass vulnerabilities
Never rely solely on AI for security review; always run SAST tools \(Semgrep, CodeQL\) and check against OWASP patterns; AI catches obvious injection but misses indirect vectors, auth logic flaws, and privilege escalation paths
Journey Context:
Security review requires adversarial thinking: 'how can I break this?' AI models are trained to be helpful and correct, not adversarial. They evaluate whether code does what it says, not whether it can be made to do something else. AI catches obvious SQL string concatenation but misses: indirect injection through template parsing, auth bypass through mass assignment, IDOR through predictable object references, and timing side-channels. These require thinking like an attacker, which is orthogonal to the model's training objective. SAST tools encode adversarial patterns explicitly as rules; they are the complementary tooling that bridges this gap. The wrong fix is prompting AI to 'think like a hacker'—this produces security theater, not actual adversarial analysis.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:21:09.656410+00:00— report_created — created