Insight / Verifying AI-generated code

AI code review for regulated teams: a standard you can defend

In a regulated team, the question is not only whether AI-written code is safe. It is whether you can show who checked it, against what, and when.

Swallowtail Systems™  /  Published November 30, 2026  /  3 min read

Key points
  • NIST published an SSDF profile for generative AI in July 2024, so there is a recognized secure development reference to align AI code review to.
  • A 2026 study of real pull requests found that almost no vulnerable changes, from agents or people, received security review before merging.
  • A defensible standard names the change types that always reach a person, the evidence that person sees, and where the record of review lives.

The question a regulated team has to answer

Most teams can say they review code. Fewer can show it. When AI tools write a growing share of changes, the gap matters more, because the volume rises while the number of reviewers does not. The useful question for a regulated team is simple: for any change that reached production, can we show who reviewed it, what they checked, and what evidence they saw?

What the evidence says about review

Researchers at the University of Calgary analyzed 21,454 pull requests written by AI coding agents and 8,103 written by people. Vulnerabilities appeared in 11.5 percent of agent pull requests and 12.8 percent of human ones, a small difference 1. The larger finding was about review: only 2.2 percent of vulnerable agent pull requests and 1.2 percent of vulnerable human ones received any security-related review, and up to 96.4 percent and 98.6 percent were merged without discussion 1. Review, the control everyone assumes is there, often is not.

The reference to align to

NIST's Secure Software Development Framework is the common reference for secure development in the United States. In July 2024, NIST finalized SP 800-218A, a community profile that adds practices specific to generative AI and dual-use foundation models, written for producers of AI models, producers of systems that use them, and the organizations that acquire those systems 2. Findings themselves are easiest to discuss when they are classified against the OWASP Top 10:2025, where broken access control ranks first 3.

A review standard in five parts

1. Name the sensitive change types. Sign-in, access rules, payments, secrets, production data, logging and the review policy itself. These always reach a qualified person, whoever or whatever wrote the change.

2. Require evidence, not summaries. The reviewer sees the diff, the tests that ran and the result of each automated scan. An AI-written description of the change is a convenience, not evidence.

3. Separate author and approver. The tool that wrote a change should not be the only thing that approves it. Where AI review tools approve changes, treat their policy file like an access control list, because it now decides what reaches production.

4. Scan for secrets on every change. Keys and tokens in code are among the most direct paths from a code change to a data exposure; see Secrets in AI-built software.

5. Keep the record where your compliance team can find it. Review records belong in the version control system and change tickets you already retain, not in a chat thread.

Sector notes

The standard is the same across sectors. What changes is who asks for the evidence and what data is in scope. See our notes for financial services and fintech, healthcare and health systems and state and local government.

For teams shipping AI-built software

What this means for your team

  1. Write down which change types always need a person.
  2. Make reviewers look at diffs, tests and scan results.
  3. Do not let the authoring tool be the only approver.
  4. Treat any automated approval policy as a controlled document.
  5. Store review records with the change history you already retain.

This is Swallowtail Systems™ analysis of public sources. Figures belong to the organizations cited, and we link every one. Nothing here describes a client engagement.

Sources

  1. Le, Vijayanandan et al., "On the Security of Agentic Pull Requests in GitHub: An Empirical Study", University of Calgary (2026)
  2. NIST, SP 800-218A, Secure Software Development Practices for Generative AI and Dual-Use Foundation Models (July 26, 2024)
  3. OWASP Top 10:2025

? FAQ

Common questions

Do regulators prohibit AI-generated code?

We are not aware of a general prohibition. The practical expectation is the same as for any code: that it is developed and reviewed under a documented secure development process. NIST SP 800-218A gives a reference for doing that with generative AI in the picture.

Can an AI review tool count as the reviewer?

It can raise the floor and catch real issues. For sensitive change types we recommend that a qualified person still approves, with the tool's findings as part of the evidence they see.

Is AI-written code riskier than human code?

The 2026 Calgary study found similar vulnerability rates for agent and human pull requests. The weaker point in both cases was review, which is why a written standard matters more than who typed the code.

Where should we start?

List the change types that touch sign-in, access rules, payments, secrets and production data, and require a person and evidence on those first.

/ Next step

Want this read against your own systems?

In a 30-minute briefing we walk through what we would look for in your environment and what a written scope would include.

Request a briefing