Major

SOC 2 and AI-Generated Code: What Evidence Auditors Need

AI-generated code is not automatically incompatible with SOC 2. The test is whether your controls can show who reviewed, approved, tested, and deployed every change.

Rahul RamakrishnanUpdated
Engineer reviewing an AI-assisted code change and its release evidence.

Is AI-generated code SOC 2 compliant?

Code does not carry a SOC 2 status, so "AI-generated" is not a control category. SOC 2 is an examination of your system and the controls you designed and operated around it. An auditor testing your change management cares whether each change was authorized, reviewed, tested, approved, deployed and logged. They do not care whether a person or a model typed the diff.

The AICPA's Trust Services Criteria set the control objectives, including change management and logical access. They say nothing that bans or blesses generated code. Your system description and scope decide what gets tested, and your auditor interprets it.

That shifts the work to evidence. If an agent can open a change faster than your reviewers can read it, the weak point is the trail behind the change, not the model. Major fits here because agents build deterministic apps that hold the change record, permissions and logs in one inspectable place, so the evidence is produced as the work runs. Nothing in this article makes Major, or your use of it, SOC 2 compliant. That is a determination for your CPA firm.

What evidence should an auditor be able to trace?

Change traceability means you can start from a production change and walk back to who asked for it, who or what built it, who reviewed it, what tests ran, who approved it and when it shipped. Every link has to be attributable to an identity.

Here is an illustrative evidence packet for a generated internal vendor-intake app. It is an example, not a customer deployment or an audit result.

  • change_id: the request that authorized the work, with a named requester
  • Actor identity: the agent's own service identity, separate from any human's, plus the human who prompted it
  • Reviewer: a named person who is not the requester, with the review comments retained
  • Test result: the check run or suite output tied to the exact commit
  • Approval: an explicit record that someone with authority accepted the risk
  • Deployment reference: the release or build ID, timestamp and target environment
  • Retained log: the platform's record of each action the agent took, kept for the period your policy sets

Scope and retention are yours to define. This is a recommended pattern, not an AICPA-mandated checklist, and your auditor may ask for different artifacts.

One warning on approvals. A human clicking approve proves a click. It does not prove a review. If the reviewer saw a 2,000-line diff with no summary and approved in 40 seconds, the record shows a control that exists on paper. Review has to be sized to the change and give the reviewer something they can actually evaluate.

What controls should govern AI-assisted changes?

Start with the NIST Secure Software Development Framework for secure-development practice. It is guidance, not a SOC 2 rulebook, and it does not prescribe controls specific to AI-generated code. Use it to shape your design, then confirm with your auditor how it maps to your criteria.

The controls that matter most:

  • Inventory and scope. Know which repositories and apps accept agent-authored changes. Everything else stays closed to agents.
  • Least privilege. The agent gets read access to the repository and check metadata, narrow write access only where required, and no broad production secrets by default. Deployment needs an explicit elevation. We cover the access model in how to scope permissions where agents act.
  • Risk-tiered review. A documentation fix can need one reviewer and a passing check. Code that handles sensitive records or changes authorization needs a second reviewer and a named owner. That tiering is our recommended operating pattern, not a universal requirement.
  • Tests and approval gates. No deployment without a recorded passing result and a recorded approval.
  • Secrets and data handling. Credentials are issued to the agent per task and never pasted into prompts.
  • Rollback and monitoring. You can revert a change and see what it did afterward.
  • Periodic control review. Someone checks that the control ran across the whole examination period, not only on audit week.

Logs and permissions support evidence. They do not by themselves show a control is well designed or operated effectively over time. That judgment belongs to your auditor.

There is also a layer split worth making explicit. Model judgment, such as a risk summary or a decision to flag missing evidence, should be reviewed like any other input. Repeatable execution, such as recording a test result or gating a release, should run in deterministic code that behaves the same on every run. For more on this, see our governance model for production vibe coding.

How to build this on Major

This flow turns a code-change process into an app that holds its own evidence. Confirm the exact connector events and supported actions in your workspace before you rely on them, and set retention to your own policy.

  1. Trigger. A GitHub pull request event starts a Major workflow.
  2. State. An app with a managed database stores the change ID, repository, test results, reviewer, approval, deployment reference and timestamps. The app is the system of record, not a chat transcript.
  3. Agent judgment. An agent reads pull request and check metadata, summarizes the risk tier, and flags missing evidence such as no passing test or no second reviewer. It does the judging. The app does the recording.
  4. Human gate. Slack routes the review to an authorized human with the summary attached. The reviewer's decision is written to the app.
  5. Deployment. The release step runs only after an explicit approval is recorded. The agent has no standing production secrets.
  6. Audit. Each action runs under scoped credentials, with role-based access on who can view or change the records, and the platform's audit trail keeps what happened.

A connector does not guarantee a control. What this gives you is a repeatable process that writes its own evidence, which your team and auditor can then test. Read more on putting control where agents act, and start building free if you want to try the flow.

What we're doing about this at Major

Our position is that code generation is not the governance boundary. The boundary sits where code is authorized, reviewed, tested, executed and logged. Teams that spend their effort policing which tool wrote a line will keep missing the places where evidence actually breaks.

Major's response is a deterministic app layer. An agent reasons once about how a change process should work, builds an app for the repeatable parts, and then runs that app instead of re-reasoning every step. The app holds its state in a managed database, runs under permissions, and writes logs. The model keeps the judgment calls, and those stay visible and reviewable. Reason once, run forever.

This does not replace your auditor, your policy, or the people who review changes. It also does not decide whether your controls are effective. It gives your controls somewhere inspectable to live. Security teams who want to compare notes can also read the security controls enterprise teams should verify when evaluating any build platform.

Start building on Major

Build a governed code-change workflow where an agent prepares the evidence and a human approves the release.

Related articles

Frequently asked questions

Is AI-generated code SOC 2 compliant?
Code origin alone does not decide SOC 2. SOC 2 examines your system and the controls you designed and operated, including how changes are authorized, reviewed, tested, approved and deployed. Work with your auditor to confirm which in-scope systems and controls apply, since no tool or code author guarantees an outcome.
How do you make a vibe-coded app SOC 2 compliant?
Define the system scope first. Then set access limits for whoever or whatever builds the app, require review and testing proportional to risk, control secrets and sensitive data, gate deployment on a recorded approval, and retain logs. A checklist alone cannot make an app compliant. Your controls must operate over the examination period.
Can AI-written code pass a SOC 2 audit?
The examination concerns your applicable controls and the evidence that they operated, not whether a model wrote the code. Teams can show reviewed, tested and approved changes regardless of author. Confirm scope and evidence expectations with your CPA firm, because interpretation depends on your system.
What evidence should teams keep for AI-assisted code changes?
Keep an attributable request, the actor identity, the reviewer, the test result, the approval, the deployment reference and the action logs. Retention periods and scope should follow your own control design, and your auditor may ask for different artifacts depending on your system.