# What extra preparation does AI-generated code need for a SOC 2 audit?

> In most cases you do not need a new set of controls for AI. You need to show that your existing change controls were not bypassed. The auditor asks whether a piece of code was reviewed and approved, and does not ask who wrote it.

Canonical page: https://assurelane.ai/en/insights/ai-generated-code-soc-2/
Updated: 2026-11-14 · Sources checked: 2026-10-22

## Two different situations

"We use AI to write code" and "our product is AI" lead to two separate compliance tracks. Mixing them up sends preparation in the wrong direction.

- **AI writes your code.** This affects your change management controls: CC8 change management in SOC 2, and secure coding and change control in ISO/IEC 27001.
- **Your product has AI capabilities.** This affects governance of the product itself: models, training data, output quality and human oversight. That is ISO/IEC 42001 territory.

This article covers the first case only. In our project experience, most Chinese teams selling overseas are in the first case but prepare as if they were in the second, and the budget goes to the wrong place.

## The auditor looks at the change, not the author

SOC 2 change management follows one chain: was the change authorised, was it tested, was it independently approved, and was it implemented as approved? Nowhere in that chain is there a field for who made the commit. `Analysis`

This reading rests on the [AICPA 2017 Trust Services Criteria](https://www.aicpa-cima.com/resources/download/2017-trust-services-criteria-with-revised-points-of-focus-2022), which are written as control objectives and do not list controls by technology or tool.

In practice, the auditor takes a sample of changes from the period and looks at the merge request, review record, approval and deployment record for each one. Whether an engineer typed the code, an autocomplete tool suggested it or an agent generated the whole block is not a control point in itself.

So you do not need a new policy for AI. You need to show that your existing controls still hold under the new way of working.

## Does change management without merge requests still count as a control?

AI has made this a public debate. Agents can write code, test it and open pull requests, so some teams have dropped merge requests altogether and rely on branch protection, automated tests and restricted push rights to show that changes are controlled. Does that hold up?

Under the AICPA chain, the auditor wants to see four things: the change was authorised, tested, independently approved and implemented as approved. A merge request is not a legal requirement. It is simply the cheapest way to leave a record of independent approval. Dropping pull requests does not automatically mean losing control, but you need other evidence:

- **Who can push, and on what authority.** A permissions list and records of how access was approved. "We're a small team and everyone knows" is not evidence.
- **Tests run before merge and cannot be skipped.** The committer must also be unable to rewrite the tests or the pipeline, or a passing test proves nothing.
- **Approval recorded in advance.** A ticket, change request or approval workflow will do. Screenshots of group chats usually do not survive sampling.
- **Review after the fact.** Who looked at the change, when, and what they found.

The second and third points are the hard ones. Without pull requests, independence and tests the committer cannot alter are the hardest things to evidence. The strongest objection in the public debate lands here too: how do you prove the approval happened? `Analysis`

It can be done, but the evidence usually costs more than keeping a merge request record. If your team is small enough that pull requests feel like a burden, first make sure the committer cannot get around branch protection or the test pipeline, and only then consider dropping them.

## Four places where controls break once AI arrives

### 1. Branch protection is bypassed

An agent with write access to the repository pushes directly, or someone uses an administrator account to skip the protection rules. A single change that did not go through a merge request becomes an exception in the change management sample.

What to check: whether branch protection applies to everyone, including bot and service accounts; whether anyone holds permissions that can bypass it; and how many times those permissions were actually used in the past year.

### 2. Review turns into machines reviewing machines

The second-reviewer control assumes that the person who writes the code is not the person who reviews it. If one agent opens the pull request and another agent reviews it, the control has lost its substance.

What to check: whether a human is among the reviewers; what share of reviews come from a single person; and whether anyone has approved their own changes.

### 3. The agent has more access than any person

To let the agent fix CI and deploy, someone gave it production credentials. Now access control (CC6) and change management (CC8) fail together, because one person, or one process, can both change the code and release it.

What to check: a list of who holds long-lived credentials in CI/CD; which environments the agent's service account can reach; and whether production deployments need human approval.

### 4. Customer data goes into an external model

During debugging, someone pastes production logs or database extracts into an external chat tool. This is no longer only a change management issue. It touches data classification, vendor management and confidentiality.

What to check: whether you have stated which data must not go into external tools; whether your coding assistant runs under an enterprise plan with training turned off; and whether these tools appear on your vendor list.

## Writing the control: change the wording, not the number of controls

The usual approach is to make the existing control description precise enough that its scope covers the new situation. For example, change

> All code is reviewed by a second person before it is merged into the main branch.

to

> All code, whether written by a person or assisted or generated by AI, must be reviewed before it is merged into the main branch by a second person who did not take part in writing it. Branch protection enforces this rule for every account.

Both sentences have the same control objective. The second answers in advance the boundary questions an auditor will ask. `Analysis` (You can rewrite your wording along these lines, but the control description your audit firm accepts is the one that counts.)

Other controls worth rewording in the same way are code provenance and licence review, approval for new dependencies, and secrets management. With AI-assisted coding, each of them runs into the question of where the generated material came from.

## Evidence checklist

Prepare what auditors actually ask for. You do not need conversation logs from AI tools.

1. List of merge requests with review records, including who the reviewers were
2. Screenshots or exports of branch protection and repository permission settings
3. Approval records from the deployment pipeline
4. After-the-fact review records for exceptions and emergency changes
5. Vendor assessments or data use statements for AI tools, if you use external services
6. Secure coding or AI usage guidelines (attach them if you have them; do not write them up just for the audit)

Item 6 is often misunderstood. A guideline your own team cannot follow is more likely to come apart in an interview than having no guideline at all. `Analysis`

## When you really need something else

If any of the following applies, the question is no longer how to word change management:

- Your product delivers AI-generated output to customers, and they rely on it to make decisions;
- You train or fine-tune models on customer data;
- A customer's contract or questionnaire explicitly asks for evidence of AI governance, such as an ISO/IEC 42001 certificate.

At that point the conversation is about the scope and preparation of an [ISO/IEC 42001 AI management system](https://www.iso.org/standard/81230.html), not about adding a few AI controls to SOC 2. For how the two relate, see [ISO 42001 certification cost and timeline](https://assurelane.ai/en/insights/iso-42001-cost-timeline/).

## Common misconceptions

| Misconception | What actually happens |
| --- | --- |
| Using AI means adding AI controls | Showing your existing change controls were not bypassed does more than adding controls. `Analysis` |
| The auditor will inspect AI tool logs | Auditors more often ask for repository and pipeline records. `Analysis` |
| Any AI feature requires ISO 42001 | It is not mandatory; customer requirements or your own risk decide. |
| Letting agents merge directly is faster and the audit won't care | Merge records are the audit sample, and each bypass is an exception. |

In order of preparation, AI-assisted coding comes after change management and access control. Get the evidence for those two areas in order first, then look at what AI adds. The full preparation list is in our SOC 2 readiness checklist article, and the framework itself is on the [SOC 2 framework page](https://assurelane.ai/en/frameworks/soc-2/).

## FAQ

### We use AI coding tools. Do we need to add AI-specific controls to SOC 2?

Usually not. SOC 2 evaluates control objectives under the Trust Services Criteria, and change management only asks whether a change was authorised, tested, approved and implemented. It does not care whether a person or a tool made the commit. Stating the scope of your existing controls clearly does more than adding new ones. `Analysis`

### Will the auditor ask for logs from our AI tools?

In our project experience, auditors more often ask for records on the repository side, such as merge requests, review comments, branch protection settings and deployment approvals. Conversation logs from AI tools are not normally requested as standard evidence. `Analysis`

### We sell AI features to our customers. Is this approach enough?

No. Everything above is about using AI to write code. If your product itself provides AI capabilities to customers, it raises further questions about model governance, training and inference data, and output quality. Those fall under ISO/IEC 42001 and are a separate matter from change management.

## Sources

- [AICPA & CIMA — 2017 Trust Services Criteria (Revised Points of Focus 2022)](https://www.aicpa-cima.com/resources/download/2017-trust-services-criteria-with-revised-points-of-focus-2022)
- [ISO — ISO/IEC 42001:2023 (AI management system)](https://www.iso.org/standard/81230.html)
