The amount of code being generated in the era of AI is staggering, and some non-trivial percentage of that code is insecure. According to the 2026 GenAI Code Security Report, roughly 44% of AI generated code test produced a known vulnerability. Organizations are more reliant than ever on cybersecurity programs that can scale at the velocity of AI while still managing risk with guardrails, governance, and compliance standards.
One emerging question that all security teams are grappling with is the role AI can play in LLM code security. Can AI help security scale and could the tools the frontier AI companies provide become the backbones of modern code security programs?
The data is clear that we’re not there yet. And any replacement of your Software Application Security Testing (SAST) narrative collapses two genuinely different capability questions into one: can LLMs find vulnerabilities? (Yes, some.) Should they replace deterministic scanning? (No, it’s a different tool for a different job.) Getting to the right answer requires separating what each tool does from what vendors and enthusiasts claim it does.
LLMs catch vulnerabilities defined by missing context, for instance: is there a missing check that was omitted by the developer? While deterministic SAST catches vulnerabilities defined by wrong patterns (e.g. will a DB accept an arbitrary command?). Those are different jobs. While some try to use AI for both, the data is showing deterministic SAST is still cheaper, faster, and better for OWASP Top 10 vulnerabilities. However, AI has shown the ability to detect business logic vulnerabilities (ex: IDOR & Broken Auth) that were once only the providence of human actors (good and bad).
What Deterministic SAST Does, and Does Well
Unlike LLMs that use inference as a human would, traditional SAST analyzes source code against a defined set of rules, patterns, and known vulnerability signatures. It performs taint analysis, traces data flows, maps control flow graphs. Every line of code gets evaluated against every applicable rule, every time, with the same result. That consistency gives you the ability to put guardrails around production code with scalable policy enforcement.
The policies work because OWASP Top 10 (ex: SQL injection and cross-site scripting) are well-understood vulnerability patterns with known signatures. And because they sit at the top of every attacker’s playbook, the bar isn’t just finding them. It’s finding them every time, without exception.
Deterministic tools also produce auditable, reproducible results. Every finding traces back to a specific rule, a specific line, a specific scan. That audit trail matters for compliance certifications. Unlike deterministic SAST, LLMs are probabilistic and therefore do not go line-by-line generating auditable results.
And the problem of insecure code is also not going away with coding agents; in fact, it is getting worse. AI now authors roughly half of all committed code across teams that have adopted these tools. The average pass rate of AI generated code sits at 56%, with the scale of AI-generated code exploding and creating more vulnerabilities by volume (2026 GenAI Security Report). At that scale, deterministic coverage of known vulnerability classes isn’t optional. It’s the floor.
Where LLMs Actually Win: Business Logic Vulnerabilities
While deterministic SAST is the right tool for finding what is wrong, what is missing has always been a noticeable gap. That distinction defines an entire class of vulnerabilities that eluded traditional SAST.
Business logic vulnerabilities such as: IDOR, broken authentication, broken access control, and missing authorization checks are defined by the absence of something that should be there. A developer builds an endpoint that queries a database record by ID. The code is syntactically correct. The data flow looks clean. Every line does what it’s supposed to do, so there’s nothing for a traditional deterministic scanner to flag. But there’s no authorization check verifying that the requesting user is allowed to access that specific record.
There’s no wrong pattern to match. There’s no rule to write. A scan can’t flag a line of code that was never written.
LLMs reason about what code is supposed to do in context, and can identify when something critical is absent. They understand access control as a concept, not just as a pattern. When an LLM reviews an external endpoint that reads from a database without an ownership validation, it can surface that as a risk because it’s not pattern matching but rather ‘understanding’ the gap. It’s a powerful new tool in the code security tool belt that all security organizations can benefit from.
Why LLMs Break Down on OWASP Top 10
LLMs don’t read every line of code. They sample. They infer. They reason about what’s probably happening based on what they’ve processed. In doing so, they will miss easily identifiable vulnerabilities that deterministic scanners reliably detect. You can’t rely on their results remaining consistent across subsequent scans.
For business logic vulnerabilities, that inference is the point. The model reasons across the codebase to identify what’s missing.
For OWASP Top 10 vulnerabilities, that same inference is where things go wrong.
When an LLM scans for SQL injection and infers that parameterization is probably happening upstream, without verifying it, that’s not a false positive. It’s a false negative. A confident one. In exactly the vulnerability class attackers know best.
The numbers are stark. The 2026 GenAI Code Security Report found that for cross-site scripting (CWE-80) and log injection (CWE-117) (both OWASP Top 10 staples) models average security pass rates of 15% and 12% respectively. The report explains why: catching these vulnerabilities requires tracking how user input flows across multiple files and function calls. A model reviewing a single function has no visibility into that full picture, so it infers, and it misses. That’s not fixable with better prompting. It’s architectural.
Deterministic SAST doesn’t infer. It doesn’t sample. A SQL injection check doesn’t pass because the model ‘felt good about it’. It passes because the tool verified every path from user input to query execution. It flags on patterns present in the code that can be codified into rules and enforced as policies that prevent vulnerabilities from getting shipped.
Removing those gates by replacing deterministic scanning with AI-native tools for known vulnerability classes doesn’t reduce noise or improve security. You can’t rely on model inference as a foundation to build a code security program on it’s own. It is another tool that can be used for the right job.
Why You Need Both, and How to Say It
Deterministic SAST owns the OWASP Top 10. It’s the compliance foundation. It’s what you point to when auditors want to know how you’re managing known vulnerability classes. It’s reproducible, exhaustive, and cost-effective to run at scale.
With LLMs, you can now pro-actively detect business logic vulnerabilities. Now you finally can surface the missing authorization check, the broken ownership validation, the access control gap no rule could have caught. It does something deterministic tools genuinely can’t do. That’s additive.
The strongest evidence for this architecture isn’t a vendor claiming it. When the Government of Alberta used Claude to scan 466 million lines of government code, their implementation ran a two-stage routine: first a rules engine to flag known patterns, then Claude to review and reason about those flags in context. Anthropic, the company that built Claude, deployed their own model for security scanning at scale using deterministic rules as the foundation and AI reasoning on top. That’s not a legacy constraint. That’s the right call.
When org pressure pushes for AI consolidation and engineering pushes for less friction, the response doesn’t have to be defensive. It can be precise: we’re adopting AI-native scanning and using it for what it’s actually good at. What we’re not doing is removing the tool that keeps us compliant and covers the vulnerability classes most likely to show up in a breach post-mortem.
The security leaders who get this right aren’t the ones resisting AI. They’re the ones who understand it well enough to know where it holds and where it doesn’t and build their programs accordingly.
For a more detailed analysis of the state of LLM code security: download the report.
We’ve just announced our partnership with a leading AI-Native SAST vendor DryRun, you can request a demo today!