The AI security risk gap is no longer a warning about the future. It is a measurement of the present: developers now write almost half of production code with artificial intelligence, yet the security practices meant to keep it safe have barely moved. A major 2026 industry report puts numbers on the split.
Checkmarx surveyed 2,350 security chiefs, application security managers and developers across 14 countries for its 2026 Future of Application Security report. Run by Censuswide in March 2026 and released on 8 June, it found 96 percent of developers have AI tooling in their editor. Only 18 percent apply security continuously as they write code.
That delay is the gap. AI-generated code now accounts for roughly 49 percent of production code, and 59 percent of what ships comes from open-source repositories. The more AI-written code an organisation ships, the more likely it is to ship code it knows is vulnerable. The fix is to rebuild application security, known as AppSec, around how software is actually written now.
Key takeaways
- AI-generated code now makes up about 49 percent of production code, yet only 18 percent of developers apply security continuously as they write.
- Organisations where AI writes 81 to 100 percent of production code ship known-vulnerable code 47 percent of the time, against 14 percent at low AI use.
- Three quarters of organisations knowingly deploy vulnerable code, and 95 percent of security chiefs feel pressure to delay compliance-related security issues.
- Only 22 percent of organisations have a formal AI governance policy, leaving 78 percent without controls over tools developers already use daily.
- Best practice means security inside the coding tool, deterministic checks plus AI reasoning, governed agents, and fixes tested before a developer sees them.
What the research actually found
Seventy-five percent of organisations said they knowingly deploy code with security flaws at some point, driven by deadlines and the hope flaws will not be found. That is down from 81 percent a year earlier, but it still means three in four regularly trade speed for safety.
The pressure is explicit. Ninety-five percent of security chiefs said they feel pressure to suppress or delay compliance-related security issues when deadlines are at stake. Only 19 percent said their budget is enough to proactively reduce application risk. The gap is not only technical; it sits where engineering speed meets executive expectation.
The sharpest finding links AI-written code to vulnerable code. Organisations where AI generates 1 to 20 percent of production code ship known-vulnerable code 14 percent of the time; at 81 to 100 percent it is 47 percent, about 3.4 times higher. Seventy percent of developers said AI code generation created more vulnerabilities in 2025.
Why the old AppSec playbook stops working
Traditional AppSec was built around checkpoints: a developer finished a feature, opened a pull request, and a scanner ran. That worked when code changed slowly. It breaks down when code is generated at machine speed, because findings grow faster than any team can triage them.
The report calls this the tooling trap. Developers have the tools: 96 percent have AI-powered security tooling in their editor, and 99.6 percent rate it effective. Yet only 18 percent use security continuously while they code. The rest catch issues after the code exists, when the cheapest moment to fix a flaw has passed.
Governance is the second broken piece. Only 22 percent of organisations have a formal AI governance policy. The other 78 percent have no controls over which AI tools developers use or what data they can see. Shadow AI fills the vacuum: unapproved coding tools are in use at 18 percent of organisations, roughly triple what security chiefs believe.
The third piece is the supply chain. Modern applications are assembled as much as written, and 59 percent of production code comes from open-source repositories. Every dependency is code the team did not write, and AI tools can suggest dependencies that are outdated, unmaintained or invented entirely. The average application now holds more than 1,200 dependencies, yet few organisations have guardrails for AI-specific risks such as hallucinated dependencies.
The risk gap at a glance
The AI security risk gap at a glance
| Measure | What the 2026 research found |
|---|---|
| AI share of production code | About 49 percent, and still rising as coding assistants become standard |
| Developers with AI tooling in their editor | 96 percent, with 99.6 percent rating it as effective |
| Developers applying security continuously | Only 18 percent; the rest check security after the code exists |
| Known-vulnerable code, high AI use | 47 percent where AI writes 81 to 100 percent, about 3.4 times higher |
| Organisations knowingly shipping vulnerable code | 75 percent, down from 81 percent a year earlier |
| Formal AI governance policies | 22 percent have one, up from 18 percent; 78 percent do not |
| Survey behind the figures | 2,350 CISOs, AppSec managers and developers in 14 countries, surveyed 10 to 30 March 2026 |
What best practice looks like now
The report’s answer is not more scanning. It is hybrid security: deterministic checks that give provable answers, paired with AI reasoning that judges context and prioritises. Neither works alone. A scanner can flag a risky pattern but not whether the code is reachable; an AI model can reason about context but cannot be trusted to grade its own work. The deterministic layer must act as ground truth.
The first change is to move security into the coding tool. Teams should run static analysis, dependency checks and secrets detection where code is written, and shape what the AI produces before it writes anything, by giving the assistant approved libraries, banned patterns and the organisation’s own standards as context. Gartner’s Application Security Strategy 2026 research makes the same point: govern AI-augmented development and allow experimentation except for the most sensitive projects.
The second change concerns the agents themselves. AI agents that read code and change systems need the same treatment as any powerful account: their own identity, access scoped to the task, a full audit trail, and a way to stop them in minutes. Sixty-two percent of security chiefs already require human sign-off before an AI system can act on a security finding, and only 13 percent are comfortable with autonomous remediation. That caution is best practice, not resistance.

The third change is to fix remediation rather than finding. Most programmes produce long lists of vulnerabilities and close them slowly. The emerging practice is to validate a proposed fix before the developer sees it: run it against the project’s own build and tests, and show the passing results in the pull request. Application security posture management, or ASPM, does this at scale by correlating findings across tools and prioritising by real risk.
The fourth change is the least glamorous and the most important: know what you have. That means an inventory of applications, interfaces, identities, models and tools, including the ones AI agents use. Undocumented endpoints and unapproved tools are where risk hides, and the US National Institute of Standards and Technology’s Secure Software Development Framework already expects organisations to identify, prioritise and remediate vulnerabilities.
How this differs from the attacker side of the story
This story should not be confused with a related one. AI systems are now the fastest-growing target for attackers, according to honeypot data published by Amazon Web Services in December 2026, which recorded attempts to exploit known flaws in AI software rising about 800 percent between the first and third quarters of the year. That is about attackers probing AI systems; this article is about defenders shipping AI-written code faster than their own security processes can check it.
The two stories reinforce each other. Attackers move quickly because AI systems are valuable and widely deployed, sometimes by teams without security expertise. Defenders fall behind because code arrives faster than review. The answer is not to slow adoption, but to make verification as fast as generation, so speed stops being the enemy of safety.
There is also a caution about confidence. The organisations that rated themselves most mature reported the highest volumes of AI-generated code, at 60 percent, and the highest rates of knowingly shipping vulnerable code, at 42 percent. Feeling secure and being secure are different things: only 11 percent of security chiefs said their organisation had been breach-free in the past year, against 1 percent of AppSec managers.
Checklist: closing the AI security risk gap
- Write a formal AI governance policy naming approved coding tools and the data they may access.
- Inventory everything: applications, interfaces, identities, models and tools, including tools adopted without approval.
- Run deterministic checks inside the coding tool, so analysis and secrets detection happen while code is written.
- Give every AI agent its own identity, scoped access and an audit trail, with human sign-off on system changes.
- Test every proposed fix against the project’s own build and tests before it reaches a developer.
- Prioritise by exploitability, not raw severity scores, so developers fix flaws on a real attack path first.
- Track what matters: AI share of code, share reviewed continuously, and time from finding to fix.
- Never let a scanner be the only judge of AI-written code, or an AI model the only judge of its own output.
Frequently asked questions
What is the AI security risk gap?
It is the difference between how fast AI tools write code and how fast security processes check it. AI code makes up about 49 percent of production code, but only 18 percent of developers apply security continuously, so flaws reach production unreviewed.
Does AI-generated code really have more vulnerabilities?
The research shows a strong link between AI-written code and shipping known-vulnerable code, from 14 percent at low AI use to 47 percent at high use. Seventy percent of developers said AI code generation created more vulnerabilities in 2025, because volume and speed outrun review.
What is hybrid security in AppSec?
It pairs deterministic checks, which give provable answers, with AI reasoning that judges context and prioritises. The deterministic layer is ground truth, so the AI cannot grade its own work, and the AI layer cuts the noise that makes developers ignore scanner output.
Should organisations ban AI coding tools?
No. Gartner’s guidance is to allow experimentation and only block AI-assisted development for very sensitive projects. Banning tools developers already use pushes them underground, which is how shadow AI grows.
What is shadow AI, and why does it matter?
Shadow AI means AI tools adopted without approval or oversight, found in use at 18 percent of organisations, roughly triple what security chiefs believed. Without governance, nobody knows what data those tools have seen or what code they have produced.
What should a team do first to close the gap?
Start with governance and an inventory: write a policy naming approved tools and data rules, then list every application, interface, identity, model and tool in use. Then move checks into the coding tool and test every fix before it reaches a developer. A single flaw with a public exploit, such as a critical flaw with a public exploit, shows why the inventory matters: you cannot protect what you do not know you have.
The bottom line
The AI security risk gap is real, measured, and widening wherever governance and verification lag behind generation. Almost every developer uses AI tooling, almost nobody secures code continuously, three quarters of organisations knowingly ship vulnerable code, and only a fifth have a formal policy for the tools their people use daily.
The fix is known and practical: security inside the coding tool, deterministic checks paired with AI reasoning, governed agents with scoped access and human sign-off, and fixes tested before they reach a developer. How AI generates code and reviews pull requests is now a normal part of development, and teams that build security around that reality will ship fast and stay safe. The rest will keep discovering the gap the expensive way, one incident at a time.


