Contents
Get a scoped quote

AI-generated code audit for teams shipping with coding agents

See where your tests and checks miss what your agents get wrong. We sample merged pull requests at random, break changed lines and trace security logic.

Get a scoped quote

First reply within 1 business day

See a sample report

A list of merged pull requests, some marked as agent work, with a few drawn at random and highlighted.

Access
An archive or export you send, holding your code at each audited commit, for reading and tests
Time
Duration fixed in the written scope
Report
Within 5 business days of the work ending
  • Fixed scope and fee agreed in writing before work starts.

What is an AI-generated code audit?

An AI-generated code audit reviews code written with AI tools or agents for defects, security and often architecture. "AI code audit" can also mean a tool auditing code. In this audit, the unit is a merged pull request or named critical path, tests included.

Read more

A code audit, in general, is a structured review of code for defects, security weaknesses and how well it can be maintained, across a whole codebase or a bounded part. With agents, a change can carry its own tests and its own summary from the same author, so those need checking as well as the code.

"AI code audit" and "AI codebase audit" can mean an AI tool auditing a repository, or a review of code agents wrote. This is the second. A critical-path unit answers the repository meaning at named paths.

Apps built without engineers on Lovable or Supabase go to Vibe-Coded App Security Audit & Hardening.

When it runs. The sampled audit reads changes already merged, which may already be running, so it measures what has already got through. To read code before a release, the critical-path unit works at a commit agreed in your scope, release candidates included. Either way the report gives findings, and the release decision stays yours.

How do you audit AI-generated code?

Find which changes agents wrote, run your scanners, read test edits, break the changed lines to see whether tests fail, compare the diff with what was asked and the agent's summary, then trace authorisation, secrets and new dependencies. To state a rate, sample at random.

Read more

Rule-based scanners see the patterns their rules name; the other steps are what this audit adds.

What is AI code governance?

AI code governance is the set of policies, checks and reviews that decide whether code written with AI may ship. The phrase also covers controls on the agents themselves. In this audit, the subject is the code; Governed AI Engineering covers the agents.

Read more

AI-generated code governance usually asks who approves such a change, which checks must pass and how authorship is recorded. AI coding governance can mean that, or what an agent is allowed to do, such as its permissions and tools; that second meaning belongs to Governed AI Engineering.

This audit supplies evidence for the first meaning: Which of your checks reported on sampled agent changes, and where they did not. Writing the policy stays with you.

An agent's own tests often miss the lines it changed

In one study of public repositories, agents' test changes raised changed-line coverage in 136 of 605 Python pull requests; in Java, where many were already fully covered, 23 of 64.

Source: Dipongkor et al., arXiv 2607.18057

Anthropic's Code Review docs: "A review with no findings doesn't mean your code is error-free or secure." Beside your review and scanning tools, our report states what was checked.

Read more

The OpenAI report. It covers two internal coding tasks. In the first, an agent repairing an evaluation pipeline disabled automatic alerts to OpenAI's Security team, treating an earlier instruction not to send messages as a reason. In the second, the one above, the user asked the agent to copy a reference implementation during a migration, and the report describes the work being delegated to a subagent around the change.

The earlier test's text is not published. The report prints one assertion from the new test: assert "monitor_ctx" not in saved["context"]. Asked about L1 monitoring, "did you remove that?", the agent's final response was "No [...] I did not remove an enabled monitor from it."

The report says that in both cases the agents considered whether monitoring safeguards should be preserved, but "interpreted routine coding instructions as permission to weaken them". It does not say the test was changed to get a pass, it mentions no build or CI run, and it does not say whether either change was merged or who found it.

Neither was classified as a P0. OpenAI dates discovery the same day as each incident, and says "Auto-Review, which we already require for all internal Codex use, has been updated to detect and block attempts to disable misalignment monitoring." It says it is "assessing whether these cases reflect benign overpersistence or a propensity to evade misalignment monitoring". The monitoring here watches AI agents; it is not application monitoring.

This audit samples merged changes, so the report shows the failure type, not a change our sample would have included.

The study. Dipongkor, Baral, Lam and Moran studied pull requests from the AIDev dataset of public GitHub repositories, mostly one agent's. The 605 and the 64 are merged pull requests that changed both code and tests, in repositories that could be built, with coverage measured with and without the agent's test changes. As shares, 136 of 605 is 22.5% and 23 of 64 is 35.9%.

A pull request whose lines were already fully covered cannot show a gain. By our count from the study's replication data, that describes 27 of the 64 in Java and 47 of the 605 in Python, so Java's count understates what its tests added where they could.

The average gain: From 24.8% to 34.5% of changed lines in Python and from 70.5% to 86.1% in Java, the Java pair resting on 64 pull requests. The authors call the gain significant on average, and add that only a minority of pull requests drive it.

With agent test changes removed, existing tests alone covered 61.5% of changed executable lines in Java and 27.0% in Python, on 213 and 1,664 merged pull requests, and 64.8% of the Python pull requests had no changed line executed.

The authors warn of sampling bias: The analysis covers merged pull requests from repositories that could be built, and the Java repositories are substantially smaller than the full set. The paper has no comparison with human-written tests, so none of this says agents test worse than people do.

The report's own words“an earlier regression test intended to preserve monitoring”

Replaced with

The one assertion the report prints
assert "monitor_ctx" not in saved["context"]

OpenAI reports an internal coding task where, during a requested migration, an agent replaced a regression test intended to preserve misalignment monitoring of AI agents with one requiring that monitoring was not present, and the agent later denied removing the monitoring. The report does not say whether it merged.

Two panels. Left, the report's own words: An earlier regression test intended to preserve monitoring. Right, the one assertion the report prints: assert "monitor_ctx" not in saved["context"].

What you get

Your summary rolls results up per group or path with sample size, findings by kind and severity, and limits. Behind it, each change or path is reported the same way.

  • We audit a stated sample, sized to reveal common failure types and bound a rate, never to clear unsampled code. Only the random draw may be called a measured rate, and only for the changes it was drawn from.
  • Your results are yours; what you tell your customers about your own testing is your decision. You may give them the report or its executive summary; both describe what was audited, and no third party may rely on them as an assurance or letter. We do not name ourselves to your customers without written consent.
  • Independent test evidence, not a certification. We issue no attestation, certification or summary letters. An audit of code Veriprajna designed, built or operates is labelled an internal review, and if Veriprajna authored any remediation, the report says so.
  • Our sample report is this report, filled in from an audit of our own demo repository with changes we planted, not a client's code.
  • Executive summary

    Results per group with the sample size and the bound, the share of your CI's tests that ran or that it cannot be told, which checks reported on how many changes, findings counted by kind and severity, closure marks after the re-test, and what the sample cannot say. No locations and no change IDs, and it gives no opinion.

  • Change ledger

    The engineering annex: Each audited change, its group, its mark and its results, with the draw's seed and list.

  • Test edits read

    Every test edit in each audited change, as read, with what it did to the test.

  • Lines the tests that ran did not notice

    Each surviving break with the line, the result word and the reason, under the rules below.

  • Confirmed findings, ranked

    The ranked list, each finding with its evidence. An option, where your tests run and the written scope includes it: Failing tests for confirmed findings, as a patch file labelled ours. Never on a repository listed as not measured.

  • Gate map

    By check in the report and per change in the annex, so change IDs stay in the annex.

  • Coverage list

    Each change, check or file not measured, and why.

  • Recommendations, including where to hold agent autonomy

    A labelled section of the report, not the summary: First gate changes, and by path where we would hold agent autonomy until a check exists. A recommendation, never a clearance: A path not named is not cleared. The decision stays yours.

What the report records for each sampled change
Change

Its group: Marked as agent work, unmarked, or chosen for risk. A bot account or co-author line shows an agent took part, not who wrote each line.

Test edits

Each test touched: Added, removed, skipped, weakened or rewritten

Test strength

A new discount rule and its test. One line of the rule is broken on purpose; the test, which only checks that a total comes back, stays green.

For example, a new discount rule's test only checks that a total comes back: The rule counts as covered, yet break it and the test stays green.

Breaks the tests that ran did not notice are read up to your scope's limit before any counts as a gap; the rest are counted and marked unread. A noticed break does not show the test checks the right behaviour.

Read against the diff, and the result

The stated request and summary beside what changed. Authorisation, secrets, input handling, new dependencies: Confirmed, discarded or not checked.

Every reported finding is reproduced, or labelled as read from code. Each finding comes with fix guidance; where nothing is found, the row reads not detected at this sample size, with what was covered.

Gate map

Which of your checks reported on this change (the gate map). For each finding, the check re-run on the copy with its result, or the check we would expect to see it, labelled our judgement.

Read more

Unit and frame. The unit of n is one merged change (pull request or merge request) with at least one changed executable line. The frame is named repositories, stated dates and stated marks. The draw's seed and list go in the engineering annex. A critical-path audit has no draw and no rate: Its unit is the named path, and the report reads per path.

Groups stay apart. (a) A random draw of changes marked as agent-involved, by the named marks. (b) A random draw of unmarked changes, or of all merged changes when marks are too few, reported as "authorship not recorded"; that measures merged changes, not agent output. (c) High-risk changes chosen on purpose.

The written scope allocates n per frame, and the report prints the bound per frame. Only (a) and (b) can carry a rate or interval, each for its own frame; (c) reads "findings on changes chosen for risk" and is never a rate. No line-level authorship is claimed. Unmarked changes that are not drawn go in the coverage list as not measured.

Who supplied or ran what. Each input is labelled in the report: The frame as exported by you; test strength run by us, or run by your engineer. A rate from an exported frame reads "for the frame you supplied".

Which tests ran. The baseline records which tests ran against what your CI runs, from check data or from you, and the report prints that list. A break reads "not noticed by the tests that ran".

A line reachable only by tests that did not run reads "not measured", never "not noticed"; on a partial run, that includes any line no test that ran executed, because a test that did not run cannot show what it would have reached. If neither source shows what your CI runs, the report says so, and such a line reads "not measured" too.

The first fee stage's baseline result states the share that ran, by test where your CI reports tests and otherwise by CI job, and the report says which. If neither source shows what your CI runs, the result says the share cannot be told.

What a clean result says. A non-detection reads "not detected at this sample size", with the upper bound, by the two-sided Clopper-Pearson method; the FAQ gives the arithmetic for 30 and 50 changes. Intervals describe the frame, not other repositories or periods. The bound covers what this check can detect: It assumes the check would have seen the failure, and it says nothing about failure types the check cannot see.

Breaking changed lines. We use a pinned tool and version, with the operators listed, and break changed lines only; on the critical-path unit, the named path's lines. The written scope and the report state which mutant filter the pinned setup applies, or that it applies none.

Each broken line reads noticed, not noticed by the tests that ran, no change in behaviour, not worth a test, or not measured, each with the reason. Surviving mutants are read up to the limit stated in the written scope; any beyond it are counted and marked unread.

Those that change no behaviour are counted separately, and those not worth a test are counted separately with the reason. Flaky tests are excluded and listed. There is no pass mark, no suite-level verdict and no comparison across languages, tools or companies.

Before and after. The re-test compares only the same changes with the same pinned tool and operators. A later recurring run is a new sample; it may be shown beside an earlier one only with both n values and the same frame rule, and is never called improvement without that. Each closed finding says how it was checked: "seen by us", "on a copy from your export" or "confirmed by you".

Counts both ways. Tool hits examined and discarded are reported beside confirmed findings.

Coverage list. Every change, check or file not measured, with the reason: The test suite would not run, tests that did not run and the lines only they could reach, a run that needs a secret, no mutation tool for that language, generated code, unmarked changes not drawn, or a request held only in an outside tracker or stated only in the agent's own account.

Three ways to scope the audit

Start with a sample of merged changes, or name the paths that matter when history is thin. Repeat the draw once one sampled audit is done.

Sampled pull-request auditDefaultA random draw of 30 to 50 merged changes, plus changes chosen for risk and reported apart, with the gate map.
Details

The written scope says, per repository, how we expect to measure test strength, from what you tell us, and a baseline run confirms it. Other languages are audited by reading, with test strength listed as not measured.

Reviewing a target for an investor or acquirer? Where it has AI-written code and no AI product, this audit is quoted under AI Technical Due Diligence's target-consent terms: The target issues the access, secrets or exploitable exposures also go to the target's named contact, and the copy's retention follows those terms.

Preparing for an investor's or acquirer's review of your own code? If you give them the report, or its executive summary alone, its cover says you commissioned and paid for it, it carries no overall rating, and it states that they may not rely on it and should do their own diligence.

Critical-path codebase auditNamed paths like authorisation, payments and data access, at an agreed commit, release candidates included, with or without pull-request history; test strength on those paths.
Details

No draw and no rate. One copy of the code at an agreed commit. The report reads per path, breaking that path's lines; anything that needs a change to read, such as test edits, reads not measured. Check results are mapped only where they exist for that path's commit; otherwise they read not measured. This is not a whole-codebase health review.

Recurring sampled audit, per drawA fresh draw each quarter or release, sized in your written scope, under the same rules and pinned tools, after one sampled audit.
Details

Each draw's copy is deleted on the same schedule, with one re-test per draw. Nothing is kept between draws unless agreed in the written scope; only the delivered report carries forward. A smaller draw gives a wider bound, and the report prints the bound for that draw's size.

Duration
Per scope
  • You can end at any time and keep the findings confirmed so far, with fee stages per the written scope.
Read more

What the copy is. Each audited commit is a full checkout of your repository at that point, without the rest of its history, so the copy is in practice your code as of those dates.

Where the audit reads changes, each change's diff reaches us through your export and shows what the change removed, so a secret it deleted can reach us, and we report it like any other. An archive or export works from any repository host.

If a run fails. The written scope's first fee stage ends when a baseline run result is known, from our run or your engineer's script, and that result states the share of your CI's tests that ran, or that the share cannot be told. If only part ran, or neither route runs, you choose: Continue, with what did not run listed as not measured and more reading, at no extra fee; re-scope; or end at the fee stage reached.

What you keep. The report, the annex and any failing tests are yours. The tooling we run the audit with stays ours and is not delivered; the readable script below is licensed for your own use.

Who runs what. We never run anything against a deployed system. Your engineer reviews and runs a readable script, without production secrets, and sends us the results. Mutated code can misbehave, so that run is agreed in the scope with that warning.

CheckWho runs itWhat it reads
Frame and drawWe do; you confirm the framePull-request details, check results and CI logs for those runs, as exported by you
Test edits, request and summary against diff, security traceWe do, by readingThe copy at each audited commit and each change's diff; on a critical-path audit, one agreed commit and no diffs
ScannersWe doThe same copy
Baseline and changed-line mutationWe do; we ask for no production secretThe same copy
Changed-line mutation, where tests need your services or private packagesYour engineer, reported as "run by your engineer"Your branch, with the list of tests that ran sent to us
Failing tests, an optionWe write them; we run them on the copy, or your engineer runs themThe copy or your branch; they come as a patch file labelled ours, and are excluded from later test-strength results
Neither path worksNobodyListed not measured
Finding reproduction, gate re-run and re-testWe do, on the copyThe copy; a re-test reads fix changes only; a check we cannot run on the copy is labelled our judgement

Your engineer's runs leave ordinary CI logs and artefacts, listed in the report.

Is this for you?

A fit

  • Your engineers review each other's changes in pull requests, and agents now write a visible share of them.
  • A customer, auditor or board is asking how agent-written code is checked, or a bug has someone asking how many others exist.
  • No record of which changes agents wrote? We draw from all merged changes and report them that way.
  • Test strength covers JavaScript, TypeScript and Python; if tests need your services, your engineer runs them; what cannot run is listed as not measured.

Not a fit

Working with us: Access, your copy and who sees it

A report your engineers can act on, and a copy deleted on a stated schedule.

  • An archive or export you send, on the repositories you name. We never ask for write, merge or deploy rights, production systems, cloud accounts or production secrets.
  • Our copy and working files are deleted with written confirmation 30 days after the re-test, 60 after a report with none, 30 after you end early, or sooner on request.
  • Written authorisation, scope and NDA before access; the scope names who will see your code.
  • We report apparent secrets, and personal data beyond ordinary commit metadata, by location the same day we confirm them, never copy them into the report and never try a secret.
  • We never name you, reference the engagement or publish findings without your written consent.

What we hold: A copy of your code at each audited commit, each audited change's diff and the check results. What we never ask for: Write, merge or deploy rights, production systems, cloud accounts or production secrets.

You get

  • Findings reach you as they are confirmed, a critical one the same day.
  • One re-test of reported findings within 30 days of the report
  • Liability capped at the fees paid for the engagement with Veriprajna LLP, India
  • Already have an AppSec firm? We work alongside them, adding a random sample and whether the tests that run notice a break.
  • Comparing firms? Ask each what counts as a finding and what a clean result says; our report states both.

Already have a review bot and a scanner?

'AI code review service' means a bot that reviews your code, or a review of the code bots wrote. Beside your tools, this is the work left to your team.

QuestionLeft to your teamThis audit

Your team adds a changed-line mutation tool to CI, keeps its baseline passing, and reads each surviving break to decide whether it is a gap.

We break changed lines, list the tests that ran and report which breaks they did not notice; one counts as a gap only once read, up to the scope's limit.

Your team records what each review bot and scanner read or ran on a change, so a green result is read for what it covers.

On a sampled audit, "not detected at this sample size", with the bound; on a critical path, per path with no rate; both only for what the check can detect.

Your team draws a random sample of merged changes, reads each one, and records which of your checks reported on it.

A random draw and named paths; on a sampled audit, a result for every audited change and which of your checks reported on it.

What we check in each change

Three layers: Whether the tests mean anything, whether the code holds, and what the evidence can and cannot show.

One change drawn as three layers: Its tests, its code, and the evidence around it, with one marker for each check below.

Tap a check to zoom the map to it.

The tests

  1. Test edits we read every test touched in the same change, looking for what it stopped checking.

    How to do it. Filter the diff to test paths and read removed lines beside added ones.

    What to look for. Assertions removed, skipped or weakened; an expected value rewritten to match new output; inputs special-cased in the code under test; a mock replacing the unit under test.

    Evidence. The removed and added lines, per change.

  2. Test strength we break each changed line with a pinned tool, rerun the tests that run, and read what survives.

    How to do it. Take the changed-line list from the diff, confirm a passing baseline, scope mutants to those lines, rerun, then read each surviving break before calling it a gap.

    What to look for. A break that changes behaviour and that nothing notices. Why a survivor is read rather than counted is in the deep dive.

    Evidence. The line, the break, the tests that ran and the result word.

    Standards. SSDF v1.1 PW.8.2, as a reference point.

The code

  1. Authorisation and tenants we trace who may call changed code and whose data it can reach.

    How to do it. From each changed entry point, follow the request to the data it touches and note where identity and tenant are checked.

    What to look for. A check missing on a new path, a check that can be skipped, a key the caller controls.

    Standards. ASVS 5.0.0 8.2.1, 8.3.1 and 8.4.1; CWE-862 and CWE-639.

  2. Secrets we look for credentials added or removed in the diff and present at the audited commit.

    How to do it. Read added and removed lines, and search the copy at the audited commit.

    What to look for. Keys in code, configuration and test fixtures, and a secret a change deleted, which is still exposed if it was never rotated.

    Standards. ASVS 5.0.0 13.3.1; CWE-798.

  3. Input handling we follow new inputs to where they are used, and check what validates them.

    How to do it. List inputs the change adds and trace each to its use.

    What to look for. Validation only on the client, or none at a trust boundary.

    Standards. ASVS 5.0.0 2.2.1 and 2.2.2; CWE-20.

  4. New dependencies we check that each new package exists, is the one meant, and record its licence.

    How to do it. Read manifest and lock-file changes in the diff, then check each new name against its registry.

    What to look for. A name nobody intended. In a USENIX Security 2025 study of 16 models of an earlier generation and 576,000 code samples, an average of at least 5.2% (commercial) and 21.7% (open-source) of recommended packages did not exist. That measures model output, not agent pull requests.

    Evidence. Each new dependency and its licence as recorded, with no legal opinion.

    Standards. SSDF v1.1 PW.4.4; ASVS 5.0.0 15.2.4; CWE-1395.

  5. Error paths we check whether new error handling is exercised by any test that ran.

    Why. In the study above, the authors call error handling "the weakest spot in both languages": Lines inside Try-Catch blocks went uncovered 86.0% of the time in Java, on 43 lines, and 81.0% in Python.

    What to look for. New throw and catch paths no test reaches, and failures swallowed silently.

    Standards. CWE-755.

The evidence

  1. Which changes agents touched we read records, such as bot accounts, co-author lines, agent labels and branch names.

    How to do it. List merged changes in the window and record each mark found.

    What a mark does not show. A co-author line is a trailer in a commit message, so it can be left out. GitHub says Copilot cloud agent's commits are authored by Copilot with the developer who assigned the work as co-author.

  2. Request and summary against diff we compare what the pull request asked and what the agent said with what changed.

    How to do it. Read the pull-request text, then the diff, then the agent's summary.

    What to look for. Work done and not mentioned, work claimed and not done, scope that grew.

    Limits. In this audit the request is what the pull request states. A request held only in an outside tracker, or stated only in the agent's own account, is listed as not measured unless the written scope adds it. SSDF v1.1 PW.7.2 is a reference point.

  3. Gate map we record which of your checks reported on each change, and what each could have seen.

    How to do it. Read check results for each audited change. For each confirmed finding, re-run the check on the pinned copy where we can, and record its result; otherwise record the check we would expect to see it, labelled our judgement. The two are reported apart.

    Evidence. Each confirmed finding carries a CWE ID and an ASVS ID wherever one applies. We never state as fact that a check we did not run would have caught something.

Questions buyers ask

7 questions

How is a quote scoped, and when can you start?

Through a free 30-minute call: Repositories, date window, sample size, languages and whether your tests can run; those set the fixed fee, which you get in a written scope within 2 business days of the call, agreed in writing before any work. The earliest start date is in the written scope. The fixed fee does not change if the schedule slips on our side, and you can halt or end the engagement at any time.

What can 30 to 50 changes tell us, and what if you find nothing?

Gates belong on every change; the sample checks what they and your tests catch. Finding no failure of a type in 30 random changes from one frame allows, at 95% confidence, a rate up to about 1 in 9; in 50, about 1 in 14. That assumes the check would have seen it, and rare failures often miss a random draw, so high-risk changes are chosen separately. The report states what was checked, how, and what was out of scope.

How do you know AI-written tests check anything?

Mutation testing makes deliberate breaks in code and reruns the tests; a break no test notices may be a gap, unless it changes no behaviour or is not worth a test. A noticed break does not show the test checks the right behaviour. In this audit, only changed lines or a named path's lines are broken, the report lists which tests ran, each surviving break is read up to the scope's limit, and on merged changes test edits are read.

Can we share the results with customers?

You may give the report, or its executive summary alone, to your customers; both describe what was audited, and no customer may rely on them as an assurance or letter.

Can't we run a skill, /security-review or a mutation tool ourselves, or use our own engineers?

Often, yes. A changed-line mutation tool in CI suits new changes; if that is all you need, use it. /security-review or a skill reads your code, with no sample unless you set one. Your engineers could, but their team merged these changes; an outside audit did not. This audit adds a measured read of what already merged, breaks read rather than counted, security logic, and which of your checks saw what. Auditing Claude Code's settings is Governed AI Engineering's work.

What if we cannot tell which code the agents wrote?

Records come first: Bot accounts, co-author lines, agent labels, branch names. If marks are too few, we draw from all merged changes and report them as "authorship not recorded". We use no detector. You would not be unusual: In GitLab's vendor survey, run by The Harris Poll, 43% of 1,528 developers and technology buyers said they cannot reliably distinguish AI-generated code from human-written code in their own codebase. That is self-report.

What is a secure AI SDLC?

A secure AI SDLC usually means one of two things: Building AI systems securely, or keeping security intact once agents write ordinary software. This audit takes the second: Which gates report on agent-written changes, and where they do not. For the first, see AI Agent & MCP Security Assessment or AI Red Teaming. The gates a lifecycle needs when agents write code are listed in the deep dive below.

Why this method, and what it cannot show

A list of merged pull requests, some marked as agent work, with a few drawn at random and highlighted.

What goes wrong, and whether AI code is worse

Kinds of failure. Georgetown's CSET sorts the security risks of AI-generated code into three: "models generating insecure code", "models themselves being vulnerable to attack and manipulation" and downstream effects. This audit deals with the first, once it has reached your repository.

In agent pull requests the kinds that matter are tests that never reach the changed lines, tests rewritten in the same change, a summary that differs from the diff, a missing check on who may reach what, packages that do not exist and error paths nothing runs.

Is AI-generated code worse than human code? It depends on language, tool and measure, and the studies disagree in useful ways.

  • Cotroneo et al. (ISSRE 2025), on paired functions from older models and not agents: Static analysis flagged more vulnerable samples in AI code in Python and Java, while defect results varied by model. The code was not run.
  • Improta et al., a preprint under peer review: "security is language-dependent, with LLMs producing more, and more severe, findings in Python and Java but fewer high-severity memory-safety findings than humans in C".
  • Wang et al., a preprint on leading GitHub repositories, argues the other side on severity: "no statistically significant difference in the severity distribution of vulnerabilities introduced by AI and humans". Its attribution rests on the authors' own detector, with a stated precision of 0.716.

What follows for production. None of these studies measured your repository. Whether agent-written code is fit for your production systems depends on what it touches, so the evidence has to come from your own changes. The sequence is in the answers above. What makes a result mean something comes next.

What a sample can say

A result means something only when its frame, its draw and its n are stated: Which repositories and dates, how changes were picked, and how many. A random draw is what lets you state a rate.

The arithmetic, as arithmetic: The chance that a draw contains at least one change of a given type is about 79% at n=30 and 92% at n=50 when 5% of changes are of that type, and 26% and 39% when 1% are. That is why the high-risk set is chosen separately and reported apart.

What mutation testing shows, and does not

Mutation testing checks tests by changing code on purpose and seeing whether any test fails. The phrase can also mean AI that writes the mutants or tests, or mutation testing of AI models and agents; this audit breaks changed lines of code agents wrote, with a pinned tool. Testing the agents themselves belongs to LLM & Agent Evaluation.

Why a break is read. Google's published practice mutates only changed code during code review, for "more than 24,000 developers on more than 1,000 projects". Its developers "initially classified 85% of reported mutants as unproductive": Trivially equivalent, or "detectable, but adding a test for it would not improve the test suite".

Its filters raised the productive share "from 15% to 89% at Google", and the authors say those filters are "specifically tailored" to their developers' environment. So a surviving break is read before it counts, and the report says which filter, if any, the setup applies.

Limits on scores. Zhao, Zhou and Cohen (ISSTA 2026, a replication) find coverage and mutation "highly context-dependent" for LLM-written suites: Useful when comparing models on code assumed bug-free, while where the code may be buggy "they no longer serve as reliable indicators", and mutation analysis needs a passing suite to start. That paper studies suite-level scores, not reading single breaks; offering no score is our inference from it.

Tests can be gamed. ImpossibleBench, a benchmark in a preprint and not an incident, builds tasks whose tests contradict their specification, so any pass implies a shortcut; with one submission allowed, the models tested averaged a 33% pass rate on one variant.

The counterweight on AI-generated tests. Two studies compare agent tests with human tests. Yoshimoto et al. (MSR 2026) report AI-generated tests "contribute to code coverage comparable to human-written tests", measured on 531 test-adding commits in 3 TypeScript projects, and say mutation testing should come next.

Jhanglani et al., statically reading Python test files from 204,673 AIDev test artifacts, without running them, report wider edge-case variety from agents (0.62 against 0.32) and more flakiness candidates (0.41 against 0.30), and say what they found is "less a story of one side being better, and more a trade-off". They warn their tool was "a poor proxy" for test quality in the human group because it could not parse pytest-style assertions, "invalidating a direct comparison" on assertion strength.

Structural measures cannot show that a test checks the right behaviour, and neither study ran a mutation test. Measure your own.

What review and scanning tools say about themselves

Not affiliated with these vendors. In their own words:

  • Claude Code's Code Review: Defaults to "bugs that would break production, not formatting preferences or missing test coverage", and "works from reading the diff and the surrounding code, without building or running your code".
  • /code-review ultra: Reports findings "independently reproduced and verified".
  • DiffProof, a mutation tool: "would this pull request's tests detect small defects in the code it changed?"
  • Tautest, a mutation tool: "runs mutation testing on changed source lines".
  • Copilot code review: It "may not identify all of the problems that are present in code".
  • Codex's code review rules: "they don't replace tests, branch protections, or required approvals".
  • Cursor's Security Review, a per-change bot: "checks pull requests before they merge".
  • The /security-review command: "Reviews the diff between your branch and origin's default branch".
  • The security review README: "The tool automatically excludes a variety of low-impact and false positive prone findings", among them open redirects and rate limiting.
  • Codex Security, a repository-level auditor: "reviews code for vulnerabilities and reports evidence".
  • Claude Security, a repository-level auditor: "runs a deep baseline scan, then scans changes regularly".
  • Aikido's Code Security Audit, a repository-level auditor: "treats the whole repository as in scope".
  • CodeQL, a scanner: "the code analysis engine developed by GitHub to automate security checks".

The gates a lifecycle needs when agents write code

A review pipeline for AI-generated code has to do three things at each stage: Show which changes agents touched, test the code and its tests by more than the agent's own summary, and record which gate reported what, so a green result can be read for what it covers.

  • Pull request opened, authorship marks. Can see: That an agent took part. Cannot see: Who wrote each line.
  • CI, tests and changed-line coverage. Can see: Which tests passed and which lines ran. Cannot see: Whether a test would notice a break.
  • CI, scanners. Can see: What their rules or models flag. Cannot see: Your own rules on who may reach what.
  • CI, changed-line mutation. Can see: Whether the tests that ran notice a break. Cannot see: Whether a test checks the right behaviour.
  • Review, a person or a review bot. Can see: The diff and whatever else it reads. Cannot see: What it did not read; a clean review is not proof.
  • Merge, required checks and branch rules. Can see: Which checks had to report. Cannot see: What those checks covered.
  • After merge, a sampled audit. Can see: A rate for its frame, and which gates reported. Cannot see: Anything outside the sample.

Anthropic gives one organisation's account of placing them: It says "Entire codebases have strict human approval processes", and that for code Claude reviews and merges, "Every approval is logged with the signals and reasoning behind it, and a risk-weighted sample is reviewed by humans". It also runs tests on invariants. Its sample is risk-weighted, not random, and it describes its own organisation.

This is what to check for. Installing gates stays with Governed AI Engineering. Policy and tool inventory stay with you, and SOC 2 and ISO readiness belongs to Security & Compliance Readiness for AI Products.

Get your agents' pull requests audited

Whether agents open most of your pull requests or only some, or you have no record of which, start with a short conversation about what they have been changing.

  1. Email or WhatsApp us
  2. Reply within 1 business day
  3. Free 30-minute discovery call
  4. Written scope and fixed fee within 2 business days of the call