A pull request comes in. The description says "added user login endpoint," the tests pass, and the diff looks clean. It was written by an AI assistant, reviewed for five minutes by a developer who's behind on three other tickets, and merged before lunch. Nobody did anything wrong exactly. This is just how a lot of code ships now.
The problem shows up later. A duplicated block of validation logic quietly diverges from the original three months from now. A session token gets stored somewhere it shouldn't. An auth check works perfectly on its own but was never actually wired into the endpoint two files over. None of that shows up in a five-minute skim, and none of it shows up in "the tests passed."
That gap between "it works" and "it's actually safe to own long-term" is what an AI code audit is supposed to catch. Most teams don't have one. Here's what one looks like, why it matters more than it did two years ago, and who's positioned to do it well.
Why this matters more than it used to
GitClear tracks code changes at a scale most of us never see directly, hundreds of millions of lines across real codebases, and their 2026 research on AI's effect on code quality is the closest thing the industry has to ground truth here. As AI-written code has become a bigger share of what gets committed, duplicated code blocks have kept climbing while refactoring has kept dropping. Developers are producing more net-new code and reusing less of what already exists, which is the opposite of the habit that keeps a codebase cheap to maintain.
There's a second number in that same research worth sitting with. Function connectivity, how often a newly written function actually gets called by, or calls, something else in the system, has fallen noticeably since AI tools scaled up. Code is landing more isolated than it used to. Isolated code is the code nobody remembers is there when something breaks.
Stack Overflow's 2025 developer survey gives the human side of the same story. In a field of nearly 50,000 respondents, 66% named "AI solutions that are almost right, but not quite" as their top frustration, and 45% said debugging AI-generated code takes more time than expected. That's not a knock on the tools. It's what happens when the easy 80% gets faster and the hard 20% doesn't.
Fair counterpoint: DORA's State of DevOps research finds most teams report AI having a positive effect on code quality overall. That's not a contradiction, it's a description of what a strong review process buys you. The teams reporting gains generally aren't skipping review. They built one that scales with the volume.
Where the real risk lives: security, not style
Duplicated code is expensive. Insecure code gets you a headline.
Veracode ran AI-generated code from more than 100 large language models through 80 real-world coding tasks across four languages and found that 45% of the samples introduced a known security vulnerability. Java came out worst, failing security checks in roughly 72% of tasks. OWASP has since published guidance mapping its classic web vulnerability categories onto patterns specific to AI output, plus a newer framework for agentic risks, like an agent getting more system access than the task in front of it actually needs.
The vulnerabilities aren't exotic. They're the same mistakes developers have made for twenty years, just produced faster and at higher volume: session tokens that never expire, password reset flows that leak whether an email exists in the system, login endpoints with no rate limiting so a script can hammer them all night. AI models are trained on decades of public code, secure and insecure, and reproduce both patterns with equal confidence.
The failure that catches people off guard most often isn't even inside one file. It's the seam between files. An AI tool writes a correct authentication middleware function, and separately writes a correct route handler, and the actual vulnerability is that the second one never calls the first. Each piece passes review in isolation. Neither reviewer sees the gap, because nobody looked at both at once.
What actually belongs in an audit
Here's the walkthrough, using that login endpoint from the top of this page.
Read the diff for what it's not calling, not just what it's doing. Before checking whether the login logic is correct, check whether it's using the auth middleware the rest of the app relies on, or whether it quietly reimplemented its own version. AI tools do this constantly. It looks like working code because it is working code. It's just not the code your system was built around.
Run it past the OWASP categories that show up most in AI output. For anything touching auth or user data: session handling, rate limiting, and how the reset flow handles a nonexistent account. Ten minutes with a checklist catches most of what Veracode's testing flagged.
Check for duplication against what already exists. If the AI wrote a new validation function, search the codebase for something that already does 90% of the same job. A five-minute search is the difference between one source of truth and two versions that will eventually disagree with each other. That is the practical side of the AI code review gap and the long-term AI-generated tech debt problem.
Verify the dependencies are real and do what the code assumes. AI tools occasionally reference a package method or config flag that doesn't exist, or that existed in an older library version. This is a fast check and a common reason AI-generated code fails in a way that looks like a mystery until someone checks the changelog.
Match test coverage to what's actually risky, not what's easy to test. A login endpoint with a green test suite that only covers the happy path has told you almost nothing. Ask what the tests are missing before asking whether they pass.
This isn't exotic discipline. It's the same rigor good testers have always applied. The difference is knowing which of these five things AI-generated code is statistically more likely to get wrong, so review time goes where the risk actually is instead of spread evenly across all five.
A five-minute version, if that's all you have
Full audits don't happen on every PR, and that's realistic. If you can only do one thing: check whether the code the AI wrote actually connects to the security-relevant code that already exists, rather than reimplementing it. That single check catches the failure mode that shows up most often and does the most damage, and it's the one a fast skim is most likely to miss.
Who's actually qualified to do this work
This is where most teams get stuck, and it's a fair thing to get stuck on. Auditing AI-generated code isn't the same skill as writing code, and it isn't automatically covered by a general QA background either. It takes someone who understands traditional testing discipline and also knows, specifically, where AI output tends to fail in ways a standard checklist doesn't cover.
That's the gap the ASTQB AI Assurance Pro™ designation exists to close. It isn't a certificate in how to use an AI tool. It validates that a tester or engineer can evaluate AI-generated work with the same rigor they'd apply to anything else headed for production, including the failure modes specific to how these tools work.
If you're managing a team and trying to figure out who can be trusted with this kind of review, see what the designation does and doesn't guarantee. If you're a tester building this into your own skill set rather than waiting for someone else to define the role, here's what that work looks like day to day.
The credential that backs this up
Auditing AI-generated code is turning into its own discipline inside QA, and right now almost nobody can point to anything that proves they're good at it. The people who get there first are the ones with something to show for it.
Here's the step-by-step path to the ASTQB AI Assurance Pro™ designation, including the order to take the exams in, how long it realistically takes, and what it takes to keep it current.
Related reading: AI Code Review vs Production · AI-Generated Tech Debt · What Is Vibe Coding? · LLM Testing for QA Engineers