The post as a short film · 33 seconds
Read what the film says

Our three-gate review for every AI-generated function Drafted by the model in 4 seconds — not “done” yet.

Automated security scan: Checked against the OWASP Top 10 categories. Senior engineer review: A person reads it line by line, not the model. Tested on real data: Real, not synthetic, inputs before sign-off.

How often models failed to defend against: Log injection 88%, Cross-site scripting 86%.

Slower than shipping straight from the model (Scan time on every change; A senior engineer's attention; Real data has to be available) Versus: No security incidents reported from shipped code to date (Known flaw classes caught by the scan; Logic errors caught by a person; Edge cases caught by real inputs)

= “Done” Only after all three gates pass.

Every function a model writes for us passes three gates before it ships: an automated security scan, a review by a senior engineer, and a test on real data. Until all three pass, the code is a draft, however well it runs.

def match_invoice(invoice, ledger):
    # drafted by the model in 4 seconds — not "done" yet
review · every ai-generated function
Gate 1Automated security scan

Checked against the OWASP Top 10 categories.

Gate 2Senior engineer review

A person reads it line by line, not the model.

Gate 3Tested on real data

Real, not synthetic, inputs before sign-off.

A function is "done" only after all three gates pass.

Gate 1: automated security scan

The scan checks each change against the OWASP Top 10 categories. It exists because generated code fails in predictable ways.

veracode · relevant test cases

How often models failed to defend against

Log injection88%
Cross-site scripting86%
Two weakness classes that generated code missed in most of the test cases where they applied (CWE-117 and CWE-80).Veracode · 2025 GenAI Code Security Report

These are exactly the faults a scanner is good at finding and a hurried reader is bad at. Running the scan first means the human reviewer's time is not spent on what a machine can catch.

Gate 2: senior engineer review

A person reads the function line by line. Not a second model. The reviewer is checking things a scanner cannot know: whether the function does what the business needs, whether it handles the cases the prompt never mentioned, and whether it fits the code around it. A model asked to review its own kind of output tends to share its blind spots.

Gate 3: tested on real data

Generated code is usually tried on the clean example that was in the prompt. Real records have missing fields, duplicate IDs and formats nobody documented. The third gate runs the function on real inputs, not synthetic ones, before anyone signs it off. What this gate catches would otherwise be found by a client.

What it costs

The costSlower than shipping straight from the model
  • Scan time on every change
  • A senior engineer's attention
  • Real data has to be available
The payoffNo security incidents reported from shipped code to date
  • Known flaw classes caught by the scan
  • Logic errors caught by a person
  • Edge cases caught by real inputs
What the process costs us and what it has bought.

The process is slower than shipping what the model produced, and we accept that. The speed of generation is still there: a draft in seconds instead of an hour. What the gates remove is the assumption that a draft that runs is a draft that is finished.

If you adopt one gateStart with the third. Running generated code against a sample of your real data is the cheapest of the three to set up, and it finds the failures your users would otherwise find for you.
Research brief Is the Improvement Real? Hypothesis-Tested Evals Read

Questions

How should AI-generated code be reviewed?

Treat it as a draft and pass it through three checks: an automated security scan against known vulnerability categories, a line-by-line review by an experienced engineer, and a test on real rather than synthetic data.

Why not have an AI model review AI-generated code?

A model reviewing generated code tends to share the blind spots of the model that wrote it. A person can judge whether the code does what the business needs and handles cases the prompt never mentioned.

Sources

  1. Veracode, press release on the 2025 GenAI Code Security Report, 30 July 2025 (cross-site scripting 86%, log injection 88% of relevant cases; 45% overall). Source
  2. OWASP Top 10 project. Source
  3. The statement that no security incidents have been reported from shipped code is Synexian's own record, as of the publication date.

First published as a Synexian Build Log post on 11 November 2026. Figures are quoted from the sources above; follow the links for their methods and limits.