Discover your interests, together

Real deals, honest reviews and shopping stories from people who share your interests — every day on Milik.

Discover your interests, togetherReal deals, honest reviews and shopping stories from people who share your interests — every day on Milik.

AI Writes Code Faster Than Ever—Security Testing Has Stalled

AI Writes Code Faster Than Ever—Security Testing Has Stalled
Interest|AI-Assisted Productivity

The new AI code assembly line meets a 2019 security mindset

AI code generation security refers to the emerging set of risks, controls, and validation practices needed when software is written partly or wholly by AI systems, whose speed and volume of output overwhelm traditional human-centric development and security testing workflows that were designed for slower, manual code production processes.

Software writing has been rebuilt in about eighteen months: agents now scaffold services, generate endpoints, wire up authentication, produce migrations, and open pull requests. Teams that used to talk about features per quarter now talk about merges per day. Whatever you think about quality, that throughput shift is permanent—and security is not keeping pace. Most organisations still assess applications the way they did in 2019: an annual penetration test, a scheduled scanner, and code review that assumes a human wrote the diff and another human will read it carefully. Those assumptions were sensible when you shipped every two weeks; they are cosmetic when the same team ships eleven times before lunch. The uncomfortable truth is that automated code production has outpaced code security validation, and pretending otherwise is self-deception.

This is not an argument that AI writes inherently insecure code—it is an argument about arithmetic. When you multiply output without multiplying verification, your risk surface expands faster than your ability to see it. Engineering leaders who celebrate AI productivity while leaving security workflows unchanged are accepting an invisible, compounding debt. The mismatch is no longer a theoretical concern; it is a structural flaw in how modern software is built.

Why AI-generated code fails differently—and escapes old tests

Traditional security testing makes quiet assumptions: that a human wrote the change, that intent is legible in the diff, and that reviewers or tools will notice questionable patterns. Those assumptions start to fall apart when AI agents generate large swathes of uniform code. When an agent creates forty CRUD endpoints from a schema, they are well-typed, documented, stylistically identical, and share centralised authentication. But authorisation is per-object and per-tenant, rooted in what your product means by ownership, and must be encoded in each handler. If thirty-nine handlers enforce the boundary and one does not, that single endpoint becomes a data breach with an ID parameter in front of it, indistinguishable from its thirty-nine safe neighbours.

Reviewers—human or AI—are mostly checking whether a change is well-formed. The question that decides your breach risk is different: does the deployed system as a whole still enforce the business boundary? That cannot be answered by staring at an isolated diff. Volume makes the situation worse. Catching 95% of authorisation mistakes is outstanding work at ten changes a week; at four hundred, the remaining 5% becomes a steady leak of exploitable paths into production. Agentic development concentrates risk exactly in per-object authorisation across large, uniform surfaces, the category that both AI code review and conventional scanning are structurally unable to see.

This is where AI development risks become most acute. Organisations are increasing code output by an order of magnitude while holding verification flat. With increased production velocity comes added risk: one report shows teams now report 54% more bugs per developer compared to pre-AI processes. Treating AI as a faster junior developer without redesigning verification is not cautious experimentation; it is wilful blindness.

Data from the field: access control is the quiet failure mode

If you want to know where AI code generation security is failing in practice, look at exploitation data instead of opinion. Across 47,291 exploitation-validated findings from 3,847 web applications and APIs between October 2025 and March 2026, broken access control was the single most common finding, present in 42% of all applications assessed. More tellingly, scans run with an active authenticated session found 3.4 times more vulnerabilities than scans of the same applications run without one. That ratio should terrify teams who still rely on unauthenticated scanners and call it “coverage”.

The 3.4x gap exposes a simple mechanical truth: conventional unauthenticated scans are not showing you a partial view of your attack surface, they are showing you a small minority of it. The part they systematically omit is the part that requires reasoning about identity—nearly every instance of one user reaching another user’s data remained invisible until testing logged in with real credentials and attempted, deliberately, to cross a tenant boundary. A scanner sees an HTTP 200 with well-formed JSON and records success; it has no idea that the invoice in the response belongs to a different company.

This is not a missing signature in some vendor’s database; it is a missing test oracle. Agentic development concentrates risk right where traditional tooling and AI reviewers are blind: per-object, per-tenant authorisation across a large, uniform surface. Meanwhile, AI adoption is nearly universal—84% of developers have adopted AI, and 51% use such tools daily. The gap between how code is produced and how its boundaries are validated is widening every sprint.

Borrowing from ‘dark factories’: toward agentic verification

Engineering leaders love talking about AI coding copilots but pay less attention to the equally important question: who, or what, will test all that code? As AI accelerates code production, some argue software teams should copy manufacturing and move toward “lights-out” or dark factories for testing, where automated production lines operate with minimal human input and humans focus on quality control and oversight. For software, the idea is a ‘dark testing factory’: an isolated, automated pipeline where AI agents execute large parts of the testing process so that new code can be exercised safely before it reaches users.

Demand for testing is exploding, and teams are struggling to keep up with the volume and velocity of development using traditional approaches. One product engineering leader notes that while customers are shifting toward more automated, AI-fuelled testing setups, progress is moderate and, in his words, “almost none of our customers are there at the moment… None of our customers [have] achieved the holy grail of making testing fully autonomous. I don’t think it is achievable in the short-term and mid-term”. That blunt assessment matters: fully autonomous security is a fantasy for now, but ignoring automation because perfection is out of reach is equally flawed.

On the security side, autonomous penetration testing platforms are emerging, aiming to validate by exploitation rather than inference. AI penetration testing that validates by exploitation can produce lists of issues that were proven, with the requests and retrieved data attached, not vague conditions that might be concerning. Viktor Bulanek, who founded one such platform for development teams, argues the key is to require proof, not inference, and to demand sample findings that include the request, response, and data actually retrieved. This approach does not replace skilled human testers—novel business logic abuse and creative chained attacks remain human work—but it moves depth from an annual budget line to something that can run at the cadence you deploy at.

What teams should change now: treat cadence, not intent, as the threat

The common failure in how organisations think about AI development risks is intent-focused: is AI writing bad patterns, hallucinating insecure code, making silly mistakes? That concern is valid but secondary. The core problem is that organisations are increasing code output by an order of magnitude while holding verification flat. When deployment cadence shifts to multiple releases per day, an annual assessment leaves fifty-one weeks of unreviewed change in production. No amount of good intentions in code review will compensate for that temporal gap.

Security workflows must be rethought around cadence and proof. First, match verification cadence to deployment cadence: security checks that cannot run as often as you ship are decorative. Second, prioritise authenticated, identity-aware testing that targets per-object and per-tenant access control, because that is where AI-generated surfaces concentrate risk and where unauthenticated scanners see almost nothing. Third, favour tools and partners that validate by exploitation, providing concrete evidence—requests, responses, and retrieved data—rather than long, speculative lists of potential issues.

UiPath’s view of dark testing factories and platforms that offer autonomous penetration testing both point in the same direction: more agentic verification to keep pace with agentic development. UiPath also contends that such factories can help automate aspects of testing before bugs and vulnerabilities cause downstream issues. The goal is not full autonomy but meaningful coverage at machine speed. If AI lets your team ship eleven times before lunch, your security posture is only honest if some form of AI-augmented testing can keep up. Otherwise, you are trading short-term throughput for long-term, invisible exposure—and that bargain will not hold when the first quiet authorisation bug turns into a headline-making breach.

Milik earns a commission when you shop through our links, at no extra cost to you.

You May Also Like

Comments
Say something...
No comments yet. Be the first to share your thoughts!