Veracode's 2026 GenAI Code Security Report (released 28 July 2026) found that AI-generated code has an average security pass rate of 56 percent across more than 100 models, virtually unchanged from the previous year. Nearly half of all AI-generated code fails security checks. That headline has circulated widely, but the number alone does not tell you how to act on it. This post explains what the test conditions were, where the failures concentrate, and what the limits of the data are, so you can draw conclusions that actually hold up.
What the Test Actually Measured
The Veracode tests are run on raw models with no security-specific prompting. Each model was given code-generation tasks across multiple programming languages and vulnerability categories under standardised conditions. No agent frameworks, no guardrails, no human review in the loop, and no instructions to the model to be cautious about security.
That is a deliberate and reasonable choice for a benchmark: it tests what the model does by default. It is also an important limit to understand. Real production code is rarely generated without any guidance. Developers add context, review output, and run static analysis. The 56 percent figure describes model behaviour at baseline, not the security of code in a team's production repository. What it tells you is how much work a developer needs to do on top of raw model output before the code is safe to ship.
For contrast: the same models achieve a near-universal 100 percent syntax pass rate. They generate compilable code almost every time. Security is the gap between syntactically correct and actually safe.
The Leaderboard Numbers Worth Knowing
The report tracked more than 100 models across four testing snapshots. OpenAI's GPT-5.5 had the highest score in the report at 68 percent, so even the top model in that test failed nearly one in three security tasks. Newer models may score differently. Six of the 11 models on the leaderboard cluster between 50 and 53 percent. Alibaba's Qwen3.7-max scored 50 percent, generating vulnerable code every other output.
One pattern worth noting for enterprise procurement teams: Kimi-K2.6 and MiMo-V2.5 outperform several Western models on the security leaderboard. If your security policy or supply chain rules affect which AI models your team is permitted to use, those constraints now have a real effect on security outcomes.
Two Assumptions That Do Not Survive the Data
The report makes two findings that challenge commonly held beliefs about AI coding tools.
First, models built specifically for software development are not more secure than general-purpose models. Coding-specialised models average a 51 percent security pass rate. General-purpose models average 52 percent. The difference is within noise. Developers choosing a coding-optimised tool on the assumption it will produce safer code are getting the same security risk as a general-purpose alternative.
Second, model size does not help. Large models (over 100 billion parameters) average 53 percent. Medium models average 51 percent. Small models average 51 percent. More parameters do not equal more secure code generation.
The one architectural factor that does help is reasoning: reasoning models achieve 56 percent versus 51 percent for non-reasoning models. One plausible explanation, which the data alone does not prove, is that extended reasoning works like an internal review pass. The gap is modest, but it is the only consistent technical differentiator in the dataset.
Language Risk Is Not Uniform
Security pass rates vary substantially by programming language. Python scores 63 percent, the strongest language average. Java scores 30 percent, the lowest by a significant margin. If your team generates Java code with AI assistance and does not run it through a static analysis tool before review, roughly seven out of ten outputs have a security issue.
Java does show a consistent upward trend across the year, the only language in the report with clear directional improvement. Whether that trend continues into 2027 is an open question, but it is worth tracking if your stack is Java-heavy.
The per-language variation matters for practical decisions. A team writing Python with strong code review and automated scanning is in a different risk position than a team generating Java or other lower-scoring languages with minimal review. The overall 56 percent figure masks that range.
What This Means for Teams Reviewing AI-Generated Code
The practical conclusion is to treat AI-generated code like any unreviewed code: scan it, fix the findings, and do not ship it blind. The mistake is not using AI coding tools. The mistake is treating their output as already reviewed.
When reviewing AI-generated pull requests, the security check should be treated the same way you would treat a contribution from a junior developer who is strong on syntax but weak on secure patterns. That means running a linter and static analysis tool before the review, not as a replacement for it. The AI-built app security checklist covers the categories that appear most commonly in reviews of AI-assisted codebases.
The AI coding tools for founders post covers the practical side of selecting and using these tools. What this Veracode data adds is the security layer that tool comparison articles rarely include.
The Limits of This Data
Two limits are worth stating clearly. First, this is vendor research. Veracode makes money from security scanning tools. Their interest is in demonstrating that scanning is necessary, which is consistent with what their data shows. The methodology appears sound, but independent replication would strengthen the conclusions.
Second, the tests measure raw model output without agent frameworks, memory, retrieval, or systematic prompting for security. Teams that have built prompting discipline, use security-aware system prompts, or run automated scanning in their CI pipeline before human review will see different outcomes than the benchmark suggests. The 56 percent figure is a floor, not a prediction of what a careful team will ship.
What does not change based on either of those limits: AI models do not catch security issues the way they catch syntax issues. Until that changes, the responsibility sits with the reviewer and the process, not the model.
A Note on the Wider Picture
The Veracode data fits alongside other findings about AI-generated code quality. A 2026 study on arXiv (Liu et al., 2603.28592) analysed 302,600 verified AI-authored commits from 6,299 GitHub repositories and found that 22.7 percent of introduced issues were still present in the latest version of the repository. Code smells made up about 89 percent of all issues, with security issues in the remainder, but the persistence pattern is the same: AI-introduced issues do not automatically get cleaned up.
The combination matters. Code that compiles, passes functional tests, and has no obvious visible bugs can still carry security issues that are invisible to the developer who wrote it and invisible to a reviewer who focuses on logic correctness. That gap between 'it works' and 'it is safe' is exactly what the Veracode report is measuring.
If you want a second set of eyes on a codebase that includes AI-generated code, our free code review tool runs automated checks for the categories that appear most frequently in AI-assisted codebases, including secrets in source, dependency vulnerabilities, and common security misconfigurations. If you would like a human review alongside the automated scan, you can request one from the same page.
Common questions
How secure is AI-generated code according to Veracode's 2026 report?
Veracode's 2026 GenAI Code Security Report, released 28 July 2026, found an average security pass rate of 56 percent across more than 100 models, virtually unchanged from the previous year. The tests used raw models with no security-specific prompting.
Are coding-specific or larger AI models more secure?
Not in this data. Coding-specialised models averaged a 51 percent pass rate against 52 percent for general-purpose models, and large models averaged 53 percent against 51 percent for small ones. Reasoning models scored 56 percent versus 51 percent for non-reasoning models.
Should I get AI-generated code reviewed by a person?
Treat AI-generated code like any unreviewed code: scan it, fix the findings and do not ship it blind. If you want a second set of eyes, Zovintra's free code review tool runs automated checks, and a human review can be requested from the same page.
Sources
- LLMs are getting smarter but not safer: Veracode 2026 GenAI Code Security Report - Veracode, 28 Jul 2026
- Veracode Finds AI-Generated Code Security Has Barely Improved Since Last Year - SD Times, accessed 19 Oct 2026
- Debt Behind the AI Boom: A Large-Scale Empirical Study of AI-Generated Code in the Wild - arXiv, 30 Mar 2026



