SOC 2 Compliance and AI-Generated Code: What Auditors Are Now Asking
June 28, 2026 · 8-minute read · Fairy
The short answer
Yes, AI-generated code directly affects SOC 2 compliance. Auditors now ask how organizations control AI output quality, who verifies AI-generated changes before deployment, and how AI-assisted access controls are validated. Trust service criteria CC6, CC7, and CC8 all apply to AI-generated software, requiring documented verification processes and clear accountability for AI outputs.
Does AI-Generated Code Affect SOC 2 Compliance?
Yes. AI-generated code directly affects SOC 2 compliance because it changes how code enters your systems, who (or what) authors security-critical logic, and what controls govern the path from generation to production. Auditors have noticed, and they're asking new questions.
If your engineering team uses GitHub Copilot, ChatGPT, Claude, or any AI coding assistant, your SOC 2 audit now includes AI. The question isn't whether AI affects compliance—it's whether your controls satisfy the trust service criteria when AI is part of your development workflow.
This guide covers the specific SOC 2 criteria AI-generated code touches, the questions auditors are now asking, and the controls that satisfy those requirements.
The Three Trust Service Criteria AI-Generated Code Affects
SOC 2 compliance is built on trust service criteria defined by the AICPA. Three criteria are particularly relevant when AI generates or modifies your code:
CC6: Logical and Physical Access Controls
CC6 requires that access to systems and data is restricted to authorized individuals and that access controls function as intended. AI-generated code affects CC6 in two ways:
AI can generate access control logic. When developers use AI assistants to write authentication flows, authorization checks, or permission systems, the AI's output directly determines who can access what. A subtle error—an overly permissive role check, a missing authorization boundary—becomes a compliance gap.
AI tools themselves have access. Copilot, Cursor, and similar tools often have read access to your codebase. Some organizations integrate AI into their CI/CD pipelines with write access. Auditors want to know: What can the AI access? What can it modify? How is that access controlled?
CC7: System Operations
CC7 addresses detecting and responding to system vulnerabilities and anomalies. AI-generated code affects operational security in several ways:
Vulnerability introduction. AI models are trained on public code, including code with known vulnerabilities. They can and do reproduce insecure patterns—SQL injection vectors, improper input validation, hardcoded secrets. Your SOC 2 controls must catch these before production.
Monitoring and detection. If AI generates logging, monitoring, or alerting code, errors in that code can create blind spots. Auditors want assurance that AI-generated operational code is verified by qualified personnel.
CC8: Change Management
CC8 requires that changes to systems are authorized, tested, and documented. AI fundamentally changes the change management equation:
Authorship and accountability. When a developer commits AI-generated code, who authored it? Who is accountable for defects? Your change management controls need to address this explicitly.
Review adequacy. A human reviewing AI-generated code may not catch subtle issues, especially if the code is syntactically correct but logically flawed. Auditors want to know your review process accounts for AI's specific failure modes.
Documentation. Can you demonstrate that AI-generated code went through your standard change management process? Or does AI create a fast path that bypasses controls?
What Auditors Are Now Asking
Based on emerging audit practices, here are the specific questions organizations are fielding:
Questions About AI Tool Usage
- What AI coding tools do your developers use?
- What access do these tools have to your codebase and systems?
- Do you have a policy governing AI tool usage in development?
- Are there restrictions on what code AI can generate (e.g., security-critical modules)?
Questions About Output Controls
- How do you verify the quality and security of AI-generated code?
- Who reviews AI-generated code before it's committed?
- Are reviewers qualified to identify AI-specific failure modes?
- Do you use automated security scanning on AI-generated code?
- How do you detect if AI-generated code introduces vulnerabilities?
Questions About Accountability
- Who is responsible for AI-generated code defects?
- How do you track which code was AI-generated vs. human-written?
- Can you demonstrate that AI-generated changes followed your change management process?
- How do you handle AI-generated code that fails security review?
Questions About Access Control Logic
- Does AI generate authentication or authorization code?
- How do you verify AI-generated access control logic is correct?
- Who signs off on AI-generated security-critical code?
- Do you have specific controls for AI-generated code that affects access?
The Evidence Auditors Expect
Auditors don't just want policies—they want evidence that controls operate effectively. For AI-generated code, expect requests for:
AI usage policy documentation. A written policy that addresses which AI tools are approved, what they can access, what code they can generate, and what review requirements apply.
Code review records. Evidence that AI-generated code goes through code review, with documentation of who reviewed it and what they verified.
Security scan results. Automated scanning (SAST, DAST, dependency scanning) results showing AI-generated code was analyzed before deployment.
Verification records for security-critical code. For code affecting access controls, authentication, or sensitive operations, evidence that qualified personnel verified correctness—not just syntactic review, but semantic verification.
Change management tickets. Standard change management records that include AI-generated changes, showing authorization, testing, and approval.
Training records. Evidence that developers reviewing AI-generated code understand AI-specific risks and review requirements.
Controls That Satisfy SOC 2 Requirements
Meeting SOC 2 requirements with AI-generated code requires controls at multiple points:
Pre-Generation Controls
Tool authorization. Maintain an approved list of AI coding tools. Document what access each tool has and ensure tools meet your security requirements.
Scope restrictions. Define what AI can and cannot generate. Many organizations prohibit AI from generating authentication logic, cryptographic implementations, or access control code without additional verification.
Context controls. Limit what code and data AI tools can access. Not every AI assistant needs access to your entire codebase.
Generation-Time Controls
Developer awareness. Developers should know when they're using AI-generated code and understand their responsibility to verify it.
Incremental review. Review AI-generated code as it's produced, not just at commit time. Errors compound when developers build on flawed AI output.
Pre-Commit Controls
Mandatory review. All AI-generated code requires review before commit. Consider requiring review from someone other than the developer who prompted the AI.
Automated scanning. Run security scanners on AI-generated code. While scanners don't catch everything, they catch known vulnerability patterns.
Verification for security-critical code. Code affecting access controls, authentication, encryption, or sensitive data handling requires verification by qualified personnel—not just syntactic code review, but confirmation that the logic is correct.
Post-Deployment Controls
Monitoring. Monitor AI-generated code paths in production for anomalies.
Incident response. Your incident response process should account for AI-generated code defects as a potential root cause.
Periodic review. Regularly review AI-generated code in production, especially as AI capabilities and risks evolve.
Why Expert Verification Satisfies Auditor Requirements
The controls that give auditors confidence share a common element: qualified human verification before AI-generated code affects production systems.
This is particularly true for security-critical code. Auditors understand that code review alone may not catch AI-specific issues—the code looks right but behaves wrong. They want evidence that someone qualified verified the code does what it should.
Expert verification—having senior engineers or domain specialists review AI-generated code before deployment—directly addresses this requirement. It provides:
Clear accountability. A named individual verified the code and takes responsibility for that verification.
Qualified judgment. The verifier has the expertise to catch issues a general code reviewer might miss.
Documented evidence. The verification creates an audit trail showing what was reviewed, by whom, and what they confirmed.
Continuous coverage. As AI-generated code changes over time, ongoing expert verification ensures new changes meet the same standard.
For organizations using AI extensively in development, building this verification into the development workflow creates a control that scales with AI usage and satisfies auditor requirements across CC6, CC7, and CC8.
Fairy provides this verification layer for AI-generated code. The Fairy for Code platform ensures AI-generated changes are reviewed by senior engineers before reaching production, creating the audit trail and expert oversight SOC 2 compliance requires. For organizations building AI into their development process, Fairy Scout offers free AI PR review that can begin building this control immediately.
Building Your SOC 2 Control Framework for AI-Generated Code
A complete control framework addresses each trust service criterion:
For CC6 (Access Controls)
- Document what access AI tools have to your systems
- Restrict AI from generating access control code without additional verification
- Require expert verification for any AI-generated code affecting authentication or authorization
- Maintain evidence of verification for security-critical AI-generated code
For CC7 (System Operations)
- Run automated security scanning on all AI-generated code
- Require verification for AI-generated operational code (logging, monitoring, alerting)
- Monitor AI-generated code paths in production
- Include AI-generated code in vulnerability management processes
For CC8 (Change Management)
- Document your AI usage policy as part of change management
- Track which changes include AI-generated code
- Require review and approval for AI-generated changes following standard change management
- Maintain evidence that AI-generated code followed your change management process
The Audit Conversation Is Changing
SOC 2 auditors are still developing their approach to AI-generated code. The organizations that fare best in audits are those that proactively addressed AI in their control framework rather than waiting for auditor questions.
The key insight: AI-generated code isn't a special exception to your controls—it's code that requires your controls to work correctly. Auditors want to see that you've thought through how AI fits into your existing control framework and addressed the gaps AI creates.
Organizations that treat AI-generated code with the same rigor as human-written code—and add additional controls for AI-specific risks—are well-positioned for SOC 2 audits now and as auditor expectations continue to evolve.
For teams deploying AI-generated code in production, getting started with Fairy establishes the verification layer that satisfies SOC 2 requirements while enabling teams to move faster with AI assistance.
Frequently asked questions
Do SOC 2 auditors specifically ask about AI-generated code?
Yes. Auditors increasingly include AI-related questions in their evidence requests. They want to understand what AI tools developers use, what controls govern AI outputs, and how AI-generated changes are reviewed before reaching production.
Which SOC 2 trust service criteria apply to AI-generated code?
CC6 (Logical and Physical Access Controls), CC7 (System Operations), and CC8 (Change Management) are the primary criteria. AI-generated code touches all three because it affects access control logic, system behavior, and the change management process itself.
Can we use AI coding tools and still pass a SOC 2 audit?
Yes, but you need documented controls. Auditors want evidence that AI-generated code goes through the same rigor as human-written code—including code review, security scanning, and authorization before deployment.
What evidence do auditors want for AI-generated code controls?
Auditors typically request documentation of your AI usage policy, code review records showing AI output was verified, security scan results, and evidence that qualified personnel approved AI-generated changes before production deployment.
Have AI-generated work you’d want verified? Connect with a Fairy → or run a free check with Scout.
More resources