SOC 2 Compliance Guide
This guide helps compliance officers configure Lucid to meet the requirements of SOC 2 (Service Organization Control 2) for AI systems, addressing the Trust Services Criteria for Security, Availability, Processing Integrity, Confidentiality, and Privacy.
Overview
SOC 2 is a framework developed by the American Institute of CPAs (AICPA) for managing customer data based on five Trust Services Criteria. Organizations that provide services involving customer data often need SOC 2 compliance to demonstrate their security controls to customers and partners.
Lucid helps organizations meet SOC 2 requirements through:
- Logical access security via injection defense and access controls
- System monitoring through comprehensive observability
- Change management via model integrity verification
- Data protection through PII detection and credential scanning
- Processing integrity through toxicity and bias detection
SOC 2 Trust Services Criteria and Lucid Auditors
Common Criteria (CC) - Security
| Control | Requirement | Recommended Auditor |
|---|---|---|
| CC6.1 | Logical access security | LLM Judge (access control, PII protection) |
| CC6.6 | Boundary protection | LLM Judge Auditor |
| CC7.2 | System monitoring | AI Passport |
| CC8.1 | Change management | LLM Judge Auditor (model integrity), LLM Judge |
Additional Trust Services Criteria
| Criteria | Requirement | Recommended Auditor |
|---|---|---|
| PI1.1-3 | Processing Integrity | LLM Judge Auditor, LLM Judge |
| C1.1 | Confidentiality | LLM Judge, Secrets Auditor (credential detection) |
| P1.1 | Privacy | LLM Judge |
Deploying for SOC 2 Compliance
Quick Start
Deploy an AI environment with the SOC 2 compliance profile:
lucid apply --model llama-3.1-8b --profile soc2
This enables the following auditors: - LLM Judge - PII detection and access control - Secrets Auditor - Credential scanning - AI Passport - System monitoring and audit logging - LLM Judge Auditor - Boundary protection and output quality - LLM Judge Auditor - Change management and model integrity - LLM Judge - Processing integrity
Custom Configuration
For organizations requiring specific SOC 2 controls, create a YAML configuration:
# soc2-environment.yaml
apiVersion: lucid.io/v1alpha1
kind: LucidEnvironment
metadata:
name: soc2-compliant-ai
spec:
infrastructure:
provider: aws
region: us-east-1
agents:
- name: soc2-agent
model:
id: meta-llama/Llama-3.1-8B
gpu:
type: A10G
memory: 24GB
auditorChain:
preRequest:
- auditorId: lucid-llm-judge-auditor
name: Boundary Protection (CC6.6)
env:
INJECTION_BLOCK_ON_DETECTION: "true"
INJECTION_THRESHOLD: "0.8"
TOXICITY_THRESHOLD: "0.7"
TOXICITY_BLOCK_ON_DETECTION: "true"
- auditorId: lucid-llm-judge-auditor
name: Access Security & PII (CC6.1)
postResponse:
- auditorId: lucid-llm-judge-auditor
name: Output Safety (CC8.1)
Deploy with:
lucid apply -f soc2-environment.yaml
Control-by-Control Guidance
CC6.1 - Logical Access Security
Requirement: The entity implements logical access security software, infrastructure, and architectures over protected information assets to protect them from security events.
Lucid Implementation:
- LLM Judge - Comprehensive access security
- Detects and protects PII in data flows
-
Enforces access control policies
-
Secrets Auditor - Credential protection
- Identifies exposed credentials that could enable unauthorized access
env:
ACCESS_CONTROL_ENABLED: "true"
PII_DETECTION_ENABLED: "true"
CREDENTIAL_DETECTION_ENABLED: "true"
CREDENTIAL_BLOCK_ON_DETECTION: "true"
Evidence for Auditors: The LLM Judge and Secrets Auditor generate logs of all PII detections, credential blocks, and access control decisions that demonstrate CC6.1 compliance.
CC6.6 - Boundary Protection
Requirement: The entity implements logical access security measures to protect against threats from sources outside its system boundaries.
Lucid Implementation:
- LLM Judge Auditor - Defends against external threats
- Blocks prompt injection attacks from external users
- Prevents jailbreak attempts that bypass security boundaries
- Protects the AI system from malicious inputs
env:
INJECTION_BLOCK_ON_DETECTION: "true"
INJECTION_THRESHOLD: "0.8"
JAILBREAK_DETECTION_ENABLED: "true"
Evidence for Auditors: Each blocked attack is logged with details including the attack pattern detected, timestamp, and source. The AI Passport includes attestation that the LLM Judge Auditor was active.
CC7.2 - System Monitoring
Requirement: The entity monitors system components and the operation of those components for anomalies that are indicative of malicious acts, natural disasters, and errors.
Lucid Implementation:
- AI Passport - Comprehensive system monitoring
- Records all AI system activities
- Detects anomalous behavior patterns
- Provides real-time alerting capabilities
env:
LOG_ALL_EVENTS: "true"
ANOMALY_DETECTION_ENABLED: "true"
ALERT_ON_ANOMALY: "true"
LOG_RETENTION_DAYS: "365"
Monitoring Dashboards:
# Stream real-time logs
lucid logs soc2-agent --follow
# View anomaly alerts
lucid logs soc2-agent --anomalies
# Check system status
lucid status soc2-agent --detailed
CC8.1 - Change Management
Requirement: The entity authorizes, designs, develops or acquires, configures, documents, tests, approves, and implements changes to infrastructure, data, software, and procedures.
Lucid Implementation:
- LLM Judge Auditor - Model change verification
- Verifies model integrity after updates
-
Detects unauthorized model changes
-
LLM Judge - Safety benchmarks
- Runs safety benchmarks to validate changes
-
Documents model capabilities and limitations
-
LLM Judge - Output provenance tracking
- Tracks changes in AI-generated content
- Provides audit trail for content attribution
env:
MODEL_INTEGRITY_CHECK: "true"
INTEGRITY_CHECK_ON_STARTUP: "true"
SAFETY_BENCHMARKS_ENABLED: "true"
DOCUMENT_MODEL_CHANGES: "true"
Change Documentation:
# View model integrity status
lucid status soc2-agent --integrity
# Export change records
lucid passport export --changes --from 2025-01-01 > change_log.json
PI1.1 - Processing Integrity
Requirement: The entity obtains or generates, uses, and communicates relevant, quality information regarding the objectives related to processing.
Lucid Implementation:
- LLM Judge Auditor - Output quality assurance
- Detects harmful or inappropriate content
- Ensures AI outputs meet quality standards
-
Blocks content that fails integrity checks
-
LLM Judge - Bias and fairness verification
- Evaluates model outputs for bias
- Ensures processing produces fair results
env:
TOXICITY_THRESHOLD: "0.7"
TOXICITY_BLOCK_ON_DETECTION: "true"
BIAS_DETECTION_ENABLED: "true"
CC4.1 - Control Monitoring
Requirement: The entity selects, develops, and performs ongoing and/or separate evaluations to ascertain whether controls are present and functioning.
Lucid Implementation:
- LLM Judge - Red team testing
- Performs adversarial testing of AI systems
- Evaluates control effectiveness
- Documents test results
env:
RED_TEAM_TESTING_ENABLED: "true"
CONTROL_EVALUATION_INTERVAL: "weekly"
Evidence for SOC 2 Audits
Type of Evidence Provided
Lucid provides the following evidence for SOC 2 examinations:
- Control Activity Evidence
- Logs of all auditor decisions
- Records of blocked threats
-
PII detection and handling records
-
Monitoring Evidence
- System activity logs
- Anomaly detection records
-
Performance metrics
-
Integrity Evidence
- Model integrity verification results
- Hardware attestation certificates (TEE)
-
AI Passport cryptographic proofs
-
Change Management Evidence
- Model update records
- Safety benchmark results
- Configuration change logs
Generating Audit Evidence
# Generate comprehensive SOC 2 evidence package
lucid passport export --compliance-report soc2 --format pdf > soc2_evidence.pdf
# Export control activity logs
lucid passport export --from 2025-01-01 --to 2025-03-31 --format json > control_logs.json
# List all AI Passports for the audit period
lucid passport list --from 2025-01-01 --to 2025-03-31
# View specific control evidence
lucid passport show <passport-id> --controls
For Your SOC 2 Auditor
When preparing for a SOC 2 examination, provide your auditor with:
- AI Passports - Cryptographic proof of control enforcement
- Observability logs - Complete audit trail of system activities
- Configuration files - Documentation of control settings
- Integrity reports - Model verification and safety benchmark results
The AI Passport serves as cryptographic evidence that: - Specific controls were in place during processing - Controls executed in a hardware-secured environment (TEE) - The control configuration was as documented
SOC 2 Type I vs Type II
Type I (Point in Time)
For SOC 2 Type I examinations, Lucid provides: - Current configuration documentation - Evidence that controls are in place - AI Passport showing control enforcement at examination date
Type II (Period of Time)
For SOC 2 Type II examinations, Lucid provides: - Historical logs covering the examination period - Evidence of consistent control operation - AI Passports for the entire audit period - Trend analysis and exception reports
# Export evidence for Type II audit period
lucid passport export \
--from 2025-01-01 \
--to 2025-06-30 \
--compliance-report soc2-type2 \
--format pdf
Mapping to SOC 2 + AI Addendum
If your organization is pursuing the SOC 2 + AI Addendum (for AI-specific controls), Lucid provides additional coverage:
| AI Addendum Area | Lucid Support |
|---|---|
| AI System Development | LLM Judge (safety testing) |
| AI Data Management | LLM Judge (data classification) |
| AI System Monitoring | AI Passport |
| AI Output Quality | LLM Judge Auditor, LLM Judge |
| AI Transparency | LLM Judge (provenance) |
Best Practices for SOC 2 Compliance
- Enable all recommended auditors - The SOC 2 profile provides comprehensive coverage
- Configure appropriate retention - Keep logs for at least 365 days for Type II audits
- Enable anomaly detection - Proactively identify control failures
- Document your configuration - Maintain YAML files as control documentation
- Review logs regularly - Don't wait for the audit to review evidence
- Test controls periodically - Use red team testing to verify effectiveness
- Maintain AI Passports - Export and archive for audit evidence
Related Resources
- Auditor Catalog - Detailed SOC 2 control mappings
- Policy as Code - Custom compliance rules
- HIPAA Compliance Guide - Healthcare organizations requiring both
- GDPR Compliance Guide - Organizations serving EU customers