AI writes almost half your code now. Nobody checks if it's safe.
AI & Security / 4 min

AI writes almost half your code now. Nobody checks if it's safe.

A 2026 industry report found AI code generators still fail basic security checks on roughly half of what they write - a number that hasn't moved in two years. Why code review habits built for humans don't catch what AI quietly gets wrong.

The model that writes the code doesn't secure the code

Industry testing in 2026 put real numbers on something developers already suspected: AI code generators write a risky security flaw into roughly 44% of the tasks they complete, and across models the average security pass rate sits at 56% - almost unchanged from 55% a year earlier. On one common flaw, cross-site scripting, models get it wrong 85% of the time. This isn't a problem with one weaker tool either - a bigger model doesn't fix it; large, medium and small models all land within a couple of points of each other.

It's not getting better, and size doesn't help

What makes the number uncomfortable is the trend line: everything else about these models - reasoning, speed, how well they follow instructions - has visibly improved in two years. Security hasn't moved. A model trained to produce code that looks correct and runs on the first try has no particular incentive to produce code that resists an attacker, because "it works" and "it's safe" are different tests, and only one of them shows up when you run the demo.

Nobody reviews it the way they'd review a junior developer

A junior developer's first pull request gets read line by line, because everyone assumes it needs checking. AI output doesn't get the same treatment - it arrives clean, confident, and already formatted, which reads as finished even when it isn't. Teams that adopted AI coding tools fastest are often the ones reviewing output the least, because the whole appeal was speed. The code that ships half-reviewed isn't the AI's fault at that point; it's a process that never adjusted to a new kind of author.

The ACS approach

We treat AI-generated code the same way we'd treat code from a contractor we've never worked with before: it gets read, tested and checked against the same security basics regardless of who or what wrote it. The tool is useful - we use it too - but "the model wrote it" has never been a reason to skip a review, and the data says that's the part most teams are quietly skipping.