> soc2-compliance

Use when the user asks to prepare for SOC 2 audits, map Trust Service Criteria, build control matrices, collect audit evidence, perform gap analysis, or assess SOC 2 Type I vs Type II readiness.

fetch
$curl "https://skillshub.wtf/alirezarezvani/claude-skills/soc2-compliance?format=md"
SKILL.mdsoc2-compliance

SOC 2 Compliance

SOC 2 Type I and Type II compliance preparation for SaaS companies. Covers Trust Service Criteria mapping, control matrix generation, evidence collection, gap analysis, and audit readiness assessment.

Table of Contents


Overview

What Is SOC 2?

SOC 2 (System and Organization Controls 2) is an auditing framework developed by the AICPA that evaluates how a service organization manages customer data. It applies to any technology company that stores, processes, or transmits customer information — primarily SaaS, cloud infrastructure, and managed service providers.

Type I vs Type II

AspectType IType II
ScopeDesign of controls at a point in timeDesign AND operating effectiveness over a period
DurationSnapshot (single date)Observation window (3-12 months, typically 6)
EvidenceControl descriptions, policiesControl descriptions + operating evidence (logs, tickets, screenshots)
Cost$20K-$50K (audit fees)$30K-$100K+ (audit fees)
Timeline1-2 months (audit phase)6-12 months (observation + audit)
Best ForFirst-time compliance, rapid market needMature organizations, enterprise customers

Who Needs SOC 2?

  • SaaS companies selling to enterprise customers
  • Cloud infrastructure providers handling customer workloads
  • Data processors managing PII, PHI, or financial data
  • Managed service providers with access to client systems
  • Any vendor whose customers require third-party assurance

Typical Journey

Gap Assessment → Remediation → Type I Audit → Observation Period → Type II Audit → Annual Renewal
    (4-8 wk)      (8-16 wk)     (4-6 wk)       (6-12 mo)          (4-6 wk)       (ongoing)

Trust Service Criteria

SOC 2 is organized around five Trust Service Criteria (TSC) categories. Security is required for every SOC 2 report; the remaining four are optional and selected based on business need.

Security (Common Criteria CC1-CC9) — Required

The foundation of every SOC 2 report. Maps to COSO 2013 principles.

CriteriaDomainKey Controls
CC1Control EnvironmentIntegrity/ethics, board oversight, org structure, competence, accountability
CC2Communication & InformationInternal/external communication, information quality
CC3Risk AssessmentRisk identification, fraud risk, change impact analysis
CC4Monitoring ActivitiesOngoing monitoring, deficiency evaluation, corrective actions
CC5Control ActivitiesPolicies/procedures, technology controls, deployment through policies
CC6Logical & Physical AccessAccess provisioning, authentication, encryption, physical restrictions
CC7System OperationsVulnerability management, anomaly detection, incident response
CC8Change ManagementChange authorization, testing, approval, emergency changes
CC9Risk MitigationVendor/business partner risk management

Availability (A1) — Optional

CriteriaFocusKey Controls
A1.1Capacity managementInfrastructure scaling, resource monitoring, capacity planning
A1.2Recovery operationsBackup procedures, disaster recovery, BCP testing
A1.3Recovery testingDR drills, failover testing, RTO/RPO validation

Select when: Customers depend on your uptime; you have SLAs; downtime causes direct business impact.

Confidentiality (C1) — Optional

CriteriaFocusKey Controls
C1.1IdentificationData classification policy, confidential data inventory
C1.2ProtectionEncryption at rest and in transit, DLP, access restrictions
C1.3DisposalSecure deletion procedures, media sanitization, retention enforcement

Select when: You handle trade secrets, proprietary data, or contractually confidential information.

Processing Integrity (PI1) — Optional

CriteriaFocusKey Controls
PI1.1AccuracyInput validation, processing checks, output verification
PI1.2CompletenessTransaction monitoring, reconciliation, error handling
PI1.3TimelinessSLA monitoring, processing delay alerts, batch job monitoring
PI1.4AuthorizationProcessing authorization controls, segregation of duties

Select when: Data accuracy is critical (financial processing, healthcare records, analytics platforms).

Privacy (P1-P8) — Optional

CriteriaFocusKey Controls
P1NoticePrivacy policy, data collection notice, purpose limitation
P2Choice & ConsentOpt-in/opt-out, consent management, preference tracking
P3CollectionMinimal collection, lawful basis, purpose specification
P4Use, Retention, DisposalPurpose limitation, retention schedules, secure disposal
P5AccessData subject access requests, correction rights
P6Disclosure & NotificationThird-party sharing, breach notification
P7QualityData accuracy verification, correction mechanisms
P8Monitoring & EnforcementPrivacy program monitoring, complaint handling

Select when: You process PII and customers expect privacy assurance (complements GDPR compliance).


Control Matrix Generation

A control matrix maps each TSC criterion to specific controls, owners, evidence, and testing procedures.

Matrix Structure

FieldDescription
Control IDUnique identifier (e.g., SEC-001, AVL-003)
TSC MappingWhich criteria the control addresses (e.g., CC6.1, A1.2)
Control DescriptionWhat the control does
Control TypePreventive, Detective, or Corrective
OwnerResponsible person/team
FrequencyContinuous, Daily, Weekly, Monthly, Quarterly, Annual
Evidence TypeScreenshot, Log, Policy, Config, Ticket
Testing ProcedureHow the auditor verifies the control

Control Naming Convention

{CATEGORY}-{NUMBER}
SEC-001 through SEC-NNN  → Security
AVL-001 through AVL-NNN  → Availability
CON-001 through CON-NNN  → Confidentiality
PRI-001 through PRI-NNN  → Processing Integrity
PRV-001 through PRV-NNN  → Privacy

Workflow

  1. Select applicable TSC categories based on business needs
  2. Run control_matrix_builder.py to generate the baseline matrix
  3. Customize controls to match your actual environment
  4. Assign owners and evidence requirements
  5. Validate coverage — every selected TSC criterion must have at least one control

Gap Analysis Workflow

Phase 1: Current State Assessment

  1. Document existing controls — inventory all security policies, procedures, and technical controls
  2. Map to TSC — align existing controls to Trust Service Criteria
  3. Collect evidence samples — gather proof that controls exist and operate
  4. Interview control owners — verify understanding and execution

Phase 2: Gap Identification

Run gap_analyzer.py against your current controls to identify:

  • Missing controls — TSC criteria with no corresponding control
  • Partially implemented — Control exists but lacks evidence or consistency
  • Design gaps — Control designed but does not adequately address the criteria
  • Operating gaps (Type II only) — Control designed correctly but not operating effectively

Phase 3: Remediation Planning

For each gap, define:

FieldDescription
Gap IDReference identifier
TSC CriteriaAffected criteria
Gap DescriptionWhat is missing or insufficient
Remediation ActionSpecific steps to close the gap
OwnerPerson responsible for remediation
PriorityCritical / High / Medium / Low
Target DateCompletion deadline
DependenciesOther gaps or projects that must complete first

Phase 4: Timeline Planning

PriorityTarget Remediation
Critical2-4 weeks
High4-8 weeks
Medium8-12 weeks
Low12-16 weeks

Evidence Collection

Evidence Types by Control Category

Control AreaPrimary EvidenceSecondary Evidence
Access ManagementUser access reviews, provisioning ticketsRole matrix, access logs
Change ManagementChange tickets, approval recordsDeployment logs, test results
Incident ResponseIncident tickets, postmortemsRunbooks, escalation records
Vulnerability ManagementScan reports, patch recordsRemediation timelines
EncryptionConfiguration screenshots, certificate inventoryKey rotation logs
Backup & RecoveryBackup logs, DR test resultsRecovery time measurements
MonitoringAlert configurations, dashboard screenshotsOn-call schedules, escalation records
Policy ManagementSigned policies, version historyTraining completion records
Vendor ManagementVendor assessments, SOC 2 reportsContract reviews, risk registers

Automation Opportunities

AreaAutomation Approach
Access reviewsIntegrate IAM with ticketing (automatic quarterly review triggers)
Configuration evidenceInfrastructure-as-code snapshots, compliance-as-code tools
Vulnerability scansScheduled scanning with auto-generated reports
Change managementGit-based audit trail (commits, PRs, approvals)
Uptime monitoringAutomated SLA dashboards with historical data
Backup verificationAutomated restore tests with success/failure logging

Continuous Monitoring

Move from point-in-time evidence collection to continuous compliance:

  1. Automated evidence gathering — scripts that pull evidence on schedule
  2. Control dashboards — real-time visibility into control status
  3. Alert-based monitoring — notify when a control drifts out of compliance
  4. Evidence repository — centralized, timestamped evidence storage

Audit Readiness Checklist

Pre-Audit Preparation (4-6 Weeks Before)

  • All controls documented with descriptions, owners, and frequencies
  • Evidence collected for the entire observation period (Type II)
  • Control matrix reviewed and gaps remediated
  • Policies signed and distributed within the last 12 months
  • Access reviews completed within the required frequency
  • Vulnerability scans current (no critical/high unpatched > SLA)
  • Incident response plan tested within the last 12 months
  • Vendor risk assessments current for all subservice organizations
  • DR/BCP tested and documented within the last 12 months
  • Employee security training completed for all staff

Readiness Scoring

ScoreRatingMeaning
90-100%Audit ReadyProceed with confidence
75-89%Minor GapsAddress before scheduling audit
50-74%Significant GapsRemediation required
< 50%Not ReadyMajor program build-out needed

Common Audit Findings

FindingRoot CausePrevention
Incomplete access reviewsManual process, no remindersAutomate quarterly review triggers
Missing change approvalsEmergency changes bypass processDefine emergency change procedure with post-hoc approval
Stale vulnerability scansScanner misconfiguredAutomated weekly scans with alerting
Policy not acknowledgedNo tracking mechanismAnnual e-signature workflow
Missing vendor assessmentsNo vendor inventoryMaintain vendor register with review schedule

Vendor Management

Third-Party Risk Assessment

Every vendor that accesses, stores, or processes customer data must be assessed:

  1. Vendor inventory — maintain a register of all service providers
  2. Risk classification — categorize vendors by data access level
  3. Due diligence — collect SOC 2 reports, security questionnaires, certifications
  4. Contractual protections — ensure DPAs, security requirements, breach notification clauses
  5. Ongoing monitoring — annual reassessment, continuous news monitoring

Vendor Risk Tiers

TierData AccessAssessment FrequencyRequirements
CriticalProcesses/stores customer dataAnnual + continuous monitoringSOC 2 Type II, penetration test, security review
HighAccesses customer environmentAnnualSOC 2 Type II or equivalent, questionnaire
MediumIndirect access, support toolsAnnual questionnaireSecurity certifications, questionnaire
LowNo data accessBiennial questionnaireBasic security questionnaire

Subservice Organizations

When your SOC 2 report relies on controls at a subservice organization (e.g., AWS, GCP, Azure):

  • Inclusive method — your report covers the subservice org's controls (requires their cooperation)
  • Carve-out method — your report excludes their controls but references their SOC 2 report
  • Most companies use carve-out and include complementary user entity controls (CUECs)

Continuous Compliance

From Point-in-Time to Continuous

AspectPoint-in-TimeContinuous
Evidence collectionManual, before auditAutomated, ongoing
Control monitoringPeriodic reviewReal-time dashboards
Drift detectionFound during auditAlert-based, immediate
RemediationReactiveProactive
Audit preparation4-8 week scrambleAlways ready

Implementation Steps

  1. Automate evidence gathering — cron jobs, API integrations, IaC snapshots
  2. Build control dashboards — aggregate control status into a single view
  3. Configure drift alerts — notify when controls fall out of compliance
  4. Establish review cadence — weekly control owner check-ins, monthly steering
  5. Maintain evidence repository — centralized, timestamped, auditor-accessible

Annual Re-Assessment Cycle

QuarterActivities
Q1Annual risk assessment, policy refresh, vendor reassessment launch
Q2Internal control testing, remediation of findings
Q3Pre-audit readiness review, evidence completeness check
Q4External audit, management assertion, report distribution

Anti-Patterns

Anti-PatternWhy It FailsBetter Approach
Point-in-time complianceControls degrade between audits; gaps found during auditImplement continuous monitoring and automated evidence
Manual evidence collectionTime-consuming, inconsistent, error-proneAutomate with scripts, IaC, and compliance platforms
Missing vendor assessmentsAuditors flag incomplete vendor due diligenceMaintain vendor register with risk-tiered assessment schedule
Copy-paste policiesGeneric policies don't match actual operationsTailor policies to your actual environment and technology stack
Security theaterControls exist on paper but aren't followedVerify operating effectiveness; build controls into workflows
Skipping Type IJumping to Type II without foundational readinessStart with Type I to validate control design before observation
Over-scoping TSCIncluding all 5 categories when only Security is neededSelect categories based on actual customer/business requirements
Treating audit as a projectCompliance degrades after the report is issuedBuild compliance into daily operations and engineering culture

Tools

Control Matrix Builder

Generates a SOC 2 control matrix from selected TSC categories.

# Generate full security matrix in markdown
python scripts/control_matrix_builder.py --categories security --format md

# Generate matrix for multiple categories as JSON
python scripts/control_matrix_builder.py --categories security,availability,confidentiality --format json

# All categories, CSV output
python scripts/control_matrix_builder.py --categories security,availability,confidentiality,processing-integrity,privacy --format csv

Evidence Tracker

Tracks evidence collection status per control.

# Check evidence status from a control matrix
python scripts/evidence_tracker.py --matrix controls.json --status

# JSON output for integration
python scripts/evidence_tracker.py --matrix controls.json --status --json

Gap Analyzer

Analyzes current controls against SOC 2 requirements and identifies gaps.

# Type I gap analysis
python scripts/gap_analyzer.py --controls current_controls.json --type type1

# Type II gap analysis (includes operating effectiveness)
python scripts/gap_analyzer.py --controls current_controls.json --type type2 --json

References


Cross-References

  • gdpr-dsgvo-expert — SOC 2 Privacy criteria overlaps significantly with GDPR requirements; use together when processing EU personal data
  • information-security-manager-iso27001 — ISO 27001 Annex A controls map closely to SOC 2 Security criteria; organizations pursuing both can share evidence
  • isms-audit-expert — Audit methodology and finding management patterns transfer directly to SOC 2 audit preparation

┌ stats

installs/wk0
░░░░░░░░░░
github stars7.5K
██████████
first seenMar 28, 2026
└────────────

┌ repo

alirezarezvani/claude-skills
by alirezarezvani
└────────────