SOC 2 Compliance Expert
SOC 2 Type I and Type II compliance management covering all Trust Services Criteria (TSC), infrastructure security validation, evidence collection, and end-to-end audit preparation.
SOC 2 Overview
Type I vs Type II
| Aspect |
Type I |
Type II |
| Scope |
Design of controls at a point in time |
Design AND operating effectiveness over a period |
| Duration |
Single date (snapshot) |
Observation period (3-12 months, typically 6-12) |
| Cost |
$20K-$60K (first audit) |
$40K-$150K (first audit) |
| Timeline |
1-3 months |
6-15 months (includes observation period) |
| Customer Preference |
Early-stage acceptable |
Enterprise customers require |
Start with Type I to validate control design, then transition to Type II within 6 months.
Trust Services Criteria Summary
| Category |
Focus |
Controls |
| CC1-CC5 |
Common Criteria (COSO-based) |
Control environment, communication, risk, monitoring, control activities |
| CC6 |
Logical and Physical Access |
Authentication, authorization, physical security, encryption |
| CC7 |
System Operations |
Vulnerability management, monitoring, incident response, BCP |
| CC8 |
Change Management |
Authorization, testing, deployment controls |
| CC9 |
Risk Mitigation |
Vendor management, business disruption, risk transfer |
| A1 |
Availability |
Capacity planning, DR, recovery testing |
| PI1 |
Processing Integrity |
Data validation, error handling, reconciliation |
| C1 |
Confidentiality |
Classification, encryption, disposal |
| P1 |
Privacy |
Notice, consent, data subject rights, retention |
For detailed control requirements per category, see REFERENCE.md.
Clarify First
Before running the readiness assessment, confirm these inputs. If any is unknown or vague, ASK — do not assume:
Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the assessment.
Readiness Assessment Workflow
The agent guides organizations through SOC 2 readiness from gap analysis through audit completion.
Workflow: Phase 1 -- Gap Analysis (Weeks 1-4)
- Define scope -- determine which TSC categories to include (Security is mandatory), define system boundaries, identify subservice organizations (carve-out vs. inclusive), document principal service commitments.
- Assess current state -- inventory existing policies and procedures, map current controls to TSC requirements, interview process owners and control operators.
- Run automated gap analysis using
scripts/soc2_readiness_checker.py.
- Document gaps -- missing controls, controls lacking evidence, controls not operating effectively.
- Prioritize gaps by risk level and remediation effort.
- Validation checkpoint: Gap analysis covers all in-scope TSC categories; each gap has severity rating and remediation owner assigned.
Workflow: Phase 2 -- Remediation (Weeks 5-16)
- Develop/update policies -- information security policy, supporting procedures per control domain, policy review and approval workflows.
- Implement technical controls -- configure IdP with SSO/MFA enforcement, deploy endpoint security (MDM, EDR, disk encryption), implement SIEM logging and monitoring, configure backup and DR, harden cloud infrastructure.
- Establish processes -- access review procedures, change management workflow, incident response procedures, vendor management program, security awareness training.
- Set up evidence collection -- configure automated collection, establish repository structure, define refresh cadence per TSC category.
- Validation checkpoint: All identified gaps remediated; technical controls verified via
scripts/soc2_infrastructure_auditor.py; evidence collection producing artifacts.
Workflow: Phase 3 -- Pre-Audit (Weeks 17-20)
- Conduct internal readiness assessment -- mock audit against all in-scope TSC, validate evidence completeness and quality, run infrastructure auditor for technical validation.
- Remediate pre-audit findings -- address remaining gaps, strengthen evidence.
- Select and engage CPA firm -- negotiate scope, timeline, fees; schedule kickoff; prepare system description draft.
- Validation checkpoint: Mock audit passes with no critical gaps; system description reviewed; auditor engaged.
Workflow: Phase 4 -- Audit Execution
- Type I audit (if applicable) -- auditor reviews control design; management provides assertions; address findings before Type II.
- Type II observation period (3-12 months) -- controls operate consistently, evidence collected continuously, quarterly self-assessments, regular auditor check-ins.
- Fieldwork (2-4 weeks) -- auditor selects samples, tests controls, interviews personnel; draft report review; final report issuance.
- Validation checkpoint: Clean opinion received; any findings have management response and remediation plan.
Evidence Collection Framework
Evidence by TSC Category
| TSC |
Evidence Type |
Collection Method |
Refresh |
| CC1 |
Code of conduct acknowledgments |
HR system export |
Annual |
| CC2 |
Security awareness training records |
LMS export |
Ongoing |
| CC3 |
Risk assessment report, risk register |
GRC platform |
Annual/Quarterly |
| CC4 |
Penetration test reports, vulnerability scans |
Third-party/scanner |
Annual/Monthly |
| CC5 |
Policy documents with version history |
Policy management |
Annual review |
| CC6 |
Access reviews, MFA enrollment, offboarding |
IAM/IdP/HRIS |
Quarterly/Per event |
| CC7 |
Vulnerability remediation, incident records |
Ticketing/ITSM |
Ongoing |
| CC8 |
Change tickets with approvals, code reviews |
ITSM/Git |
Per change |
| CC9 |
Vendor risk assessments, vendor SOC 2 reports |
GRC platform |
Annual |
| A1 |
Uptime reports, DR tests, backup logs |
Monitoring/backup |
Monthly/Semi-annual |
| PI1 |
Data validation/reconciliation reports |
Application logs |
Per process |
| C1 |
Data classification inventory, encryption configs |
Manual/automated |
Annual/Quarterly |
| P1 |
PIAs, DSR response tracking |
Privacy tool |
Per event |
Example: Evidence Collection Command
# Generate evidence checklist for all TSC categories
python scripts/evidence_collector.py --generate-checklist --categories all
# Track evidence status
python scripts/evidence_collector.py --status evidence-tracker.json
# Update specific evidence item
python scripts/evidence_collector.py --update evidence-tracker.json \
--item CC6.1-MFA --status collected
# Generate readiness dashboard
python scripts/evidence_collector.py --dashboard evidence-tracker.json
# Export for auditor review
python scripts/evidence_collector.py --export evidence-tracker.json --format json
Automation Strategies
GRC Platforms: Vanta, Drata, Secureframe, Laika, AuditBoard -- automated evidence collection via API integrations, continuous control monitoring, auditor collaboration portals.
Infrastructure-as-Evidence: Cloud configuration snapshots (AWS Config, Azure Policy, GCP Org Policies), Terraform state as configuration evidence, Git history as change management evidence, CI/CD pipeline logs as deployment control evidence.
Infrastructure Security Validation
The agent validates infrastructure configurations against SOC 2 requirements.
Quick Reference: Infrastructure Checks
| Domain |
Key Checks |
SOC 2 Mapping |
| Cloud (AWS/Azure/GCP) |
Encryption, IAM, logging, network, backup, secrets |
CC6, CC7, A1, C1 |
| DNS |
SPF, DKIM, DMARC, DNSSEC, CAA |
CC6.6, CC2.2 |
| TLS/SSL |
TLS 1.2+, AEAD ciphers, HSTS, auto-renewal |
CC6.7 |
| Endpoint |
MDM, disk encryption, EDR, patching, screen lock |
CC6.1, CC6.8, CC7.1 |
| Network |
Segmentation, WAF, DDoS, VPN/ZTNA, egress filtering |
CC6.6, A1.1 |
| Container |
Image scanning, minimal base, no privileged, RBAC |
CC6.1, CC7.1 |
| CI/CD |
Signed commits, branch protection, SAST/DAST, SBOM |
CC7.1, CC8.1 |
| Secrets |
Vault storage, rotation policies, git scanning |
CC6.1 |
For detailed per-provider control mappings, see REFERENCE.md.
Example: Infrastructure Audit Command
# Full infrastructure audit
python scripts/soc2_infrastructure_auditor.py --config infra-config.json
# Audit specific domains only
python scripts/soc2_infrastructure_auditor.py --config infra-config.json \
--domains dns tls cloud
# JSON output with severity ratings
python scripts/soc2_infrastructure_auditor.py --config infra-config.json --format json
# Generate sample configuration template
python scripts/soc2_infrastructure_auditor.py --generate-template
Audit Timeline
Typical Timeline (First SOC 2)
| Phase |
Duration |
Activities |
| Scoping |
2-4 weeks |
Define TSC, system boundaries, auditor selection |
| Gap Analysis |
2-4 weeks |
Assess current controls, identify gaps |
| Remediation |
8-16 weeks |
Implement missing controls, policies, procedures |
| Type I Audit |
2-4 weeks |
Point-in-time control design assessment |
| Type II Observation |
3-12 months |
Controls operate, evidence collected continuously |
| Type II Fieldwork |
2-4 weeks |
Auditor testing, evidence review, interviews |
| Report Issuance |
2-4 weeks |
Draft review, management response, final report |
Annual Renewal
- Begin renewal planning 3 months before observation period ends
- Maintain continuous compliance between audit periods
- Address prior-year findings before new observation period
- Bridge letters available for gaps between reports
Incident Response Requirements
IRP Structure
- Preparation -- IR team defined, communication channels established, runbooks for common incidents, legal/PR contacts on retainer.
- Detection and Analysis -- monitoring/alerting coverage, severity classification (SEV1-SEV4), triage procedures, escalation matrix.
- Containment, Eradication, Recovery -- isolate affected systems, preserve evidence, identify root cause, restore and validate.
- Post-Incident -- blameless post-mortem within 5 business days, lessons learned, control improvements, notification assessment (MTTD, MTTR, MTTC tracking).
For severity level definitions and breach notification timelines, see REFERENCE.md.
Tools
SOC 2 Readiness Checker
# Full readiness assessment
python scripts/soc2_readiness_checker.py --config org-controls.json
# JSON output for programmatic use
python scripts/soc2_readiness_checker.py --config org-controls.json --format json
# Check specific TSC categories
python scripts/soc2_readiness_checker.py --config org-controls.json \
--categories security availability
# Include cloud provider control mapping
python scripts/soc2_readiness_checker.py --config org-controls.json --cloud-mapping
Evidence Collector
# Generate checklist and track status
python scripts/evidence_collector.py --generate-checklist --categories all
python scripts/evidence_collector.py --status evidence-tracker.json
python scripts/evidence_collector.py --dashboard evidence-tracker.json
Infrastructure Auditor
# Validate infrastructure against SOC 2 requirements
python scripts/soc2_infrastructure_auditor.py --config infra-config.json
python scripts/soc2_infrastructure_auditor.py --config infra-config.json --format json
References
| Document |
Description |
| REFERENCE.md |
Detailed TSC controls, infrastructure checks, access control specs, vendor management, training, IRP, BC/DR |
| Trust Services Criteria Guide |
Complete TSC reference with control objectives and audit questions |
| Infrastructure Security Controls |
Cloud, DNS, TLS, endpoint, container, CI/CD security configurations |
| Audit Preparation Playbook |
End-to-end audit prep guide with timelines, checklists, cost estimation |
Troubleshooting
| Problem |
Likely Cause |
Resolution |
| Readiness checker scores are 0% across all categories |
Controls JSON missing config_key values or all set to false |
Verify the input JSON maps each TSC control to a boolean value under the correct config_key. Run --generate-sample > sample-config.json to see the expected structure. |
| Infrastructure auditor reports all checks as "fail" |
Infrastructure config JSON is empty or uses wrong key names |
Run --generate-template to produce a valid template. Populate DNS, TLS, cloud, endpoint, and other sections with actual infrastructure state. |
| Evidence collector checklist missing categories |
--categories flag filtering output |
Use --categories all to generate the complete checklist. Available categories: security, availability, processing_integrity, confidentiality, privacy. |
| Evidence tracker status not updating |
Tracker file path incorrect or file not writable |
Verify the path passed to --status or --update points to an existing tracker JSON file. Check file permissions. |
| Cloud mapping not appearing in readiness report |
--cloud-mapping flag not included |
Add --cloud-mapping to the readiness checker command to include AWS/Azure/GCP control mappings in the output. |
| Type II observation period too short for auditor |
Observation period is less than 3 months |
Most CPA firms require a minimum 3-month observation period for Type II. A 6-12 month period carries more weight. Plan the observation window during the scoping phase. |
| Auditor requests evidence not in the tracker |
Evidence catalog does not cover all TSC subcriteria for the selected scope |
Supplement the auto-generated checklist with auditor-specific evidence requests. Each CPA firm may have additional requirements beyond the standard TSC evidence items. |
Success Criteria
- SOC 2 scope defined with all applicable TSC categories selected, system boundaries documented, and subservice organizations identified (carve-out vs inclusive)
- Gap analysis completed with every identified gap assigned a severity rating, remediation owner, and target completion date
- Readiness score of 80%+ across all in-scope TSC categories before engaging the CPA firm, trending to 95%+ before Type II fieldwork
- Evidence collection framework operational with centralized repository, defined refresh cadence per TSC category, and automated collection where possible
- Infrastructure audit passes with no critical or high-severity findings in DNS, TLS, cloud, endpoint, or access control domains
- Type II observation period of at least 6 months with continuous control operation, quarterly self-assessments, and no significant control failures
- Clean SOC 2 Type II opinion received with any findings addressed by management response and documented remediation plans
Scope & Limitations
In Scope:
- SOC 2 Type I and Type II readiness assessment against all TSC categories (CC1-CC9, A1, PI1, C1, P1)
- Infrastructure security validation (DNS, TLS, cloud, endpoint, network, container, CI/CD, secrets)
- Evidence collection framework generation and tracking
- Gap analysis with severity-rated findings and remediation guidance
- Audit timeline planning and CPA firm engagement preparation
- Incident response plan structure and requirements
- Continuous compliance program design
Out of Scope:
- CPA firm audit execution (the tools prepare for audit; the actual Type I/II report requires an independent CPA firm)
- SOC 1 (ICFR) assessment (SOC 1 covers financial reporting controls, not security/availability/privacy)
- SOC 3 report generation (SOC 3 is a public-facing summary derived from SOC 2; it requires a completed SOC 2 audit)
- Penetration testing execution (use infrastructure-compliance-auditor or engage a third-party pentest firm)
- GRC platform selection or implementation (the skill is compatible with Vanta, Drata, Secureframe, etc., but does not implement them)
- Legal advice on customer contractual requirements for SOC 2 reports
- Physical security assessments (the infrastructure auditor covers logical controls; physical data center audits require on-site assessment)
Integration Points
| Skill |
Integration |
| infrastructure-compliance-auditor |
Provides Vanta-level infrastructure checks across cloud, DNS, TLS, endpoints, access controls, and CI/CD that map directly to SOC 2 TSC requirements |
| nist-csf-specialist |
NIST CSF functions map to SOC 2 TSC categories; use the control mapper to build unified control matrices for organizations pursuing both |
| information-security-manager-iso27001 |
ISO 27001 Annex A controls provide a management system backbone that satisfies many SOC 2 requirements; shared evidence reduces audit burden |
| pci-dss-specialist |
PCI DSS requirements overlap with SOC 2 CC6 (access), CC7 (operations), CC8 (change management); shared controls for payment-processing organizations |
| gdpr-dsgvo-expert |
GDPR requirements align with SOC 2 Privacy (P1) criteria; organizations processing EU personal data can leverage shared privacy controls |
| nis2-directive-specialist |
NIS2 minimum security measures overlap with SOC 2 security criteria; EU entities can map shared incident response, access control, and encryption controls |
Tool Reference
soc2_readiness_checker.py
Evaluates organizational controls against SOC 2 Trust Services Criteria with per-category scoring.
| Flag |
Required |
Description |
--config |
Yes (or --generate-sample) |
Path to organization controls JSON file with boolean values for each TSC control |
--format |
No |
Output format: json for structured output, omit for human-readable text |
--categories |
No |
Space-separated TSC categories to assess (e.g., security availability). Omit for all. |
--cloud-mapping |
No |
Include cloud provider (AWS/Azure/GCP) control mappings in the output |
--generate-sample |
No |
Generate a sample controls JSON template (pipe to file with > sample-config.json) |
evidence_collector.py
Generates evidence collection checklists and tracks evidence gathering status.
| Flag |
Required |
Description |
--generate-checklist |
No |
Generate an evidence collection checklist for the specified categories |
--categories |
No |
Space-separated TSC categories: security, availability, processing_integrity, confidentiality, privacy, or all |
--status |
No |
Path to evidence tracker JSON file to display collection status |
--update |
No |
Path to evidence tracker JSON file to update (use with --item and --status) |
--item |
No |
Evidence item identifier to update (e.g., CC6.1-MFA) |
--dashboard |
No |
Path to evidence tracker JSON file to generate a readiness dashboard |
--export |
No |
Path to evidence tracker JSON file to export |
--format |
No |
Export format: json for structured output |
soc2_infrastructure_auditor.py
Audits infrastructure configurations against SOC 2 requirements with severity-rated findings.
| Flag |
Required |
Description |
--config |
Yes (or --generate-template) |
Path to infrastructure configuration JSON file with DNS, TLS, cloud, endpoint, and other domain settings |
--format |
No |
Output format: json for structured findings with severity ratings, omit for human-readable text |
--domains |
No |
Space-separated infrastructure domains to audit (e.g., dns tls cloud). Omit for all domains. |
--generate-template |
No |
Generate a sample infrastructure configuration template (pipe to file with > infra-config.json) |
1---
2name: soc2-compliance-expert
3description: >
4 SOC 2 Type I and Type II compliance management against the Trust Services
5 Criteria. Use for SOC 2 readiness assessments, TSC gap analysis, audit evidence
6 collection, infrastructure control validation, and CPA firm audit preparation.
7license: MIT + Commons Clause
8metadata:
9 version: 1.0.0
10 author: borghei
11 category: compliance
12 domain: security-compliance
13 updated: 2026-03-31
14 tags: [soc2, trust-services, security-compliance, evidence-collection]
15---
16
17# SOC 2 Compliance Expert
18
19SOC 2 Type I and Type II compliance management covering all Trust Services Criteria (TSC), infrastructure security validation, evidence collection, and end-to-end audit preparation.
20
21---
22
23## SOC 2 Overview
24
25### Type I vs Type II
26
27| Aspect | Type I | Type II |
28|--------|--------|---------|
29| Scope | Design of controls at a point in time | Design AND operating effectiveness over a period |
30| Duration | Single date (snapshot) | Observation period (3-12 months, typically 6-12) |
31| Cost | $20K-$60K (first audit) | $40K-$150K (first audit) |
32| Timeline | 1-3 months | 6-15 months (includes observation period) |
33| Customer Preference | Early-stage acceptable | Enterprise customers require |
34
35Start with Type I to validate control design, then transition to Type II within 6 months.
36
37### Trust Services Criteria Summary
38
39| Category | Focus | Controls |
40|----------|-------|----------|
41| CC1-CC5 | Common Criteria (COSO-based) | Control environment, communication, risk, monitoring, control activities |
42| CC6 | Logical and Physical Access | Authentication, authorization, physical security, encryption |
43| CC7 | System Operations | Vulnerability management, monitoring, incident response, BCP |
44| CC8 | Change Management | Authorization, testing, deployment controls |
45| CC9 | Risk Mitigation | Vendor management, business disruption, risk transfer |
46| A1 | Availability | Capacity planning, DR, recovery testing |
47| PI1 | Processing Integrity | Data validation, error handling, reconciliation |
48| C1 | Confidentiality | Classification, encryption, disposal |
49| P1 | Privacy | Notice, consent, data subject rights, retention |
50
51For detailed control requirements per category, see [REFERENCE.md](REFERENCE.md).
52
53---
54
55## Clarify First
56
57Before running the readiness assessment, confirm these inputs. If any is unknown or vague, ASK — do not assume:
58
59- [ ] **Report type** — Type I (design at a point in time) vs Type II (operating effectiveness over a period) (sets the observation-period requirement and timeline)
60- [ ] **TSC scope** — which criteria beyond mandatory Security (Availability, Processing Integrity, Confidentiality, Privacy) (drives which controls and evidence are needed)
61- [ ] **Subservice organizations** — carve-out vs inclusive (affects the scope and system description)
62
63Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the assessment.
64
65## Readiness Assessment Workflow
66
67The agent guides organizations through SOC 2 readiness from gap analysis through audit completion.
68
69### Workflow: Phase 1 -- Gap Analysis (Weeks 1-4)
70
711. **Define scope** -- determine which TSC categories to include (Security is mandatory), define system boundaries, identify subservice organizations (carve-out vs. inclusive), document principal service commitments.
722. **Assess current state** -- inventory existing policies and procedures, map current controls to TSC requirements, interview process owners and control operators.
733. **Run automated gap analysis** using `scripts/soc2_readiness_checker.py`.
744. **Document gaps** -- missing controls, controls lacking evidence, controls not operating effectively.
755. **Prioritize** gaps by risk level and remediation effort.
766. **Validation checkpoint:** Gap analysis covers all in-scope TSC categories; each gap has severity rating and remediation owner assigned.
77
78### Workflow: Phase 2 -- Remediation (Weeks 5-16)
79
801. **Develop/update policies** -- information security policy, supporting procedures per control domain, policy review and approval workflows.
812. **Implement technical controls** -- configure IdP with SSO/MFA enforcement, deploy endpoint security (MDM, EDR, disk encryption), implement SIEM logging and monitoring, configure backup and DR, harden cloud infrastructure.
823. **Establish processes** -- access review procedures, change management workflow, incident response procedures, vendor management program, security awareness training.
834. **Set up evidence collection** -- configure automated collection, establish repository structure, define refresh cadence per TSC category.
845. **Validation checkpoint:** All identified gaps remediated; technical controls verified via `scripts/soc2_infrastructure_auditor.py`; evidence collection producing artifacts.
85
86### Workflow: Phase 3 -- Pre-Audit (Weeks 17-20)
87
881. **Conduct internal readiness assessment** -- mock audit against all in-scope TSC, validate evidence completeness and quality, run infrastructure auditor for technical validation.
892. **Remediate pre-audit findings** -- address remaining gaps, strengthen evidence.
903. **Select and engage CPA firm** -- negotiate scope, timeline, fees; schedule kickoff; prepare system description draft.
914. **Validation checkpoint:** Mock audit passes with no critical gaps; system description reviewed; auditor engaged.
92
93### Workflow: Phase 4 -- Audit Execution
94
951. **Type I audit** (if applicable) -- auditor reviews control design; management provides assertions; address findings before Type II.
962. **Type II observation period** (3-12 months) -- controls operate consistently, evidence collected continuously, quarterly self-assessments, regular auditor check-ins.
973. **Fieldwork** (2-4 weeks) -- auditor selects samples, tests controls, interviews personnel; draft report review; final report issuance.
984. **Validation checkpoint:** Clean opinion received; any findings have management response and remediation plan.
99
100---
101
102## Evidence Collection Framework
103
104### Evidence by TSC Category
105
106| TSC | Evidence Type | Collection Method | Refresh |
107|-----|---------------|-------------------|---------|
108| CC1 | Code of conduct acknowledgments | HR system export | Annual |
109| CC2 | Security awareness training records | LMS export | Ongoing |
110| CC3 | Risk assessment report, risk register | GRC platform | Annual/Quarterly |
111| CC4 | Penetration test reports, vulnerability scans | Third-party/scanner | Annual/Monthly |
112| CC5 | Policy documents with version history | Policy management | Annual review |
113| CC6 | Access reviews, MFA enrollment, offboarding | IAM/IdP/HRIS | Quarterly/Per event |
114| CC7 | Vulnerability remediation, incident records | Ticketing/ITSM | Ongoing |
115| CC8 | Change tickets with approvals, code reviews | ITSM/Git | Per change |
116| CC9 | Vendor risk assessments, vendor SOC 2 reports | GRC platform | Annual |
117| A1 | Uptime reports, DR tests, backup logs | Monitoring/backup | Monthly/Semi-annual |
118| PI1 | Data validation/reconciliation reports | Application logs | Per process |
119| C1 | Data classification inventory, encryption configs | Manual/automated | Annual/Quarterly |
120| P1 | PIAs, DSR response tracking | Privacy tool | Per event |
121
122### Example: Evidence Collection Command
123
124```bash
125# Generate evidence checklist for all TSC categories
126python scripts/evidence_collector.py --generate-checklist --categories all
127
128# Track evidence status
129python scripts/evidence_collector.py --status evidence-tracker.json
130
131# Update specific evidence item
132python scripts/evidence_collector.py --update evidence-tracker.json \
133 --item CC6.1-MFA --status collected
134
135# Generate readiness dashboard
136python scripts/evidence_collector.py --dashboard evidence-tracker.json
137
138# Export for auditor review
139python scripts/evidence_collector.py --export evidence-tracker.json --format json
140```
141
142### Automation Strategies
143
144**GRC Platforms:** Vanta, Drata, Secureframe, Laika, AuditBoard -- automated evidence collection via API integrations, continuous control monitoring, auditor collaboration portals.
145
146**Infrastructure-as-Evidence:** Cloud configuration snapshots (AWS Config, Azure Policy, GCP Org Policies), Terraform state as configuration evidence, Git history as change management evidence, CI/CD pipeline logs as deployment control evidence.
147
148---
149
150## Infrastructure Security Validation
151
152The agent validates infrastructure configurations against SOC 2 requirements.
153
154### Quick Reference: Infrastructure Checks
155
156| Domain | Key Checks | SOC 2 Mapping |
157|--------|-----------|---------------|
158| Cloud (AWS/Azure/GCP) | Encryption, IAM, logging, network, backup, secrets | CC6, CC7, A1, C1 |
159| DNS | SPF, DKIM, DMARC, DNSSEC, CAA | CC6.6, CC2.2 |
160| TLS/SSL | TLS 1.2+, AEAD ciphers, HSTS, auto-renewal | CC6.7 |
161| Endpoint | MDM, disk encryption, EDR, patching, screen lock | CC6.1, CC6.8, CC7.1 |
162| Network | Segmentation, WAF, DDoS, VPN/ZTNA, egress filtering | CC6.6, A1.1 |
163| Container | Image scanning, minimal base, no privileged, RBAC | CC6.1, CC7.1 |
164| CI/CD | Signed commits, branch protection, SAST/DAST, SBOM | CC7.1, CC8.1 |
165| Secrets | Vault storage, rotation policies, git scanning | CC6.1 |
166
167For detailed per-provider control mappings, see [REFERENCE.md](REFERENCE.md#infrastructure-security-checks).
168
169### Example: Infrastructure Audit Command
170
171```bash
172# Full infrastructure audit
173python scripts/soc2_infrastructure_auditor.py --config infra-config.json
174
175# Audit specific domains only
176python scripts/soc2_infrastructure_auditor.py --config infra-config.json \
177 --domains dns tls cloud
178
179# JSON output with severity ratings
180python scripts/soc2_infrastructure_auditor.py --config infra-config.json --format json
181
182# Generate sample configuration template
183python scripts/soc2_infrastructure_auditor.py --generate-template
184```
185
186---
187
188## Audit Timeline
189
190### Typical Timeline (First SOC 2)
191
192| Phase | Duration | Activities |
193|-------|----------|------------|
194| Scoping | 2-4 weeks | Define TSC, system boundaries, auditor selection |
195| Gap Analysis | 2-4 weeks | Assess current controls, identify gaps |
196| Remediation | 8-16 weeks | Implement missing controls, policies, procedures |
197| Type I Audit | 2-4 weeks | Point-in-time control design assessment |
198| Type II Observation | 3-12 months | Controls operate, evidence collected continuously |
199| Type II Fieldwork | 2-4 weeks | Auditor testing, evidence review, interviews |
200| Report Issuance | 2-4 weeks | Draft review, management response, final report |
201
202### Annual Renewal
203
204- Begin renewal planning 3 months before observation period ends
205- Maintain continuous compliance between audit periods
206- Address prior-year findings before new observation period
207- Bridge letters available for gaps between reports
208
209---
210
211## Incident Response Requirements
212
213### IRP Structure
214
2151. **Preparation** -- IR team defined, communication channels established, runbooks for common incidents, legal/PR contacts on retainer.
2162. **Detection and Analysis** -- monitoring/alerting coverage, severity classification (SEV1-SEV4), triage procedures, escalation matrix.
2173. **Containment, Eradication, Recovery** -- isolate affected systems, preserve evidence, identify root cause, restore and validate.
2184. **Post-Incident** -- blameless post-mortem within 5 business days, lessons learned, control improvements, notification assessment (MTTD, MTTR, MTTC tracking).
219
220For severity level definitions and breach notification timelines, see [REFERENCE.md](REFERENCE.md#incident-response-plan).
221
222---
223
224## Tools
225
226### SOC 2 Readiness Checker
227
228```bash
229# Full readiness assessment
230python scripts/soc2_readiness_checker.py --config org-controls.json
231
232# JSON output for programmatic use
233python scripts/soc2_readiness_checker.py --config org-controls.json --format json
234
235# Check specific TSC categories
236python scripts/soc2_readiness_checker.py --config org-controls.json \
237 --categories security availability
238
239# Include cloud provider control mapping
240python scripts/soc2_readiness_checker.py --config org-controls.json --cloud-mapping
241```
242
243### Evidence Collector
244
245```bash
246# Generate checklist and track status
247python scripts/evidence_collector.py --generate-checklist --categories all
248python scripts/evidence_collector.py --status evidence-tracker.json
249python scripts/evidence_collector.py --dashboard evidence-tracker.json
250```
251
252### Infrastructure Auditor
253
254```bash
255# Validate infrastructure against SOC 2 requirements
256python scripts/soc2_infrastructure_auditor.py --config infra-config.json
257python scripts/soc2_infrastructure_auditor.py --config infra-config.json --format json
258```
259
260---
261
262## References
263
264| Document | Description |
265|----------|-------------|
266| [REFERENCE.md](REFERENCE.md) | Detailed TSC controls, infrastructure checks, access control specs, vendor management, training, IRP, BC/DR |
267| [Trust Services Criteria Guide](references/trust-services-criteria-guide.md) | Complete TSC reference with control objectives and audit questions |
268| [Infrastructure Security Controls](references/infrastructure-security-controls.md) | Cloud, DNS, TLS, endpoint, container, CI/CD security configurations |
269| [Audit Preparation Playbook](references/audit-preparation-playbook.md) | End-to-end audit prep guide with timelines, checklists, cost estimation |
270
271---
272
273## Troubleshooting
274
275| Problem | Likely Cause | Resolution |
276|---------|-------------|------------|
277| Readiness checker scores are 0% across all categories | Controls JSON missing `config_key` values or all set to false | Verify the input JSON maps each TSC control to a boolean value under the correct `config_key`. Run `--generate-sample > sample-config.json` to see the expected structure. |
278| Infrastructure auditor reports all checks as "fail" | Infrastructure config JSON is empty or uses wrong key names | Run `--generate-template` to produce a valid template. Populate DNS, TLS, cloud, endpoint, and other sections with actual infrastructure state. |
279| Evidence collector checklist missing categories | `--categories` flag filtering output | Use `--categories all` to generate the complete checklist. Available categories: `security`, `availability`, `processing_integrity`, `confidentiality`, `privacy`. |
280| Evidence tracker status not updating | Tracker file path incorrect or file not writable | Verify the path passed to `--status` or `--update` points to an existing tracker JSON file. Check file permissions. |
281| Cloud mapping not appearing in readiness report | `--cloud-mapping` flag not included | Add `--cloud-mapping` to the readiness checker command to include AWS/Azure/GCP control mappings in the output. |
282| Type II observation period too short for auditor | Observation period is less than 3 months | Most CPA firms require a minimum 3-month observation period for Type II. A 6-12 month period carries more weight. Plan the observation window during the scoping phase. |
283| Auditor requests evidence not in the tracker | Evidence catalog does not cover all TSC subcriteria for the selected scope | Supplement the auto-generated checklist with auditor-specific evidence requests. Each CPA firm may have additional requirements beyond the standard TSC evidence items. |
284
285---
286
287## Success Criteria
288
289- SOC 2 scope defined with all applicable TSC categories selected, system boundaries documented, and subservice organizations identified (carve-out vs inclusive)
290- Gap analysis completed with every identified gap assigned a severity rating, remediation owner, and target completion date
291- Readiness score of 80%+ across all in-scope TSC categories before engaging the CPA firm, trending to 95%+ before Type II fieldwork
292- Evidence collection framework operational with centralized repository, defined refresh cadence per TSC category, and automated collection where possible
293- Infrastructure audit passes with no critical or high-severity findings in DNS, TLS, cloud, endpoint, or access control domains
294- Type II observation period of at least 6 months with continuous control operation, quarterly self-assessments, and no significant control failures
295- Clean SOC 2 Type II opinion received with any findings addressed by management response and documented remediation plans
296
297---
298
299## Scope & Limitations
300
301**In Scope:**
302- SOC 2 Type I and Type II readiness assessment against all TSC categories (CC1-CC9, A1, PI1, C1, P1)
303- Infrastructure security validation (DNS, TLS, cloud, endpoint, network, container, CI/CD, secrets)
304- Evidence collection framework generation and tracking
305- Gap analysis with severity-rated findings and remediation guidance
306- Audit timeline planning and CPA firm engagement preparation
307- Incident response plan structure and requirements
308- Continuous compliance program design
309
310**Out of Scope:**
311- CPA firm audit execution (the tools prepare for audit; the actual Type I/II report requires an independent CPA firm)
312- SOC 1 (ICFR) assessment (SOC 1 covers financial reporting controls, not security/availability/privacy)
313- SOC 3 report generation (SOC 3 is a public-facing summary derived from SOC 2; it requires a completed SOC 2 audit)
314- Penetration testing execution (use infrastructure-compliance-auditor or engage a third-party pentest firm)
315- GRC platform selection or implementation (the skill is compatible with Vanta, Drata, Secureframe, etc., but does not implement them)
316- Legal advice on customer contractual requirements for SOC 2 reports
317- Physical security assessments (the infrastructure auditor covers logical controls; physical data center audits require on-site assessment)
318
319---
320
321## Integration Points
322
323| Skill | Integration |
324|-------|------------|
325| [infrastructure-compliance-auditor](../infrastructure-compliance-auditor/) | Provides Vanta-level infrastructure checks across cloud, DNS, TLS, endpoints, access controls, and CI/CD that map directly to SOC 2 TSC requirements |
326| [nist-csf-specialist](../nist-csf-specialist/) | NIST CSF functions map to SOC 2 TSC categories; use the control mapper to build unified control matrices for organizations pursuing both |
327| [information-security-manager-iso27001](../information-security-manager-iso27001/) | ISO 27001 Annex A controls provide a management system backbone that satisfies many SOC 2 requirements; shared evidence reduces audit burden |
328| [pci-dss-specialist](../pci-dss-specialist/) | PCI DSS requirements overlap with SOC 2 CC6 (access), CC7 (operations), CC8 (change management); shared controls for payment-processing organizations |
329| [gdpr-dsgvo-expert](../gdpr-dsgvo-expert/) | GDPR requirements align with SOC 2 Privacy (P1) criteria; organizations processing EU personal data can leverage shared privacy controls |
330| [nis2-directive-specialist](../nis2-directive-specialist/) | NIS2 minimum security measures overlap with SOC 2 security criteria; EU entities can map shared incident response, access control, and encryption controls |
331
332---
333
334## Tool Reference
335
336### soc2_readiness_checker.py
337
338Evaluates organizational controls against SOC 2 Trust Services Criteria with per-category scoring.
339
340| Flag | Required | Description |
341|------|----------|-------------|
342| `--config` | Yes (or `--generate-sample`) | Path to organization controls JSON file with boolean values for each TSC control |
343| `--format` | No | Output format: `json` for structured output, omit for human-readable text |
344| `--categories` | No | Space-separated TSC categories to assess (e.g., `security availability`). Omit for all. |
345| `--cloud-mapping` | No | Include cloud provider (AWS/Azure/GCP) control mappings in the output |
346| `--generate-sample` | No | Generate a sample controls JSON template (pipe to file with `> sample-config.json`) |
347
348### evidence_collector.py
349
350Generates evidence collection checklists and tracks evidence gathering status.
351
352| Flag | Required | Description |
353|------|----------|-------------|
354| `--generate-checklist` | No | Generate an evidence collection checklist for the specified categories |
355| `--categories` | No | Space-separated TSC categories: `security`, `availability`, `processing_integrity`, `confidentiality`, `privacy`, or `all` |
356| `--status` | No | Path to evidence tracker JSON file to display collection status |
357| `--update` | No | Path to evidence tracker JSON file to update (use with `--item` and `--status`) |
358| `--item` | No | Evidence item identifier to update (e.g., `CC6.1-MFA`) |
359| `--dashboard` | No | Path to evidence tracker JSON file to generate a readiness dashboard |
360| `--export` | No | Path to evidence tracker JSON file to export |
361| `--format` | No | Export format: `json` for structured output |
362
363### soc2_infrastructure_auditor.py
364
365Audits infrastructure configurations against SOC 2 requirements with severity-rated findings.
366
367| Flag | Required | Description |
368|------|----------|-------------|
369| `--config` | Yes (or `--generate-template`) | Path to infrastructure configuration JSON file with DNS, TLS, cloud, endpoint, and other domain settings |
370| `--format` | No | Output format: `json` for structured findings with severity ratings, omit for human-readable text |
371| `--domains` | No | Space-separated infrastructure domains to audit (e.g., `dns tls cloud`). Omit for all domains. |
372| `--generate-template` | No | Generate a sample infrastructure configuration template (pipe to file with `> infra-config.json`) |