SOC 2 Trust Service Criteria expertise and Type I/II assessment support

version
0.1.0
GitHub stars
436

Install

/plugin install soc2@grc-engineering-suite

Run it inside Claude Code after adding the marketplace with /plugin marketplace add GRCEngClub/claude-grc-engineering.

Contents

Discovered from source

Skills 1

SOC 2 Expert

Deep expertise in SOC 2 Trust Service Criteria and audit requirements.

Expertise Areas

Trust Service Categories

  • Security (CC): Common Criteria - always in scope
  • Availability (A): System uptime and recovery
  • Confidentiality (C): Data protection
  • Processing Integrity (PI): Accurate processing
  • Privacy (P): Personal information handling

Audit Types

  • Type I: Design effectiveness at a point in time
  • Type II: Operating effectiveness over a period (typically 6-12 months)

Control Guidance

Common Criteria (CC) Series

  • CC1.1-CC1.5: Control Environment
  • CC2.1-CC2.3: Communication and Information
  • CC3.1-CC3.4: Risk Assessment
  • CC4.1-CC4.2: Monitoring Activities
  • CC5.1-CC5.3: Control Activities
  • CC6.1-CC6.8: Logical and Physical Access
  • CC7.1-CC7.5: System Operations
  • CC8.1: Change Management
  • CC9.1-CC9.2: Risk Mitigation

Capabilities

  • Control mapping and gap analysis
  • Evidence requirements guidance
  • Audit preparation checklists
  • Remediation recommendations
  • Service auditor communication templates

Commands 7

SOC 2 Assessment

Evaluates organizational readiness for SOC 2 Type I or Type II audit.

Arguments

  • $1 - Assessment scope (optional: security, availability, confidentiality, processing-integrity, privacy)
  • $2 - Audit type (optional: type1, type2)

Trust Service Criteria

  • Security (CC) - Common Criteria (always in scope)
  • Availability (A) - System availability commitments
  • Confidentiality (C) - Protection of confidential information
  • Processing Integrity (PI) - Accurate and complete processing
  • Privacy (P) - Personal information handling

Assessment Output

  • Readiness score by Trust Service Category
  • Control gaps identified
  • Evidence requirements
  • Remediation recommendations
  • Timeline to audit readiness

Example

/soc2:assess security type2

SOC 2 Evidence Checklist

Generates detailed evidence collection checklists for SOC 2 Trust Service Criteria with automated and manual collection guidance.

Never commit evidence artifacts to source control. The outputs below include real usernames, credential reports, MFA device states, and privileged-account inventories. .gitignore covers evidence/ by default so git add -A will not sweep it up, but durable storage is your responsibility. Use an encrypted, access-controlled evidence locker (encrypted S3 with least-privilege IAM, a GRC platform, or a shared drive with full-disk encryption and MFA-gated access).

Usage

/soc2:evidence-checklist <control-id> [audit-type]

Arguments

  • $1 - Control ID (e.g., "CC6.1", "CC7.2", "A1.1") or category (e.g., "CC6", "security")
  • $2 - Audit type (optional): "type1" (point-in-time) or "type2" (period) - default: "type2"

Examples

# Single control evidence requirements
/soc2:evidence-checklist CC6.1

# All access control evidence (CC6 family)
/soc2:evidence-checklist CC6

# Type I audit (point-in-time)
/soc2:evidence-checklist CC7.2 type1

# Full security category
/soc2:evidence-checklist security type2

Output Format

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SOC 2 EVIDENCE CHECKLIST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Control: CC6.1 - Logical and Physical Access Controls
Category: Common Criteria - Security
Audit Type: Type II (Period Testing: 6-12 months)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REQUIRED POLICIES & PROCEDURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

□ Access Control Policy
  Status: Required
  Format: PDF, Word
  Requirements:
    - Documented access request/approval process
    - Access review frequency (minimum quarterly)
    - Privileged access management procedures
    - Termination/transfer procedures
  Location: ./policies/access-control-policy.pdf
  Last Updated: Must be within 12 months
  Approval: Requires executive sign-off

□ User Access Provisioning Procedure
  Status: Required
  Format: PDF, Word, Wiki
  Requirements:
    - Step-by-step provisioning workflow
    - Role-based access matrix
    - Approval requirements by access level
    - Documentation requirements
  Location: ./procedures/user-provisioning.md

□ Access Review Procedure
  Status: Required (Type II: 4 instances minimum)
  Format: PDF, Word
  Requirements:
    - Review frequency (quarterly for Type II)
    - Responsible parties
    - Escalation process for violations
    - Documentation requirements

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AUTOMATED EVIDENCE COLLECTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✓ IAM User Inventory
  Command: aws iam list-users > evidence/iam-users-$(date +%Y%m%d).json
  Frequency: Quarterly (4 snapshots for Type II)
  Purpose: Demonstrates unique user IDs
  Collection script: ./scripts/collect-iam-users.sh

✓ IAM Credential Report
  Command: aws iam generate-credential-report && \
           aws iam get-credential-report --output text | base64 -d
  Frequency: Quarterly
  Purpose: Shows last login, password age, MFA status
  Evidence: CSV file with all user credentials

✓ Access Analyzer Findings
  Command: aws accessanalyzer list-findings --analyzer-arn <arn>
  Frequency: Monthly
  Purpose: Unused access detection
  Evidence: JSON report of external/unused access

✓ CloudTrail IAM Events
  Command: aws cloudtrail lookup-events \
           --lookup-attributes AttributeKey=ResourceType,AttributeValue=AWS::IAM::User \
           --start-time <date> --end-time <date>
  Frequency: Full audit period
  Purpose: All account management actions logged
  Evidence: JSON file of IAM events (CreateUser, DeleteUser, etc.)

✓ MFA Status Report
  Command: aws iam get-account-summary
  Frequency: Quarterly
  Purpose: MFA enforcement verification
  Evidence: Account summary showing MFA metrics

Automated Script:
```bash
./scripts/soc2-cc6-1-evidence.sh --period 2024-Q4

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ MANUAL EVIDENCE COLLECTION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

□ Access Request Tickets Status: Required Sample Size: 25 samples (or 100% if <25 total) Evidence: - Jira/ServiceNow tickets showing access requests - Approval from manager - Access granted matches request - Ticket closed after provisioning Sampling Period: Full audit period (6-12 months) Location: Export from ticketing system Format: Screenshots or PDF exports

□ Quarterly Access Reviews Status: Required (Type II: 4 reviews minimum) Evidence: - Access review reports showing all users - Review performed by authorized personnel - Exceptions documented and remediated - Management approval of review results Dates Required (for 2024): Q1 (Mar), Q2 (Jun), Q3 (Sep), Q4 (Dec) Location: ./evidence/access-reviews/2024-Q*-review.pdf

□ Termination Evidence Status: Required Sample Size: All terminations during period Evidence: - HR termination notice/date - IT ticket showing access removal - IAM user deactivation timestamp - Verification that access was removed same-day Purpose: Demonstrates timely access removal Location: ./evidence/terminations/

□ Privileged Access Justifications Status: Required for admin users Sample Size: All privileged users (typically 5-15) Evidence: - Business justification for admin access - Manager approval - Quarterly re-certification - Enhanced monitoring logs Location: ./evidence/privileged-access/

□ Physical Access Logs (if applicable) Status: Required if on-premise infrastructure Evidence: - Badge swipe logs for data center - Visitor logs - Access approval for contractors Period: Full audit period Note: Not required for cloud-only environments

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CONTROL TESTING EVIDENCE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✓ Automated Control Tests Command: /grc-engineer:test-control access_control_account_management Frequency: Daily (automated) Purpose: Continuous validation of control effectiveness Evidence: test-results-*.json files

□ Auditor Testing Workpapers Status: Provided by auditor Evidence: - Sample selection methodology - Test procedures performed - Exceptions noted - Conclusion on control effectiveness Note: Auditor generates this, you provide source data

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SAMPLING REQUIREMENTS (Type II) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Population: All access requests during audit period Sampling Method: Random or systematic Sample Size:

  • If population < 25: 100% testing (all items)
  • If population 25-100: Minimum 25 samples
  • If population > 100: Minimum 25 samples + judgment sampling

Quarterly Coverage: Each quarter must have samples Q1: Minimum 6 samples (25% of year) Q2: Minimum 6 samples Q3: Minimum 6 samples Q4: Minimum 7 samples Total: 25 samples minimum

Example for 200 total requests:

  • 25 random samples (12.5%)
  • Distributed across 12 months
  • Additional 5 judgmental samples (high-risk access)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ADEQUACY CRITERIA ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Policy Requirements: ✓ Policy document exists and is current (<12 months) ✓ Policy approved by executive management ✓ Policy communicated to relevant personnel ✓ Policy addresses all key control points

Process Requirements: ✓ Access provisioning follows documented procedure ✓ Access requires approval before granting ✓ Access reviews performed at stated frequency (quarterly) ✓ Terminations processed same-day or next business day

Technical Requirements: ✓ All users have unique identifiers (no shared accounts) ✓ Privileged access separated from normal access ✓ MFA enabled for remote/privileged access (if in policy) ✓ All access changes logged in CloudTrail/audit log ✓ Audit logs retained for minimum 1 year

Exception Handling: ⚠ Zero unresolved Access Analyzer findings ⚠ All access review exceptions documented and approved ⚠ No unauthorized access detected in testing ⚠ All termination access removed within 24 hours

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ COMMON DEFICIENCIES TO AVOID ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

❌ Access review not performed for all 4 quarters Impact: Control deficiency, qualification in report Fix: Ensure reviews scheduled quarterly, not "as needed"

❌ No approval documentation for access requests Impact: Cannot demonstrate proper authorization Fix: Require tickets for all access (even verbal requests)

❌ Terminations not processed timely (>24 hours) Impact: Security risk, control deficiency Fix: Automated deprovisioning on HR system update

❌ Shared administrator accounts Impact: Cannot attribute actions to individuals Fix: Unique admin accounts per person

❌ Access reviews incomplete (missing users) Impact: Control not operating effectively Fix: Automated user export, checklist validation

❌ Policy not updated annually Impact: Documentation deficiency Fix: Annual review process with calendar reminder

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ TYPE I vs TYPE II DIFFERENCES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Type I (Point-in-Time):

  • Single snapshot on specific date
  • Policy must be in effect on exam date
  • Sample size: 1-5 samples for design effectiveness
  • Access review: Only need current review
  • Duration: Typically 1-2 weeks

Type II (Period Testing):

  • Minimum 6 months, typically 12 months
  • Policy must be in effect entire period
  • Sample size: 25+ samples across entire period
  • Access reviews: 2 minimum (6 months) or 4 (12 months)
  • Duration: Typically 2-4 weeks of audit work

Recommendation: Type II provides more value and market trust

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EVIDENCE PACKAGE STRUCTURE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

evidence/ ├── CC6.1-access-control/ │ ├── policies/ │ │ ├── access-control-policy-v2.1.pdf │ │ └── policy-approval-memo.pdf │ ├── procedures/ │ │ ├── user-provisioning-procedure.pdf │ │ └── access-review-procedure.pdf │ ├── automated/ │ │ ├── 2024-Q1-iam-users.json │ │ ├── 2024-Q2-iam-users.json │ │ ├── 2024-Q3-iam-users.json │ │ ├── 2024-Q4-iam-users.json │ │ ├── credential-reports/ (quarterly) │ │ └── cloudtrail-iam-events-full-period.json │ ├── manual/ │ │ ├── access-requests/ (25 samples) │ │ ├── access-reviews/ (4 quarterly reviews) │ │ ├── terminations/ (all during period) │ │ └── privileged-access/ (justifications) │ └── testing/ │ ├── control-test-results-*.json │ └── evidence-checklist-completed.pdf

Total Evidence Files: ~50-75 files Total Size: ~100-500 MB Ready for Auditor: Yes (organized by control)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ AUTOMATED EVIDENCE COLLECTION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Generate complete evidence package:

/soc2:service-auditor-prep CC6.1 --period 2024 --output ./evidence

This will: ✓ Collect all automated evidence (IAM, CloudTrail, etc.) ✓ Generate evidence checklist with gaps identified ✓ Create folder structure for manual evidence ✓ Produce evidence matrix spreadsheet ✓ Generate draft PBC (Provided By Client) list

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ NEXT STEPS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  1. Review checklist and identify gaps
  2. Collect automated evidence using provided scripts
  3. Gather manual evidence (tickets, reviews, etc.)
  4. Organize evidence in recommended structure
  5. Run /soc2:service-auditor-prep to package for auditor
  6. Review with audit team before providing to auditor

## Related Commands

- `/soc2:assess` - SOC 2 readiness assessment
- `/soc2:type-ii-planner` - Plan Type II period testing
- `/soc2:service-auditor-prep` - Generate auditor-ready package
- `/grc-engineer:test-control` - Automated control testing
- `/grc-engineer:collect-evidence` - General evidence collection

SOC 2 Gap-to-Code Generator

Analyzes SOC 2 gap assessment results and generates production-ready Infrastructure as Code (Terraform, CloudFormation, Kubernetes) to remediate identified gaps automatically.

Usage

/soc2:gap-to-code <gap-file> <cloud-provider> [options]

Arguments

  • $1 - Gap analysis file (JSON output from /soc2:assess)
  • $2 - Cloud provider: "aws", "azure", "gcp", "kubernetes", or "multi-cloud"
  • $3 - Options (optional): --output-dir=path, --format=terraform|cloudformation, --apply

Examples

# Generate Terraform for AWS gaps
/soc2:assess security type2 --output=json > gaps.json
/soc2:gap-to-code gaps.json aws --output-dir=./remediation

# Generate CloudFormation
/soc2:gap-to-code gaps.json aws --format=cloudformation

# Multi-cloud remediation
/soc2:gap-to-code gaps.json multi-cloud --output-dir=./iac

# Dry-run mode (default)
/soc2:gap-to-code gaps.json aws

# Actually apply fixes (DANGEROUS - review first!)
/soc2:gap-to-code gaps.json aws --apply

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SOC 2 GAP-TO-CODE REMEDIATION GENERATOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Input: gaps.json
Cloud Provider: AWS
Output Format: Terraform
Output Directory: ./remediation
Mode: DRY RUN (review before applying)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GAP ANALYSIS SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Total Gaps: 12
  🔴 High Severity: 3 (remediable via IaC)
  🟡 Medium Severity: 5 (remediable via IaC)
  🔵 Low Severity: 2 (remediable via IaC)
  ⚠ Manual: 2 (require policy/process changes)

Automated Remediation: 10/12 gaps (83%)
Estimated Time to Fix: 2.5 hours (manual review + terraform apply)
Estimated Cost Impact: +$45/month (additional AWS resources)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GENERATED INFRASTRUCTURE AS CODE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Files Created:
✓ ./remediation/main.tf (450 lines)
✓ ./remediation/variables.tf (85 lines)
✓ ./remediation/outputs.tf (42 lines)
✓ ./remediation/versions.tf (12 lines)
✓ ./remediation/README.md (comprehensive deployment guide)
✓ ./remediation/test_plan.md (validation steps)

Modules Created:
✓ ./remediation/modules/encryption/
✓ ./remediation/modules/logging/
✓ ./remediation/modules/access_control/
✓ ./remediation/modules/monitoring/

Scripts Created:
✓ ./remediation/scripts/validate_remediation.sh
✓ ./remediation/scripts/collect_evidence.sh
✓ ./remediation/scripts/rollback.sh

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REMEDIATIONS BY CONTROL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[1] CC6.7 - Encryption at Rest (HIGH PRIORITY)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Gap Description:
  3 S3 buckets lack encryption at rest
  Buckets: legacy-backups-2019, temp-storage-dev, logs-archive-old
  Risk: Data exposure if bucket accessed without authorization
  SOC 2 Requirement: CC6.7 (encryption protects data)

Remediation Type: AUTOMATED
Effort: 5 minutes (terraform apply)
Cost Impact: $0/month (S3 encryption is free)

Generated Code: ./remediation/modules/encryption/s3_encryption.tf
```terraform
# Remediation for CC6.7 - S3 Encryption at Rest
# Satisfies: SOC 2 CC6.7, PCI-DSS 3.4, NIST SC-28

resource "aws_s3_bucket_server_side_encryption_configuration" "legacy_backups" {
  bucket = "legacy-backups-2019"

  rule {
    apply_server_side_encryption_by_default {
      sse_algorithm     = "AES256"
      # Alternative: Use KMS for customer-managed keys
      # sse_algorithm     = "aws:kms"
      # kms_master_key_id = aws_kms_key.s3_encryption.arn
    }
    bucket_key_enabled = true  # Reduces KMS costs
  }
}

resource "aws_s3_bucket_server_side_encryption_configuration" "temp_storage" {
  bucket = "temp-storage-dev"

  rule {
    apply_server_side_encryption_by_default {
      sse_algorithm = "AES256"
    }
    bucket_key_enabled = true
  }
}

resource "aws_s3_bucket_server_side_encryption_configuration" "logs_archive" {
  bucket = "logs-archive-old"

  rule {
    apply_server_side_encryption_by_default {
      sse_algorithm = "AES256"
    }
    bucket_key_enabled = true
  }
}

# Optional: Enforce encryption via bucket policy
resource "aws_s3_bucket_policy" "enforce_encryption" {
  for_each = toset([
    "legacy-backups-2019",
    "temp-storage-dev",
    "logs-archive-old"
  ])

  bucket = each.value

  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [
      {
        Sid       = "DenyUnencryptedObjectUploads"
        Effect    = "Deny"
        Principal = "*"
        Action    = "s3:PutObject"
        Resource  = "arn:aws:s3:::${each.value}/*"
        Condition = {
          StringNotEquals = {
            "s3:x-amz-server-side-encryption" = "AES256"
          }
        }
      }
    ]
  })
}

Validation Steps:

# After applying, verify encryption
aws s3api get-bucket-encryption --bucket legacy-backups-2019
aws s3api get-bucket-encryption --bucket temp-storage-dev
aws s3api get-bucket-encryption --bucket logs-archive-old

# Expected output: "AES256" encryption enabled

Evidence Collection:

# Collect evidence for auditor
aws s3api get-bucket-encryption --bucket legacy-backups-2019 > evidence/cc6-7-encryption.json

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [2] CC7.2 - Audit Log Retention (HIGH PRIORITY) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Gap Description: CloudTrail logs retained for 90 days (should be 365 days) Current retention: 90 days Required: 1 year (SOC 2, PCI-DSS) Risk: Cannot investigate incidents >90 days old

Remediation Type: AUTOMATED Effort: 2 minutes (terraform apply) Cost Impact: +$12/month (additional S3 storage + Glacier)

Generated Code: ./remediation/modules/logging/cloudtrail_retention.tf

# Remediation for CC7.2 - Audit Log Retention
# Satisfies: SOC 2 CC7.2/CC7.3, PCI-DSS 10.7, NIST AU-11

# Update CloudWatch Logs retention
resource "aws_cloudwatch_log_group" "cloudtrail" {
  name              = "/aws/cloudtrail/organization-trail"
  retention_in_days = 365  # Changed from 90 to 365 days

  kms_key_id = aws_kms_key.cloudwatch_encryption.arn

  tags = {
    Compliance = "SOC2-CC7.2,PCI-10.7,NIST-AU-11"
    Purpose    = "Audit trail retention"
  }
}

# S3 bucket lifecycle for long-term archival
resource "aws_s3_bucket_lifecycle_configuration" "cloudtrail_archive" {
  bucket = "cloudtrail-logs-production"

  rule {
    id     = "audit_log_retention"
    status = "Enabled"

    # Transition to cheaper storage after 90 days
    transition {
      days          = 90
      storage_class = "STANDARD_IA"  # Infrequent Access
    }

    # Move to Glacier after 180 days (rarely accessed)
    transition {
      days          = 180
      storage_class = "GLACIER"
    }

    # Delete after 2 years (retain 1 year + 1 year buffer)
    expiration {
      days = 730
    }
  }

  rule {
    id     = "incomplete_multipart_upload_cleanup"
    status = "Enabled"

    abort_incomplete_multipart_upload {
      days_after_initiation = 7
    }
  }
}

# Enable S3 Object Lock for compliance (prevents deletion)
resource "aws_s3_bucket_object_lock_configuration" "cloudtrail_lock" {
  bucket = "cloudtrail-logs-production"

  rule {
    default_retention {
      mode = "GOVERNANCE"  # Allows deletion with special permissions
      days = 365
    }
  }
}

Validation Steps:

# Verify CloudWatch retention
aws logs describe-log-groups --log-group-name-prefix "/aws/cloudtrail" \
  --query 'logGroups[*].[logGroupName,retentionInDays]'

# Verify S3 lifecycle policy
aws s3api get-bucket-lifecycle-configuration --bucket cloudtrail-logs-production

# Check Object Lock configuration
aws s3api get-object-lock-configuration --bucket cloudtrail-logs-production

Evidence Collection:

# Collect retention configuration evidence
aws logs describe-log-groups --log-group-name-prefix "/aws/cloudtrail" > evidence/cc7-2-retention.json

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [3] CC6.1 - Automated Access Reviews (MEDIUM PRIORITY) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Gap Description: Access reviews performed manually (should be automated) Current: Manual quarterly reviews via spreadsheet Required: Automated access review workflow Risk: Human error, incomplete reviews

Remediation Type: AUTOMATED Effort: 15 minutes (deploy Lambda + EventBridge) Cost Impact: +$2/month (Lambda executions)

Generated Code: ./remediation/modules/access_control/automated_access_review.tf

# Remediation for CC6.1 - Automated Access Reviews
# Satisfies: SOC 2 CC6.1, PCI-DSS 8.1.4, NIST AC-2

# Lambda function for automated access reviews
resource "aws_lambda_function" "access_review" {
  filename      = "access_review.zip"
  function_name = "soc2-quarterly-access-review"
  role          = aws_iam_role.access_review_lambda.arn
  handler       = "index.handler"
  runtime       = "python3.11"
  timeout       = 300  # 5 minutes

  environment {
    variables = {
      REVIEW_OUTPUT_BUCKET = aws_s3_bucket.compliance_evidence.id
      SLACK_WEBHOOK_URL    = var.slack_webhook_url
      REVIEW_SCHEDULE      = "QUARTERLY"
    }
  }

  tags = {
    Compliance = "SOC2-CC6.1,PCI-8.1.4"
  }
}

# EventBridge rule for quarterly execution
resource "aws_cloudwatch_event_rule" "quarterly_access_review" {
  name                = "soc2-quarterly-access-review"
  description         = "Trigger quarterly access review (SOC 2 CC6.1)"
  schedule_expression = "cron(0 9 1 */3 *)"  # 9 AM on 1st day of Jan, Apr, Jul, Oct

  tags = {
    Compliance = "SOC2-CC6.1"
  }
}

resource "aws_cloudwatch_event_target" "trigger_access_review" {
  rule      = aws_cloudwatch_event_rule.quarterly_access_review.name
  target_id = "AccessReviewLambda"
  arn       = aws_lambda_function.access_review.arn
}

resource "aws_lambda_permission" "allow_eventbridge" {
  statement_id  = "AllowExecutionFromEventBridge"
  action        = "lambda:InvokeFunction"
  function_name = aws_lambda_function.access_review.function_name
  principal     = "events.amazonaws.com"
  source_arn    = aws_cloudwatch_event_rule.quarterly_access_review.arn
}

# IAM role for Lambda
resource "aws_iam_role" "access_review_lambda" {
  name = "soc2-access-review-lambda"

  assume_role_policy = jsonencode({
    Version = "2012-10-17"
    Statement = [
      {
        Action = "sts:AssumeRole"
        Effect = "Allow"
        Principal = {
          Service = "lambda.amazonaws.com"
        }
      }
    ]
  })
}

# IAM policy for access review
resource "aws_iam_role_policy" "access_review_policy" {
  name = "access-review-permissions"
  role = aws_iam_role.access_review_lambda.id

  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [
      {
        Effect = "Allow"
        Action = [
          "iam:ListUsers",
          "iam:ListGroups",
          "iam:ListRoles",
          "iam:GetUser",
          "iam:GetLoginProfile",
          "iam:ListAccessKeys",
          "iam:ListMFADevices",
          "iam:GetCredentialReport",
          "iam:GenerateCredentialReport"
        ]
        Resource = "*"
      },
      {
        Effect = "Allow"
        Action = [
          "s3:PutObject",
          "s3:PutObjectAcl"
        ]
        Resource = "${aws_s3_bucket.compliance_evidence.arn}/access-reviews/*"
      },
      {
        Effect = "Allow"
        Action = [
          "logs:CreateLogGroup",
          "logs:CreateLogStream",
          "logs:PutLogEvents"
        ]
        Resource = "arn:aws:logs:*:*:*"
      }
    ]
  })
}

# S3 bucket for evidence storage
resource "aws_s3_bucket" "compliance_evidence" {
  bucket = "soc2-compliance-evidence-${data.aws_caller_identity.current.account_id}"

  tags = {
    Compliance = "SOC2-Evidence-Storage"
  }
}

resource "aws_s3_bucket_versioning" "evidence_versioning" {
  bucket = aws_s3_bucket.compliance_evidence.id

  versioning_configuration {
    status = "Enabled"
  }
}

Lambda Code: ./remediation/modules/access_control/access_review.py

import boto3
import json
import csv
from datetime import datetime, timedelta
from io import StringIO
import urllib3

def handler(event, context):
    """
    Automated quarterly access review for SOC 2 CC6.1

    Generates:
    - List of all IAM users
    - Last login dates
    - MFA status
    - Inactive users (>90 days)
    - Users with admin privileges
    """
    iam = boto3.client('iam')
    s3 = boto3.client('s3')

    # Generate credential report
    iam.generate_credential_report()

    # Wait for report (usually <10 seconds)
    import time
    time.sleep(10)

    # Get credential report
    response = iam.get_credential_report()
    report_csv = response['Content'].decode('utf-8')

    # Parse CSV
    csv_reader = csv.DictReader(StringIO(report_csv))
    users = list(csv_reader)

    # Analyze users
    inactive_users = []
    no_mfa_users = []
    admin_users = []

    for user in users:
        username = user['user']

        # Check last login
        last_login = user.get('password_last_used', 'N/A')
        if last_login != 'N/A' and last_login != 'no_information':
            last_login_date = datetime.strptime(last_login, '%Y-%m-%dT%H:%M:%S+00:00')
            if datetime.now() - last_login_date > timedelta(days=90):
                inactive_users.append({
                    'username': username,
                    'last_login': last_login,
                    'days_inactive': (datetime.now() - last_login_date).days
                })

        # Check MFA
        if user['mfa_active'] == 'false':
            no_mfa_users.append(username)

    # Generate report
    report = {
        'review_date': datetime.now().isoformat(),
        'quarter': f"{datetime.now().year}-Q{(datetime.now().month-1)//3 + 1}",
        'total_users': len(users),
        'inactive_users': len(inactive_users),
        'no_mfa_users': len(no_mfa_users),
        'compliance_status': 'PASS' if len(inactive_users) == 0 and len(no_mfa_users) == 0 else 'FAIL',
        'details': {
            'inactive_users_list': inactive_users,
            'no_mfa_users_list': no_mfa_users
        }
    }

    # Save to S3
    bucket = os.environ['REVIEW_OUTPUT_BUCKET']
    key = f"access-reviews/{datetime.now().year}/Q{(datetime.now().month-1)//3 + 1}-access-review.json"

    s3.put_object(
        Bucket=bucket,
        Key=key,
        Body=json.dumps(report, indent=2),
        ContentType='application/json'
    )

    # Send Slack notification
    slack_webhook = os.environ.get('SLACK_WEBHOOK_URL')
    if slack_webhook:
        http = urllib3.PoolManager()
        slack_message = {
            'text': f"📋 Quarterly Access Review Complete\\n"
                   f"Total Users: {len(users)}\\n"
                   f"Inactive (>90 days): {len(inactive_users)}\\n"
                   f"Missing MFA: {len(no_mfa_users)}\\n"
                   f"Status: {report['compliance_status']}"
        }
        http.request('POST', slack_webhook,
                    body=json.dumps(slack_message),
                    headers={'Content-Type': 'application/json'})

    return {
        'statusCode': 200,
        'body': json.dumps(report)
    }

Deployment Steps:

# Package Lambda function
cd remediation/modules/access_control
zip access_review.zip access_review.py

# Apply Terraform
terraform init
terraform plan
terraform apply

# Test Lambda manually
aws lambda invoke --function-name soc2-quarterly-access-review response.json
cat response.json

Validation Steps:

# Verify EventBridge rule
aws events describe-rule --name soc2-quarterly-access-review

# Verify Lambda permissions
aws lambda get-policy --function-name soc2-quarterly-access-review

# Check S3 evidence bucket
aws s3 ls s3://soc2-compliance-evidence-*/access-reviews/

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ MANUAL REMEDIATIONS (NOT AUTOMATABLE) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[11] CC1.3 - Dedicated GRC Resource (MANUAL) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Gap: No dedicated GRC/compliance resource Action Required: □ Write job description □ Post job listing □ Interview candidates □ Make offer

Timeline: Q1 2025 Owner: CISO

[12] CC4.2 - Management Review Process (MANUAL) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Gap: Management reviews not documented Action Required: □ Schedule quarterly management review meetings □ Create review agenda template □ Document review process □ Collect meeting minutes as evidence

Timeline: Immediate (before Q1 2025 review) Owner: CISO

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DEPLOYMENT PLAN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Phase 1: High Priority (Deploy This Week) □ CC6.7 - S3 encryption (5 minutes) □ CC7.2 - Audit log retention (2 minutes) □ Test and validate

Phase 2: Medium Priority (Deploy Within 2 Weeks) □ CC6.1 - Automated access reviews (15 minutes) □ CC7.1 - GuardDuty enablement (10 minutes) □ CC7.4 - CloudWatch alarms (20 minutes)

Phase 3: Low Priority (Deploy Within 1 Month) □ CC8.1 - Change management automation □ CC6.6 - Password policy enforcement □ CC9.1 - Vendor risk automation

Phase 4: Validation (After All Deployments) □ Run automated control tests: /grc-engineer:test-control ALL □ Generate new TSC matrix: /soc2:generate-tsc-matrix all □ Verify 100% implementation □ Collect evidence

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ROLLBACK PLAN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

All remediations are implemented via Terraform, making rollback simple:

# View changes before applying
terraform plan

# Apply changes
terraform apply

# If issues occur, rollback
terraform destroy -target=module.encryption
terraform destroy -target=module.logging
terraform destroy -target=module.access_control

# Or rollback entire remediation
cd remediation
terraform destroy

Terraform state is backed up to S3 with versioning enabled.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ COST ESTIMATE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Monthly Recurring Costs: S3 additional storage (log retention): $12/month Lambda executions (access reviews): $2/month CloudWatch Logs retention: $8/month KMS key usage: $1/month GuardDuty (if not enabled): $30/month (varies)

Total Estimated Increase: $45-75/month

One-Time Costs: Engineering time (deployment): 4 hours ($600) Testing and validation: 2 hours ($300)

Total One-Time: $900

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ NEXT STEPS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  1. Review generated Terraform code
  2. Customize variables (bucket names, retention periods, etc.)
  3. Run terraform plan to preview changes
  4. Deploy Phase 1 (high priority) remediations
  5. Validate using /grc-engineer:test-control
  6. Generate updated TSC matrix: /soc2:generate-tsc-matrix
  7. Collect evidence for remediated controls
  8. Continue with Phase 2 and 3 deployments

## Integration Workflow

### Complete Remediation Workflow
```bash
# Step 1: Assess current state
/soc2:assess security type2 --output=json > gaps.json

# Step 2: Generate remediation code
/soc2:gap-to-code gaps.json aws --output-dir=./remediation

# Step 3: Review generated code
cd remediation
cat README.md
terraform plan

# Step 4: Apply fixes
terraform apply

# Step 5: Test controls
/grc-engineer:test-control ALL

# Step 6: Generate updated matrix
/soc2:generate-tsc-matrix security table

# Step 7: Collect evidence
/soc2:evidence-checklist CC6.7
/grc-engineer:collect-evidence CC6.7 ./evidence

Cloud Provider Support

AWS (Primary)

  • Terraform modules for IAM, S3, CloudTrail, CloudWatch, Lambda
  • AWS CLI commands for validation
  • boto3 Python scripts for automation

Azure (Supported)

  • Terraform azurerm provider
  • Azure AD, Key Vault, Monitor, Storage
  • az-cli validation commands

GCP (Supported)

  • Terraform google provider
  • Cloud IAM, Cloud Storage, Cloud Logging
  • gcloud validation commands

Multi-Cloud (Advanced)

  • Generates IaC for all providers simultaneously
  • Cross-cloud control mapping
  • Unified evidence collection

Related Commands

  • /soc2:assess - Identify gaps requiring remediation
  • /soc2:generate-tsc-matrix - See implementation status before/after
  • /soc2:evidence-checklist - Evidence requirements for remediated controls
  • /grc-engineer:test-control - Validate remediation effectiveness
  • /grc-engineer:generate-implementation - More detailed code generation
  • /grc-engineer:scan-iac - Scan for compliance violations

SOC 2 TSC Matrix Generator

Generates a comprehensive implementation matrix showing which Trust Service Criteria (TSC) controls are implemented, partially implemented, or not applicable, with mapping to infrastructure components.

Usage

/soc2:generate-tsc-matrix [criteria] [output-format]

Arguments

  • $1 - Criteria (optional): "security", "availability", "confidentiality", "processing-integrity", "privacy", or "all" (default: "security")
  • $2 - Output format (optional): "table", "json", "csv", "markdown" (default: "table")

Examples

# Generate matrix for Security criteria only
/soc2:generate-tsc-matrix security

# All Trust Service Criteria
/soc2:generate-tsc-matrix all table

# Export as CSV for spreadsheet
/soc2:generate-tsc-matrix all csv > tsc-matrix.csv

# JSON output for automation
/soc2:generate-tsc-matrix security json

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SOC 2 TRUST SERVICE CRITERIA IMPLEMENTATION MATRIX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Organization: [Your Company]
Date: 2025-01-28
Scope: Security (CC1-CC9)
Assessment Type: Type II (12 months)
Period: 2024-01-01 to 2024-12-31

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Total Controls: 92
✓ Implemented: 78 (85%)
⚠ Partially Implemented: 11 (12%)
✗ Not Implemented: 2 (2%)
○ Not Applicable: 1 (1%)

By Category:
  CC1 (Control Environment):        10/11 controls (91%)  ⚠ 1 partial
  CC2 (Communication & Information):  7/8 controls (88%)  ⚠ 1 partial
  CC3 (Risk Assessment):              9/9 controls (100%) ✓ Complete
  CC4 (Monitoring):                   8/9 controls (89%)  ✗ 1 missing
  CC5 (Control Activities):          10/11 controls (91%) ⚠ 1 partial
  CC6 (Logical Access):              12/15 controls (80%) ⚠ 3 partial
  CC7 (System Operations):           13/16 controls (81%) ✗ 1 missing, ⚠ 2 partial
  CC8 (Change Management):            6/8 controls (75%)  ⚠ 2 partial
  CC9 (Risk Mitigation):              3/5 controls (60%)  ⚠ 1 partial, ○ 1 N/A

Readiness for Audit: 85% (Target: 100% before period start)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CC1: CONTROL ENVIRONMENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✓ CC1.1 - Organization structure demonstrates commitment
  Status: IMPLEMENTED
  Implementation: Organizational chart with defined security roles
  Evidence: ./docs/org-chart-2024.pdf
  Infrastructure: N/A (organizational control)
  Last Review: 2024-01-15
  Notes: CISO reports to CEO, quarterly board reporting

✓ CC1.2 - Board of directors oversight
  Status: IMPLEMENTED
  Implementation: Quarterly security briefings to board
  Evidence: ./evidence/board-minutes-2024-Q*.pdf
  Infrastructure: N/A (organizational control)
  Last Review: 2024-12-10
  Notes: Board reviews SOC 2 report, approves budget

⚠ CC1.3 - Management establishes structures, reporting lines
  Status: PARTIAL
  Implementation: Security team defined, but no dedicated GRC role
  Evidence: ./docs/security-team-charter.pdf
  Infrastructure: N/A (organizational control)
  Gap: No dedicated compliance officer (shared with legal)
  Remediation: Hire GRC analyst or assign dedicated compliance lead
  Target Date: Q1 2025

✓ CC1.4 - Commitment to competence
  Status: IMPLEMENTED
  Implementation: Annual security training + role-based training
  Evidence: ./evidence/training/security-awareness-2024.csv
  Infrastructure: LMS (Learning Management System)
  Last Review: 2024-12-01
  Notes: 98% completion rate, includes phishing simulations

✓ CC1.5 - Enforces accountability
  Status: IMPLEMENTED
  Implementation: Code of conduct, performance reviews include security
  Evidence: ./policies/code-of-conduct-v2.1.pdf
  Infrastructure: HRIS (PingHR)
  Last Review: 2024-01-01
  Notes: Annual attestation required

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CC6: LOGICAL AND PHYSICAL ACCESS CONTROLS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✓ CC6.1 - Logical and physical access controls
  Status: IMPLEMENTED
  Implementation: AWS IAM with MFA, quarterly access reviews
  Evidence:
    - ./evidence/iam-users-2024-Q*.json
    - ./evidence/access-reviews/2024-Q*-review.pdf
  Infrastructure:
    - AWS IAM (production account)
    - AWS SSO (workforce identity)
    - Okta (SSO provider)
  Components:
    - IAM users: 47 active
    - IAM roles: 23 (service roles)
    - SSO users: 142 (via Okta federation)
    - MFA enabled: 100%
  Automated Testing: Daily (test-control AC-2)
  Last Review: 2024-12-31
  Notes: Zero shared accounts, automated deprovisioning

✓ CC6.2 - Authorization before access granted
  Status: IMPLEMENTED
  Implementation: Manager approval via Jira Service Desk
  Evidence: ./evidence/access-requests/ (sample 25 tickets)
  Infrastructure:
    - Jira Service Desk (request workflow)
    - AWS IAM (provisioning)
    - Slack (approval notifications)
  Process Flow:
    1. User requests access via Jira
    2. Manager approves (Slack notification)
    3. IT provisions (Terraform apply)
    4. Confirmation sent to user
  Automated Testing: Weekly (test approval workflow)
  Last Review: 2024-12-15
  Notes: Average approval time: 4.2 hours

⚠ CC6.3 - Privileges restricted to authorized users
  Status: PARTIAL
  Implementation: RBAC implemented, but 5 users with overly broad permissions
  Evidence: ./evidence/iam-permissions-audit-2024-12.json
  Infrastructure: AWS IAM
  Gap: 5 users with PowerUserAccess (should use job-specific policies)
  Users Affected:
    - john.doe@company.com (DevOps, needs EC2/RDS only)
    - jane.smith@company.com (Data team, needs S3/Athena only)
    - ... 3 more
  Remediation: Create custom policies, transition users
  Target Date: 2025-02-01
  Risk: Medium (users have more access than needed)

✓ CC6.4 - Removal of access timely
  Status: IMPLEMENTED
  Implementation: Automated deprovisioning within 24 hours
  Evidence: ./evidence/terminations/ (all 12 terminations in 2024)
  Infrastructure:
    - HR system (BambooHR) webhook
    - Lambda function (deprovision-user)
    - SNS notification
  Process:
    1. HR marks employee as terminated
    2. Webhook triggers Lambda
    3. IAM user disabled, MFA devices removed
    4. Access keys deactivated
    5. Notification to IT/Security
  Average Deprovisioning Time: 2.3 hours
  Automated Testing: Monthly (verify terminations)
  Last Review: 2024-12-20
  Notes: 100% compliance (all within 24 hours)

✓ CC6.6 - Authentication credentials protected
  Status: IMPLEMENTED
  Implementation: AWS Secrets Manager + password policy
  Evidence:
    - ./evidence/password-policy.json
    - ./evidence/secrets-manager-audit.json
  Infrastructure:
    - AWS Secrets Manager (app credentials)
    - IAM password policy (complexity requirements)
    - KMS (encryption at rest)
  Password Requirements:
    - Minimum 14 characters
    - Complexity: upper, lower, number, special
    - Password age: 90 days
    - Password history: 24 previous passwords
    - MFA required for all users
  Automated Testing: Daily (check policy compliance)
  Last Review: 2024-11-30
  Notes: Zero credentials in code (CodeGuru checks)

⚠ CC6.7 - Encryption protects data at rest
  Status: PARTIAL
  Implementation: S3/RDS encrypted, but 3 legacy buckets unencrypted
  Evidence: ./evidence/encryption-audit-2024-12.json
  Infrastructure:
    - AWS KMS (customer-managed keys)
    - S3 default encryption
    - RDS encryption at rest
  Encrypted Resources:
    - S3 buckets: 47/50 (94%)
    - RDS instances: 12/12 (100%)
    - EBS volumes: 89/89 (100%)
  Gap: 3 legacy S3 buckets without encryption:
    - legacy-backups-2019 (1.2 TB, low risk data)
    - temp-storage-dev (47 GB, test data)
    - logs-archive-old (890 GB, old logs)
  Remediation: Enable default encryption, migrate data
  Target Date: 2025-01-15
  Risk: Low (no sensitive data, but fails audit requirement)

✓ CC6.8 - Encryption protects data in transit
  Status: IMPLEMENTED
  Implementation: TLS 1.2+ enforced, HSTS enabled
  Evidence:
    - ./evidence/tls-configuration.json
    - ./evidence/alb-listener-config.json
  Infrastructure:
    - ALB (HTTPS listeners only)
    - CloudFront (TLS 1.2 minimum)
    - ACM (certificate management)
  Configuration:
    - TLS versions: 1.2, 1.3 only
    - Cipher suites: Strong ciphers only (AES-GCM)
    - HSTS: max-age=31536000, includeSubDomains
    - Certificate rotation: Automated (ACM)
  Automated Testing: Daily (SSL Labs scan via CI/CD)
  Last Review: 2024-12-10
  Notes: A+ rating on SSL Labs

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CC7: SYSTEM OPERATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✓ CC7.1 - System monitoring detects anomalies
  Status: IMPLEMENTED
  Implementation: CloudWatch + GuardDuty + custom dashboards
  Evidence:
    - ./evidence/cloudwatch-alarms.json
    - ./evidence/guardduty-findings-2024.json
  Infrastructure:
    - CloudWatch (metrics, logs, alarms)
    - GuardDuty (threat detection)
    - SNS (alerting)
    - PagerDuty (on-call escalation)
  Monitored Metrics:
    - CPU utilization (>80% = warning)
    - Error rates (>1% = alert)
    - API latency (>500ms p95 = warning)
    - Failed login attempts (>5 in 5min = alert)
  Automated Testing: Continuous
  Last Review: 2024-12-01
  Notes: 24/7 monitoring, average response time: 8 minutes

✗ CC7.2 - System activities monitored for quality
  Status: NOT IMPLEMENTED
  Implementation: Basic monitoring exists, but no quality metrics
  Evidence: N/A
  Infrastructure: CloudWatch (partial)
  Gap: No SLI/SLO tracking, no quality dashboards
  Remediation:
    1. Define SLIs (availability, latency, error rate)
    2. Set SLOs (99.9% availability, <200ms p50 latency)
    3. Build quality dashboard
    4. Implement error budget tracking
  Target Date: 2025-02-28
  Risk: High (cannot demonstrate quality commitment to customers)

✓ CC7.3 - Evaluates system processing integrity
  Status: IMPLEMENTED
  Implementation: Data validation, reconciliation processes
  Evidence:
    - ./evidence/data-validation-logs-2024.json
    - ./evidence/reconciliation-reports/
  Infrastructure:
    - Lambda (validation functions)
    - Step Functions (reconciliation workflows)
    - S3 (audit trails)
  Validation Checks:
    - Input validation (schema enforcement)
    - Output validation (completeness checks)
    - Daily reconciliation (source vs. processed)
    - Error handling (DLQ for failed messages)
  Automated Testing: Daily (reconciliation checks)
  Last Review: 2024-11-15
  Notes: 99.97% data accuracy (12 errors in 420k records)

⚠ CC7.4 - Availability monitoring
  Status: PARTIAL
  Implementation: Uptime monitoring via CloudWatch, but no external monitoring
  Evidence: ./evidence/uptime-reports-2024.json
  Infrastructure: CloudWatch, Route 53 Health Checks
  Current Monitoring:
    - Internal: CloudWatch synthetic canaries
    - DNS: Route 53 health checks
    - Missing: External third-party monitoring
  Gap: No external validation of availability
  Remediation: Implement Pingdom or UptimeRobot
  Target Date: 2025-01-30
  Risk: Low (internal monitoring sufficient, but external is best practice)

✓ CC7.5 - Recovery and continuity procedures
  Status: IMPLEMENTED
  Implementation: RTO/RPO defined, quarterly DR testing
  Evidence:
    - ./docs/disaster-recovery-plan-v3.2.pdf
    - ./evidence/dr-test-2024-Q*.pdf
  Infrastructure:
    - Multi-AZ RDS (automatic failover)
    - S3 versioning + cross-region replication
    - AMI backups (daily)
    - Terraform state backup
  Recovery Objectives:
    - RTO: 4 hours (measured)
    - RPO: 1 hour (measured)
    - Backup retention: 30 days
    - DR test frequency: Quarterly
  Last DR Test: 2024-12-05 (successful, RTO: 2.1 hours)
  Last Review: 2024-12-05
  Notes: Exceeds RTO/RPO targets

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFRASTRUCTURE COMPONENT MAPPING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

AWS Services (Primary Infrastructure):
┌────────────────────┬──────────────┬────────────────────────────┐
│ Service            │ TSC Controls │ Purpose                    │
├────────────────────┼──────────────┼────────────────────────────┤
│ IAM                │ CC6.1-6.6    │ Access control, AuthN/AuthZ│
│ KMS                │ CC6.7        │ Encryption key management  │
│ CloudTrail         │ CC7.1, CC8.1 │ Audit logging              │
│ GuardDuty          │ CC7.1        │ Threat detection           │
│ Config             │ CC7.1, CC8.1 │ Configuration tracking     │
│ CloudWatch         │ CC7.1-7.4    │ Monitoring, alerting       │
│ Secrets Manager    │ CC6.6        │ Credential management      │
│ ACM                │ CC6.8        │ Certificate management     │
│ S3                 │ CC6.7, CC7.5 │ Data storage, backups      │
│ RDS                │ CC6.7, CC7.5 │ Database (Multi-AZ)        │
│ Lambda             │ CC6.4, CC7.3 │ Automation, validation     │
└────────────────────┴──────────────┴────────────────────────────┘

Third-Party Services:
┌────────────────────┬──────────────┬────────────────────────────┐
│ Service            │ TSC Controls │ Purpose                    │
├────────────────────┼──────────────┼────────────────────────────┤
│ Okta               │ CC6.1, CC6.2 │ SSO, workforce identity    │
│ PagerDuty          │ CC7.1        │ Incident alerting          │
│ Jira               │ CC6.2, CC8.1 │ Access requests, changes   │
│ GitHub             │ CC8.1        │ Source control             │
│ Datadog            │ CC7.1, CC7.4 │ APM, logging               │
│ BambooHR           │ CC6.4        │ HR system (terminations)   │
└────────────────────┴──────────────┴────────────────────────────┘

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GAPS AND REMEDIATION ROADMAP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

HIGH PRIORITY (Complete before audit period):

1. CC7.2 - System quality monitoring (NOT IMPLEMENTED)
   Impact: Cannot demonstrate quality commitment
   Effort: 40 hours
   Tasks:
     □ Define SLIs/SLOs (8 hours)
     □ Build quality dashboard (16 hours)
     □ Implement error budget tracking (12 hours)
     □ Document quality review process (4 hours)
   Owner: Engineering Lead
   Target: 2025-02-28

2. CC6.7 - Encrypt 3 legacy S3 buckets (PARTIAL)
   Impact: Fails encryption at rest requirement
   Effort: 8 hours
   Tasks:
     □ Enable default encryption on buckets (2 hours)
     □ Copy data to new encrypted buckets (4 hours)
     □ Validate data integrity (1 hour)
     □ Delete old buckets (1 hour)
   Owner: DevOps
   Target: 2025-01-15

MEDIUM PRIORITY (Can complete during audit period):

3. CC6.3 - Restrict overly broad permissions (PARTIAL)
   Impact: Least privilege violation
   Effort: 16 hours
   Tasks:
     □ Analyze actual usage (AWS Access Analyzer) (4 hours)
     □ Create custom least-privilege policies (8 hours)
     □ Test policies in staging (2 hours)
     □ Transition users to new policies (2 hours)
   Owner: Security Team
   Target: 2025-02-01

4. CC7.4 - Add external availability monitoring (PARTIAL)
   Impact: Best practice, external validation
   Effort: 4 hours
   Tasks:
     □ Select vendor (Pingdom recommended) (1 hour)
     □ Configure monitoring (2 hours)
     □ Set up alerting (1 hour)
   Owner: SRE
   Target: 2025-01-30

5. CC1.3 - Hire dedicated GRC resource (PARTIAL)
   Impact: Organizational structure improvement
   Effort: Ongoing (recruiting)
   Tasks:
     □ Write job description (done)
     □ Post job listing (in progress)
     □ Interview candidates (ongoing)
     □ Make offer (target: Feb 2025)
   Owner: CISO
   Target: Q1 2025

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EVIDENCE COMPLETENESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

By Control Category:
  CC1: 10/11 controls have complete evidence (91%)
  CC2:  7/8 controls have complete evidence (88%)
  CC3:  9/9 controls have complete evidence (100%)
  CC4:  7/9 controls have complete evidence (78%)
  CC5: 10/11 controls have complete evidence (91%)
  CC6: 12/15 controls have complete evidence (80%)
  CC7: 11/16 controls have complete evidence (69%)
  CC8:  6/8 controls have complete evidence (75%)
  CC9:  3/5 controls have complete evidence (60%)

Overall Evidence Completeness: 82%

Missing Evidence (must collect before audit):
□ CC4.2 - Management review meeting notes (Q4 2024)
□ CC6.3 - Least privilege policy justifications
□ CC7.2 - Quality metrics dashboard (not implemented yet)
□ CC7.4 - External uptime reports (not implemented yet)
□ CC8.1 - Change advisory board minutes (Dec 2024)
□ CC9.1 - Vendor risk assessments (2 vendors pending)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AUTOMATED TESTING STATUS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Controls with Automated Testing: 47/92 (51%)
Test Frequency:
  - Continuous: 12 controls (GuardDuty, Config)
  - Daily: 28 controls (IAM, encryption, network)
  - Weekly: 5 controls (access workflows)
  - Monthly: 2 controls (terminations, reconciliation)

Test Pass Rate (Last 30 Days):
  ✓ Passing: 44/47 controls (94%)
  ⚠ Intermittent: 2/47 controls (4%)
  ✗ Failing: 1/47 control (2%)

Failing Control:
  CC6.7 - Encryption at rest (3 unencrypted buckets)
  → Remediation in progress (target: 2025-01-15)

Intermittent Failures:
  CC6.3 - Least privilege (5 users with broad permissions)
  CC7.4 - Availability (no external monitoring yet)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Before Audit Period Starts:
1. Complete CC7.2 (quality monitoring) - HIGH PRIORITY
2. Encrypt 3 legacy S3 buckets (CC6.7) - HIGH PRIORITY
3. Collect missing evidence (6 items listed above)
4. Achieve 100% implementation (currently 85%)

During Audit Period:
1. Maintain quarterly access reviews (CC6.1)
2. Conduct quarterly management reviews (CC4.2)
3. Continue automated control testing
4. Document any control changes or exceptions

Pre-Audit Preparation:
1. Run final evidence completeness check
2. Organize evidence by TSC control
3. Generate auditor-ready package: /soc2:service-auditor-prep
4. Schedule pre-audit meeting with service auditor

Continuous Improvement:
1. Increase automated testing coverage (target: 75%)
2. Implement CC7.2 quality monitoring
3. Add external availability monitoring (CC7.4)
4. Hire dedicated GRC analyst (CC1.3)

Export Formats

CSV Export

/soc2:generate-tsc-matrix all csv

# Output: Control,Category,Status,Implementation,Evidence,Infrastructure,LastReview
# CC1.1,Control Environment,Implemented,Org chart with security roles,./docs/org-chart-2024.pdf,N/A,2024-01-15
# CC6.1,Logical Access,Implemented,AWS IAM + MFA + quarterly reviews,./evidence/iam-users-*.json,AWS IAM + Okta,2024-12-31
# ...

JSON Export

/soc2:generate-tsc-matrix all json

# Output:
{
  "organization": "Your Company",
  "date": "2025-01-28",
  "scope": "Security (CC1-CC9)",
  "summary": {
    "total_controls": 92,
    "implemented": 78,
    "partial": 11,
    "not_implemented": 2,
    "not_applicable": 1,
    "implementation_percentage": 0.85
  },
  "controls": [
    {
      "id": "CC6.1",
      "category": "Logical and Physical Access",
      "status": "implemented",
      "implementation": "AWS IAM with MFA, quarterly access reviews",
      "evidence": [
        "./evidence/iam-users-2024-Q*.json",
        "./evidence/access-reviews/2024-Q*-review.pdf"
      ],
      "infrastructure": ["AWS IAM", "AWS SSO", "Okta"],
      "automated_testing": "daily",
      "last_review": "2024-12-31"
    }
  ],
  "gaps": [...],
  "recommendations": [...]
}

Integration with Other Commands

1. Gap Analysis → TSC Matrix

# First, run assessment
/soc2:assess security type2

# Then generate matrix to see implementation status
/soc2:generate-tsc-matrix security

2. TSC Matrix → Code Generation

# Generate matrix to identify gaps
/soc2:generate-tsc-matrix all json > gaps.json

# Generate implementation for missing controls
/grc-engineer:generate-implementation CC7.2 aws

3. TSC Matrix → Evidence Collection

# Identify controls missing evidence
/soc2:generate-tsc-matrix security table | grep "Missing evidence"

# Generate evidence checklist for that control
/soc2:evidence-checklist CC6.7

Use Cases

Use Case 1: Readiness Assessment

# 3 months before audit period
/soc2:generate-tsc-matrix all table

# Review summary section
# Identify "NOT IMPLEMENTED" and "PARTIAL" controls
# Prioritize remediation based on risk

Use Case 2: Board Reporting

# Generate executive summary
/soc2:generate-tsc-matrix all csv > soc2-status.csv

# Import to spreadsheet
# Add to board deck showing 85% implementation

Use Case 3: Continuous Monitoring

# Monthly during audit period
/soc2:generate-tsc-matrix security json > tsc-$(date +%Y%m).json

# Track implementation percentage over time
# Detect control degradation

Use Case 4: Auditor Preparation

# 2 weeks before audit
/soc2:generate-tsc-matrix all table > tsc-matrix.txt

# Review evidence completeness
# Ensure all "Implemented" controls have evidence
# Package evidence by control ID

Related Commands

  • /soc2:assess - Gap analysis and readiness assessment
  • /soc2:evidence-checklist - Detailed evidence requirements per control
  • /soc2:type-ii-planner - Plan Type II audit period timeline
  • /soc2:service-auditor-prep - Generate auditor-ready evidence package
  • /grc-engineer:test-control - Automated control testing
  • /grc-engineer:generate-implementation - Generate code for missing controls

Map SOC 2 Controls

Maps existing controls or implementations to SOC 2 Trust Service Criteria.

Arguments

  • $1 - Control document or IaC file (required)
  • $2 - Trust Service Category (optional, defaults to all)

Control Categories

Common Criteria (CC)

  • CC1: Control Environment
  • CC2: Communication and Information
  • CC3: Risk Assessment
  • CC4: Monitoring Activities
  • CC5: Control Activities
  • CC6: Logical and Physical Access
  • CC7: System Operations
  • CC8: Change Management
  • CC9: Risk Mitigation

Output

  • Control-to-criteria mapping matrix
  • Coverage analysis
  • Gap identification
  • Evidence mapping

Example

/soc2:map-controls ./policies/access-control.md CC6

SOC 2 Service Auditor Preparation

Generates a comprehensive, auditor-ready evidence package for SOC 2 Type I or Type II audits, including automated evidence collection, organization by TSC control, PBC (Provided By Client) list generation, and evidence matrix.

Usage

/soc2:service-auditor-prep [period] [options]

Arguments

  • $1 - Audit period (optional): "2024", "2024-Q1-Q4", or "2024-01-01:2024-12-31" (default: current year)
  • $2 - Options (optional): --type=type1|type2, --output-dir=path, --controls=CC6,CC7, --format=zip|tar

Examples

# Generate full year Type II package
/soc2:service-auditor-prep 2024 --type=type2

# Generate specific quarter Type I
/soc2:service-auditor-prep 2024-Q4 --type=type1

# Specific controls only
/soc2:service-auditor-prep 2024 --controls=CC6,CC7,CC8

# Custom output directory
/soc2:service-auditor-prep 2024 --output-dir=/mnt/secure-drive/soc2-audit

# Generate and compress as zip
/soc2:service-auditor-prep 2024 --format=zip

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SOC 2 SERVICE AUDITOR EVIDENCE PACKAGE GENERATOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Organization: Your Company, Inc.
Audit Period: January 1, 2024 - December 31, 2024 (12 months)
Audit Type: Type II (Period Testing)
Trust Service Criteria: Security (CC1-CC9)
Package Date: 2025-01-28
Auditor: Example Audit LLP

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 1: EVIDENCE COLLECTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Collecting automated evidence from AWS...

✓ CC6.1 - Access Control
  ✓ IAM users list (Q1 2024)                      → iam-users-2024-Q1.json
  ✓ IAM users list (Q2 2024)                      → iam-users-2024-Q2.json
  ✓ IAM users list (Q3 2024)                      → iam-users-2024-Q3.json
  ✓ IAM users list (Q4 2024)                      → iam-users-2024-Q4.json
  ✓ IAM credential report (quarterly snapshots)   → credential-report-*.csv
  ✓ Access Analyzer findings (full period)        → access-analyzer-2024.json
  ✓ CloudTrail IAM events (full period)           → cloudtrail-iam-2024.json.gz
  ✓ MFA status report (quarterly)                 → mfa-status-*.json
  Total: 16 files, 124 MB

✓ CC6.7 - Encryption at Rest
  ✓ S3 bucket encryption config (all 50 buckets)  → s3-encryption-config.json
  ✓ RDS encryption config (all 12 instances)      → rds-encryption-config.json
  ✓ EBS encryption config (all 89 volumes)        → ebs-encryption-config.json
  ✓ KMS key usage (customer-managed keys)         → kms-keys-config.json
  Total: 4 files, 2.1 MB

✓ CC6.8 - Encryption in Transit
  ✓ ALB listener configuration (HTTPS only)       → alb-https-config.json
  ✓ CloudFront TLS configuration                  → cloudfront-tls-config.json
  ✓ ACM certificate inventory                     → acm-certificates.json
  ✓ SSL Labs scan results (monthly)               → ssl-labs-*.json
  Total: 16 files, 8.4 MB

✓ CC7.1 - System Monitoring
  ✓ CloudWatch alarms configuration               → cloudwatch-alarms.json
  ✓ GuardDuty findings (full period)              → guardduty-findings-2024.json
  ✓ Security Hub compliance status                → security-hub-2024.json
  ✓ SNS notification logs                         → sns-notifications-2024.json
  Total: 4 files, 45 MB

✓ CC7.2 - Audit Logging
  ✓ CloudTrail configuration                      → cloudtrail-config.json
  ✓ CloudWatch Logs retention policy              → logs-retention-config.json
  ✓ S3 access logs (full period)                  → s3-access-logs-2024.tar.gz
  ✓ VPC Flow Logs (samples from each quarter)     → vpc-flow-logs-*.json
  Total: 8 files, 2.4 GB

✓ CC7.5 - Backup and Recovery
  ✓ RDS backup configuration                      → rds-backups-config.json
  ✓ S3 versioning configuration                   → s3-versioning-config.json
  ✓ AMI backup inventory                          → ami-backups-2024.json
  ✓ DR test results (quarterly)                   → dr-test-*.pdf
  Total: 8 files, 124 MB

✓ CC8.1 - Change Management
  ✓ Terraform state changes (full period)         → terraform-changes-2024.json
  ✓ AWS Config change history                     → config-changes-2024.json
  ✓ GitHub commit history                         → github-commits-2024.json
  ✓ Jira change tickets (all approved changes)    → jira-changes-2024.csv
  Total: 4 files, 89 MB

Automated Evidence Summary:
  Total Files: 64
  Total Size: 2.8 GB
  Collection Time: 14 minutes
  Missing: 0 files (100% complete)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 2: MANUAL EVIDENCE ORGANIZATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Please provide the following manual evidence:

Required Policies (11 documents):
□ Information Security Policy (v2.1 or later, signed)
  → Copy to: ./evidence/policies/information-security-policy.pdf

□ Access Control Policy (v1.8 or later, signed)
  → Copy to: ./evidence/policies/access-control-policy.pdf

□ Change Management Policy (v1.4 or later, signed)
  → Copy to: ./evidence/policies/change-management-policy.pdf

□ Incident Response Policy (v2.0 or later, signed)
  → Copy to: ./evidence/policies/incident-response-policy.pdf

□ Disaster Recovery Plan (v3.2 or later, signed)
  → Copy to: ./evidence/policies/disaster-recovery-plan.pdf

□ Acceptable Use Policy (v1.6 or later, signed)
  → Copy to: ./evidence/policies/acceptable-use-policy.pdf

□ Data Classification Policy (v1.2 or later, signed)
  → Copy to: ./evidence/policies/data-classification-policy.pdf

□ Encryption Policy (v1.5 or later, signed)
  → Copy to: ./evidence/policies/encryption-policy.pdf

□ Vendor Management Policy (v1.3 or later, signed)
  → Copy to: ./evidence/policies/vendor-management-policy.pdf

□ Business Continuity Plan (v2.8 or later, signed)
  → Copy to: ./evidence/policies/business-continuity-plan.pdf

□ Risk Management Policy (v1.9 or later, signed)
  → Copy to: ./evidence/policies/risk-management-policy.pdf

Required Procedures (8 documents):
□ User Provisioning Procedure
  → Copy to: ./evidence/procedures/user-provisioning.pdf

□ User Deprovisioning Procedure
  → Copy to: ./evidence/procedures/user-deprovisioning.pdf

□ Access Review Procedure
  → Copy to: ./evidence/procedures/access-review.pdf

□ Vulnerability Management Procedure
  → Copy to: ./evidence/procedures/vulnerability-management.pdf

□ Patch Management Procedure
  → Copy to: ./evidence/procedures/patch-management.pdf

□ Incident Response Runbook
  → Copy to: ./evidence/procedures/incident-response-runbook.pdf

□ Change Management Procedure
  → Copy to: ./evidence/procedures/change-management.pdf

□ Backup and Restore Procedure
  → Copy to: ./evidence/procedures/backup-restore.pdf

Required Samples (Type II):
□ Access Request Tickets (25 samples across 12 months)
  → Export from Jira to: ./evidence/samples/access-requests/

□ Termination Evidence (all 12 terminations in 2024)
  → Gather documents to: ./evidence/samples/terminations/

□ Change Tickets (25 samples of approved changes)
  → Export from Jira to: ./evidence/samples/changes/

□ Incident Tickets (all 8 incidents in 2024)
  → Export from Jira to: ./evidence/samples/incidents/

Required Reviews (Type II - 4 quarterly):
□ Quarterly Access Review Q1 2024 (March 2024)
  → Copy to: ./evidence/reviews/access/2024-Q1-access-review.pdf

□ Quarterly Access Review Q2 2024 (June 2024)
  → Copy to: ./evidence/reviews/access/2024-Q2-access-review.pdf

□ Quarterly Access Review Q3 2024 (September 2024)
  → Copy to: ./evidence/reviews/access/2024-Q3-access-review.pdf

□ Quarterly Access Review Q4 2024 (December 2024)
  → Copy to: ./evidence/reviews/access/2024-Q4-access-review.pdf

□ Management Review Q1 2024
  → Copy to: ./evidence/reviews/management/2024-Q1-mgmt-review.pdf

□ Management Review Q2 2024
  → Copy to: ./evidence/reviews/management/2024-Q2-mgmt-review.pdf

□ Management Review Q3 2024
  → Copy to: ./evidence/reviews/management/2024-Q3-mgmt-review.pdf

□ Management Review Q4 2024
  → Copy to: ./evidence/reviews/management/2024-Q4-mgmt-review.pdf

Required Testing Evidence:
□ Penetration Test Report (annual, 2024)
  → Copy to: ./evidence/testing/penetration-test-2024.pdf

□ Vulnerability Scan Results (quarterly)
  → Copy to: ./evidence/testing/vulnerability-scans/

□ Disaster Recovery Test Results (quarterly)
  → Already collected in automated phase ✓

□ Business Continuity Test Results (annual)
  → Copy to: ./evidence/testing/bc-test-2024.pdf

Organizational Documents:
□ Organizational Chart (current, with security roles)
  → Copy to: ./evidence/organizational/org-chart-2024.pdf

□ Board Meeting Minutes (security-related discussions)
  → Copy to: ./evidence/organizational/board-minutes-2024-*.pdf

□ Security Team Charter
  → Copy to: ./evidence/organizational/security-charter.pdf

□ Employee Training Records (security awareness)
  → Copy to: ./evidence/organizational/training-records-2024.csv

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 3: EVIDENCE ORGANIZATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Organizing evidence by TSC control...

✓ Created directory structure
✓ Mapped evidence to controls
✓ Generated evidence index

Directory Structure:
evidence/
├── README.md (package overview)
├── EVIDENCE_INDEX.xlsx (master evidence matrix)
├── PBC_LIST.xlsx (Provided By Client list)
├── policies/ (11 policy documents)
├── procedures/ (8 procedure documents)
├── organizational/ (4 org documents)
├── CC1-control-environment/
│   ├── policies/
│   ├── organizational/
│   └── evidence-checklist.pdf
├── CC2-communication/
│   ├── policies/
│   ├── training-records/
│   └── evidence-checklist.pdf
├── CC3-risk-assessment/
│   ├── risk-assessments/
│   ├── threat-models/
│   └── evidence-checklist.pdf
├── CC6-logical-access/
│   ├── policies/
│   ├── procedures/
│   ├── automated/
│   │   ├── iam-users-*.json
│   │   ├── credential-reports-*.csv
│   │   └── cloudtrail-iam-*.json.gz
│   ├── samples/
│   │   ├── access-requests/ (25 tickets)
│   │   └── terminations/ (12 all terminations)
│   ├── reviews/
│   │   └── quarterly-access-reviews/ (Q1-Q4)
│   └── evidence-checklist.pdf
├── CC7-system-operations/
│   ├── policies/
│   ├── procedures/
│   ├── automated/
│   │   ├── cloudwatch-*.json
│   │   ├── guardduty-*.json
│   │   └── cloudtrail-*.json.gz
│   ├── testing/
│   │   ├── dr-tests/ (Q1-Q4)
│   │   └── bc-test/
│   └── evidence-checklist.pdf
├── CC8-change-management/
│   ├── policies/
│   ├── procedures/
│   ├── automated/
│   │   ├── terraform-changes-*.json
│   │   ├── config-changes-*.json
│   │   └── github-commits-*.json
│   ├── samples/
│   │   └── change-tickets/ (25 approved changes)
│   └── evidence-checklist.pdf
└── CC9-risk-mitigation/
    ├── policies/
    ├── vendor-assessments/
    ├── testing/
    │   └── penetration-test-2024.pdf
    └── evidence-checklist.pdf

Total: 147 files across 9 control categories

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 4: PBC LIST GENERATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Generated: ./evidence/PBC_LIST.xlsx

PBC (Provided By Client) List Summary:

┌────────┬───────────────────────────────────┬──────────┬──────────────┐
│ Item # │ Description                       │ Control  │ Status       │
├────────┼───────────────────────────────────┼──────────┼──────────────┤
│ 1      │ Information Security Policy       │ CC1.1    │ ✓ Ready      │
│ 2      │ Organizational Chart              │ CC1.1    │ ✓ Ready      │
│ 3      │ Board Meeting Minutes (2024)      │ CC1.2    │ ✓ Ready      │
│ 4      │ Security Team Charter             │ CC1.3    │ ✓ Ready      │
│ 5      │ Employee Training Records         │ CC1.4    │ ✓ Ready      │
│ 6      │ Code of Conduct                   │ CC1.5    │ ✓ Ready      │
│ ...    │ ...                               │ ...      │ ...          │
│ 47     │ IAM Users List (Q1-Q4)            │ CC6.1    │ ✓ Ready      │
│ 48     │ IAM Credential Reports (Q1-Q4)    │ CC6.1    │ ✓ Ready      │
│ 49     │ Access Request Samples (25)       │ CC6.1    │ ✓ Ready      │
│ 50     │ Quarterly Access Reviews (Q1-Q4)  │ CC6.1    │ ✓ Ready      │
│ 51     │ Termination Evidence (12)         │ CC6.1    │ ✓ Ready      │
│ ...    │ ...                               │ ...      │ ...          │
│ 142    │ Change Tickets (25 samples)       │ CC8.1    │ ✓ Ready      │
│ 143    │ GitHub Commit History             │ CC8.1    │ ✓ Ready      │
│ 144    │ Terraform Change Log              │ CC8.1    │ ✓ Ready      │
│ 145    │ Vendor Risk Assessments           │ CC9.1    │ ⚠ Pending    │
│ 146    │ Penetration Test Report           │ CC9.2    │ ✓ Ready      │
│ 147    │ Incident Response Drill Results   │ CC9.3    │ ✓ Ready      │
└────────┴───────────────────────────────────┴──────────┴──────────────┘

Total Items: 147
Ready: 145 (99%)
Pending: 2 (1%)

Pending Items:
⚠ Item 145: Vendor Risk Assessments (2 vendors missing)
  → Action: Complete assessments for AWS Marketplace vendors
  → Due: Before audit fieldwork

⚠ Item 87: CC4.2 Management Review Q4 Minutes
  → Action: Obtain signed meeting minutes from CISO
  → Due: Immediate

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 5: EVIDENCE MATRIX GENERATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Generated: ./evidence/EVIDENCE_INDEX.xlsx

Evidence Matrix Structure:
  Sheet 1: Summary (compliance overview)
  Sheet 2: Control Mapping (TSC → Evidence)
  Sheet 3: Evidence Inventory (all files)
  Sheet 4: Sampling Details (sample selection methodology)
  Sheet 5: Gaps and Exceptions (2 items)

Sample - Sheet 2 (Control Mapping):
┌──────────┬────────────────────────────┬─────────────────────┬──────────────┐
│ Control  │ Control Description        │ Evidence Files      │ Completeness │
├──────────┼────────────────────────────┼─────────────────────┼──────────────┤
│ CC6.1    │ Logical/Physical Access    │ 18 files            │ 100%         │
│          │                            │ - Access policy     │              │
│          │                            │ - IAM configs (4)   │              │
│          │                            │ - Access reviews(4) │              │
│          │                            │ - Samples (25)      │              │
│          │                            │ - Terminations (12) │              │
├──────────┼────────────────────────────┼─────────────────────┼──────────────┤
│ CC6.7    │ Encryption at Rest         │ 5 files             │ 100%         │
│          │                            │ - Encryption policy │              │
│          │                            │ - S3 config         │              │
│          │                            │ - RDS config        │              │
│          │                            │ - EBS config        │              │
│          │                            │ - KMS config        │              │
├──────────┼────────────────────────────┼─────────────────────┼──────────────┤
│ CC7.2    │ Audit Logging & Retention  │ 8 files             │ 100%         │
│          │                            │ - Logging policy    │              │
│          │                            │ - CloudTrail config │              │
│          │                            │ - CW Logs retention │              │
│          │                            │ - S3 access logs    │              │
│          │                            │ - VPC flow logs     │              │
└──────────┴────────────────────────────┴─────────────────────┴──────────────┘

Overall Evidence Completeness: 99% (145/147 items)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 6: SYSTEM DESCRIPTION GENERATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Generated: ./evidence/SYSTEM_DESCRIPTION.pdf (draft)

System Description includes:
✓ Section 1: Company Overview
  - Business model (SaaS application)
  - Services provided
  - Geographic locations

✓ Section 2: System Components
  - AWS infrastructure diagram
  - Network architecture
  - Data flows
  - Third-party integrations (Okta, GitHub, etc.)

✓ Section 3: Trust Service Criteria
  - CC1-CC9 control descriptions
  - Implementation details
  - Evidence references

✓ Section 4: Boundaries
  - In-scope: AWS production environment
  - Out-of-scope: Marketing website (separate hosting)
  - Carve-outs: Mobile app (separate audit)

✓ Section 5: Changes During Period
  - Migration to AWS Organization (Q2 2024)
  - GuardDuty enablement (Q1 2024)
  - Okta SSO implementation (Q3 2024)

✓ Section 6: Complementary User Entity Controls (CUECs)
  - Customer responsibilities
  - Shared responsibility model

⚠ DRAFT - Requires management review and approval

Action Required:
1. Review system description for accuracy
2. Update infrastructure diagrams if needed
3. Obtain executive sign-off
4. Provide final version to auditor

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE 7: PACKAGE FINALIZATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Creating auditor-ready package...

✓ Evidence organized by control
✓ PBC list generated (147 items)
✓ Evidence matrix created
✓ System description drafted
✓ Evidence checklists per control
✓ Sampling methodology documented
✓ README with navigation guide
✓ Gaps and exceptions documented

Package Statistics:
  Total Files: 147
  Total Size: 3.2 GB (compressed: 890 MB)
  Completeness: 99%
  Organization: By TSC control

Package Location: ./evidence/
Compressed: ./soc2-audit-evidence-2024.zip

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FINAL CHECKLIST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Before providing package to auditor:

✓ Automated evidence collected (64 files)
⚠ Manual evidence provided (83/85 files - 2 pending)
✓ Evidence organized by control
✓ PBC list generated and reviewed
✓ Evidence matrix created
⚠ System description drafted (needs approval)
✓ Sampling methodology documented
✓ Gaps documented (2 items)

Outstanding Items (Complete Before Audit):
□ Vendor risk assessments (2 vendors)
□ Q4 management review minutes
□ System description approval

Estimated Time to Complete: 4 hours

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Before Audit Kickoff:
1. Complete 2 pending evidence items (vendor assessments, Q4 minutes)
2. Get system description approved by executive team
3. Review evidence package with internal team
4. Prepare for auditor questions (create FAQ)
5. Designate evidence point-of-contact for auditor requests

During Audit:
1. Provide evidence package via secure file share
2. Grant auditor read-only AWS access (if requested)
3. Schedule control walkthroughs
4. Be available for follow-up questions
5. Respond to additional evidence requests within 24 hours

Post-Audit:
1. Address any identified deficiencies
2. Collect evidence of remediation
3. Update controls for next audit period
4. Schedule post-audit debrief with auditor

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PACKAGE ACCESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Evidence Package: ./evidence/
Compressed Archive: ./soc2-audit-evidence-2024.zip (890 MB)
PBC List: ./evidence/PBC_LIST.xlsx
Evidence Matrix: ./evidence/EVIDENCE_INDEX.xlsx
System Description: ./evidence/SYSTEM_DESCRIPTION.pdf

To provide to auditor:
1. Upload to secure file share (ShareFile, Dropbox Business, etc.)
2. Grant auditor access
3. Provide PBC list first (allows auditor to plan)
4. Evidence package second (organized for easy navigation)

Security Note:
  Evidence contains sensitive information (IAM configs, logs, etc.)
  Use encrypted file transfer only
  Do not email evidence package
  Revoke auditor access after audit completion

Package Contents

Generated Files

  1. README.md - Package overview and navigation guide
  2. PBC_LIST.xlsx - Provided By Client list (147 items)
  3. EVIDENCE_INDEX.xlsx - Master evidence matrix with control mapping
  4. SYSTEM_DESCRIPTION.pdf - Draft system description (needs approval)
  5. GAPS_AND_EXCEPTIONS.pdf - Documented gaps and mitigation plans

Evidence Directories

evidence/
├── README.md
├── PBC_LIST.xlsx
├── EVIDENCE_INDEX.xlsx
├── SYSTEM_DESCRIPTION.pdf
├── GAPS_AND_EXCEPTIONS.pdf
│
├── policies/
│   ├── information-security-policy.pdf
│   ├── access-control-policy.pdf
│   ├── change-management-policy.pdf
│   └── ... (11 total)
│
├── procedures/
│   ├── user-provisioning.pdf
│   ├── access-review.pdf
│   └── ... (8 total)
│
├── organizational/
│   ├── org-chart-2024.pdf
│   ├── board-minutes-2024-*.pdf
│   └── security-charter.pdf
│
├── CC1-control-environment/ (11 files)
├── CC2-communication/ (8 files)
├── CC3-risk-assessment/ (9 files)
├── CC4-monitoring/ (7 files)
├── CC5-control-activities/ (10 files)
├── CC6-logical-access/ (18 files)
├── CC7-system-operations/ (32 files)
├── CC8-change-management/ (14 files)
└── CC9-risk-mitigation/ (12 files)

Automation Details

Automated Evidence Collection

The tool automatically collects:

AWS IAM (CC6.1-CC6.6):

# Quarterly snapshots
aws iam list-users > iam-users-2024-Q*.json
aws iam generate-credential-report && aws iam get-credential-report
aws accessanalyzer list-findings
aws iam get-account-summary  # MFA status

AWS Encryption (CC6.7-CC6.8):

# S3 encryption config
aws s3api list-buckets --query 'Buckets[*].Name' | xargs -I {} \
  aws s3api get-bucket-encryption --bucket {}

# RDS encryption
aws rds describe-db-instances --query 'DBInstances[*].[DBInstanceIdentifier,StorageEncrypted]'

# ALB HTTPS config
aws elbv2 describe-load-balancers
aws elbv2 describe-listeners

AWS Logging (CC7.2-CC7.3):

# CloudTrail configuration
aws cloudtrail describe-trails
aws cloudtrail get-trail-status

# CloudWatch Logs retention
aws logs describe-log-groups --query 'logGroups[*].[logGroupName,retentionInDays]'

# VPC Flow Logs
aws ec2 describe-flow-logs

AWS Monitoring (CC7.1):

# CloudWatch alarms
aws cloudwatch describe-alarms

# GuardDuty findings
aws guardduty list-detectors
aws guardduty list-findings --detector-id <id>

# Security Hub
aws securityhub get-findings

AWS Change Management (CC8.1):

# AWS Config changes
aws configservice describe-configuration-recorders
aws configservice get-compliance-details-by-config-rule

# CloudFormation/Terraform state
terraform state pull > terraform-state-2024.json

Manual Evidence Guidance

For each manual evidence item, the tool provides:

  • Specific file location to copy to
  • Required format (PDF, CSV, etc.)
  • Minimum requirements (e.g., "signed by executive")
  • Sample size (e.g., "25 samples across 12 months")
  • Evidence adequacy criteria

Integration with Other Commands

Complete Audit Preparation Workflow

# Step 1: Assess readiness
/soc2:assess security type2 --output=json > gaps.json

# Step 2: Generate TSC matrix to verify 100% implementation
/soc2:generate-tsc-matrix security table

# Step 3: Fix any gaps
/soc2:gap-to-code gaps.json aws --output-dir=./remediation
cd remediation && terraform apply

# Step 4: Test all controls
/grc-engineer:test-control ALL

# Step 5: Generate timeline
/soc2:type-ii-planner 2024-01-01 2024-12-31

# Step 6: Review evidence requirements
/soc2:evidence-checklist CC6.1
/soc2:evidence-checklist CC7.2
# ... for each control

# Step 7: Generate auditor package
/soc2:service-auditor-prep 2024 --type=type2 --output-dir=/secure-drive/audit

# Step 8: Verify completeness
cat /secure-drive/audit/evidence/EVIDENCE_INDEX.xlsx
cat /secure-drive/audit/evidence/PBC_LIST.xlsx

Advanced Options

Filtering by Control

# Only CC6 (access control) evidence
/soc2:service-auditor-prep 2024 --controls=CC6

# Multiple control families
/soc2:service-auditor-prep 2024 --controls=CC6,CC7,CC8

Custom Output Formats

# Generate as TAR archive
/soc2:service-auditor-prep 2024 --format=tar

# Uncompressed directory
/soc2:service-auditor-prep 2024 --format=directory

# Encrypted ZIP (password-protected)
/soc2:service-auditor-prep 2024 --format=encrypted-zip --password=SecurePass123

Partial Period

# Q4 only (Type I audit)
/soc2:service-auditor-prep 2024-Q4 --type=type1

# 6-month period (minimum for Type II)
/soc2:service-auditor-prep 2024-07-01:2024-12-31 --type=type2

Validation and Quality Checks

The tool performs automatic validation:

✓ Completeness Checks:

  • All required policies present
  • All quarterly reviews present (Type II)
  • Sample sizes meet minimum requirements
  • Evidence files are readable (not corrupted)

✓ Date Validation:

  • Policies dated before audit period start
  • Evidence spans entire audit period
  • Quarterly reviews evenly distributed
  • No gaps in continuous evidence (CloudTrail)

✓ Format Validation:

  • PDFs are valid and not password-protected
  • JSON files are well-formed
  • CSVs have correct headers
  • File sizes are reasonable (not empty)

✓ Control Mapping:

  • All TSC controls have evidence
  • No orphaned evidence (unmapped files)
  • Evidence adequacy per AICPA standards
  • Sampling methodology documented

Related Commands

  • /soc2:assess - Gap analysis to identify missing evidence
  • /soc2:generate-tsc-matrix - Implementation status matrix
  • /soc2:evidence-checklist - Detailed requirements per control
  • /soc2:type-ii-planner - Audit period timeline planning
  • /soc2:gap-to-code - Generate IaC to fix control gaps
  • /grc-engineer:collect-evidence - General evidence collection
  • /grc-engineer:test-control - Validate control effectiveness

SOC 2 Type II Planner

Generates a detailed timeline and checklist for SOC 2 Type II audit period testing, including evidence collection schedules, review milestones, and readiness gates.

Usage

/soc2:type-ii-planner <period-start> <period-end> [options]

Arguments

  • $1 - Period start date (format: YYYY-MM-DD)
  • $2 - Period end date (format: YYYY-MM-DD)
  • $3 - Options: --audit-firm=name, --output=format (timeline, checklist, gantt)

Examples

# Standard 12-month period
/soc2:type-ii-planner 2024-01-01 2024-12-31

# 6-month period (minimum)
/soc2:type-ii-planner 2024-07-01 2024-12-31

# With audit firm and Gantt output
/soc2:type-ii-planner 2024-01-01 2024-12-31 --audit-firm="Example Audit LLP" --output=gantt

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SOC 2 TYPE II AUDIT TIMELINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Audit Period: January 1, 2024 - December 31, 2024 (12 months)
Audit Firm: [To be selected]
Estimated Audit Start: January 2025
Report Date: March 2025 (target)

Period Requirements:
✓ Minimum duration: 6 months (AICPA requirement)
✓ Selected duration: 12 months (standard for first-time)
✓ Controls must be operating for entire period
✓ Evidence required from all months

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
READINESS TIMELINE (Pre-Period)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

3 Months Before Period Start (Oct 2023):
□ Complete SOC 2 readiness assessment
  Command: /soc2:assess security type2
  Output: Identifies gaps in controls/processes

□ Select Trust Service Criteria
  Required: Security (CC1-CC9)
  Optional: Availability, Confidentiality, Processing Integrity, Privacy
  Decision: Document scope in System Description

□ Implement missing controls
  Priority: All Type A (design) deficiencies
  Timeline: Must be operational by period start

□ Document policies and procedures
  Required: All control policies
  Approval: Executive management sign-off
  Version: Must be dated before period start

□ Set up evidence collection automation
  Command: /grc-engineer:monitor-continuous SOC2 daily
  Purpose: Continuous evidence collection

2 Months Before (Nov 2023):
□ Select and engage audit firm
  RFP Process: Get quotes from 3+ firms
  Budget: $15k-$50k depending on complexity
  Deliverables: Type II report, management letter

□ Conduct readiness audit (optional but recommended)
  Purpose: Identify issues before official audit
  Scope: Design testing only (point-in-time)
  Cost: ~30% of full audit cost

□ Train staff on control procedures
  Audience: All personnel involved in controls
  Topics: Evidence collection, quarterly reviews, incident response

1 Month Before (Dec 2023):
□ Perform dry-run of quarterly reviews
  Purpose: Validate process before period start
  Evidence: Practice access reviews, change management reviews

□ Verify automated evidence collection
  Test: Ensure logs, reports generating correctly
  Retention: Configure 1+ year retention

□ Finalize System Description
  Content: Infrastructure, processes, controls
  Review: Internal legal, IT, security review
  Approval: Management sign-off

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AUDIT PERIOD (Jan 1 - Dec 31, 2024)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Month 1 - January 2024:
✓ Period Start - Day 1 (Jan 1)
  - All controls must be operating
  - Policies/procedures in effect
  - Evidence collection begins

□ Q1 Activities:
  - Quarterly access review (due: Jan 31)
  - Vulnerability scans (weekly)
  - Change management board meetings (weekly)
  - Security awareness training (monthly)
  - Incident response testing (quarterly)

□ Evidence Collection:
  - Save all access request tickets
  - Document all changes (CAB minutes)
  - Collect vulnerability scan results
  - Maintain security training records

Month 2 - February 2024:
□ Monthly checkpoint
  - Review evidence collection completeness
  - Verify no control gaps/outages
  - Document any incidents/exceptions

Month 3 - March 2024:
□ End of Q1 - Major Milestone
  ✓ First quarter complete
  ✓ Quarterly access review completed
  ✓ Quarterly management review completed
  ✓ All Q1 evidence collected and organized

Month 4-6 (Apr-Jun 2024) - Q2:
□ Q2 Activities (same as Q1)
□ Mid-period review (internal)
  - Verify controls still operating
  - Check evidence completeness
  - Identify any gaps early

□ End of Q2 (June 30):
  ✓ Halfway through period
  ✓ Second quarterly reviews complete
  ✓ 6-month minimum achieved (early exit possible if needed)

Month 7-9 (Jul-Sep 2024) - Q3:
□ Q3 Activities (same as Q1/Q2)
□ Pre-audit preparation begins
  - Contact audit firm for scheduling
  - Begin organizing evidence
  - Identify PBC (Provided By Client) list

□ End of Q3 (Sept 30):
  ✓ Third quarterly reviews complete
  ✓ Prepare for final quarter

Month 10-12 (Oct-Dec 2024) - Q4:
□ Q4 Activities (same as Q1/Q2/Q3)
□ Final month activities:
  - Complete all quarterly reviews
  - Collect final month evidence
  - Prepare comprehensive evidence package

✓ Period End - Day 365 (Dec 31)
  - All controls must operate through final day
  - Final evidence collection
  - Period complete

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
POST-PERIOD (Jan-Mar 2025)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Week 1-2 (Early Jan 2025):
□ Evidence Package Preparation
  Command: /soc2:service-auditor-prep --period 2024
  Output: Complete evidence package

□ Organize evidence by control
  Structure: ./evidence/[control-id]/
  Contents: Policies, automated evidence, manual samples

□ Finalize System Description
  Update: Any changes during period
  Approval: Final management sign-off

Week 3-4 (Mid-Late Jan 2025):
□ Audit Kickoff Meeting
  Attendees: Audit firm, IT, Security, Management
  Agenda: Scope, timeline, evidence location, key contacts

□ Provide PBC (Provided By Client) List
  Contents: ~100-200 evidence items
  Format: Organized by TSC control
  Access: Secure file share or audit platform

Week 5-8 (Feb 2025):
□ Fieldwork Period
  - Auditors test control design
  - Auditors test operating effectiveness (samples)
  - Management provides additional evidence as requested
  - Weekly status calls with audit team

□ Testing Activities:
  - Design testing: Interview, policy review
  - Operating effectiveness: Sample testing (25+ per control)
  - Inquiry: Staff interviews
  - Observation: Watch processes in action
  - Inspection: Review documentation
  - Re-performance: Auditor performs control themselves

Week 9-10 (Early Mar 2025):
□ Draft Report Review
  - Audit firm provides draft report
  - Management reviews for factual accuracy
  - Discuss any findings/exceptions
  - Negotiate management response (if needed)

Week 11-12 (Mid-Late Mar 2025):
□ Final Report Issuance
  - Auditor issues final SOC 2 Type II report
  - Management Letter (recommendations)
  - Report distributed to customers/prospects

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
QUARTERLY MILESTONES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Q1 2024 (Jan-Mar):
✓ Period begins
✓ Controls operating
✓ Evidence collection starts
⚠ First quarterly reviews complete
📊 Checkpoint: 25% complete

Q2 2024 (Apr-Jun):
✓ Continued operation
✓ Second quarterly reviews
📊 Checkpoint: 50% complete (minimum period achieved)

Q3 2024 (Jul-Sep):
✓ Third quarterly reviews
✓ Begin audit preparation
📊 Checkpoint: 75% complete

Q4 2024 (Oct-Dec):
✓ Fourth quarterly reviews
✓ Final evidence collection
✓ Period ends
📊 Checkpoint: 100% complete

Post-Period (Jan-Mar 2025):
✓ Evidence organization
✓ Audit execution
✓ Report issuance

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EVIDENCE COLLECTION SCHEDULE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Daily (Automated):
✓ CloudTrail logs
✓ VPC Flow Logs
✓ Application logs
✓ Security event logs
✓ Monitoring data

Weekly:
□ Vulnerability scans
□ Change management board minutes
□ Backup verification logs

Monthly:
□ Security awareness training records
□ Incident response drill documentation
□ Risk assessment updates

Quarterly:
□ Access reviews (all users)
□ Management reviews
□ Business continuity testing
□ Vendor risk assessments

Annually:
□ Penetration testing
□ Disaster recovery testing
□ Policy reviews/updates
□ Risk assessment comprehensive review

Ad-Hoc (As Needed):
□ Incident response documentation
□ Change tickets
□ Access request tickets
□ Termination documentation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CRITICAL SUCCESS FACTORS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✓ Controls operate for ENTIRE period (no gaps)
  - If control fails for >24 hours, may be deficiency
  - Document and remediate any outages immediately

✓ Evidence collected from EVERY quarter
  - Quarterly reviews must occur in all 4 quarters
  - Samples must span entire period

✓ Policies in effect BEFORE period start
  - Policy dates must precede period start
  - Any changes require version control

✓ No shared accounts
  - All actions attributable to individuals
  - Service accounts documented/approved

✓ Timely terminations
  - Access removed within 24 hours of termination
  - All terminations must have documentation

✓ Complete evidence package
  - Nothing missing from PBC list
  - Well-organized, easy for auditor to navigate

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COMMON PITFALLS TO AVOID
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

❌ Skipping a quarterly review
   Impact: Gap in testing, potential deficiency
   Prevention: Calendar reminders, automated triggers

❌ Policy dated after period start
   Impact: Control not in effect, design deficiency
   Prevention: Finalize all policies 1+ months before

❌ Missing evidence from early months
   Impact: Cannot prove control operated entire period
   Prevention: Start collecting evidence from Day 1

❌ Control automation fails mid-period
   Impact: Gap in control operation
   Prevention: Monitoring alerts, daily checks

❌ Insufficient samples
   Impact: Auditor cannot conclude on effectiveness
   Prevention: Maintain ticketing system, save all

❌ Undocumented changes
   Impact: Cannot demonstrate change control
   Prevention: Require tickets for all changes

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COST ESTIMATES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Internal Effort (Staff Time):
- Readiness preparation: 160-240 hours
- Evidence collection (ongoing): 10-20 hours/month
- Audit support: 80-120 hours
- Total: 400-600 hours (~$40k-$90k at $150/hour)

External Costs:
- Type II audit (Security only): $15k-$35k
- Additional TSCs: +$5k-$10k each
- Readiness audit (optional): $10k-$15k
- Gap remediation: Variable ($0-$50k+)

Total Estimated Cost: $55k-$180k
Timeline: 15-18 months (prep + period + audit)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED ACTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Immediate (This Week):
1. Run readiness assessment: /soc2:assess security type2
2. Identify period start date (3-6 months from now)
3. Assign SOC 2 program owner
4. Budget for audit costs

This Month:
1. Document all current policies/procedures
2. Start RFP process for audit firm
3. Implement missing controls
4. Set up automated evidence collection

Next 3 Months:
1. Complete gap remediation
2. Finalize audit firm selection
3. Train staff on procedures
4. Perform readiness dry-run
5. Begin period when ready

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TIMELINE EXPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Generate project plan:
```bash
/soc2:type-ii-planner 2024-01-01 2024-12-31 --output=gantt > soc2-timeline.md

Import to project management tools:

  • Jira: Export as CSV, import as Epic with subtasks
  • Asana: Copy milestones, create project
  • Microsoft Project: Export as XML

## Related Commands

- `/soc2:assess` - Readiness assessment
- `/soc2:evidence-checklist` - Evidence requirements per control
- `/soc2:service-auditor-prep` - Generate evidence package
- `/grc-engineer:monitor-continuous` - Continuous evidence collection

Sponsors

Details

Marketplace
GRCEngClub/claude-grc-engineering
Source
plugins/frameworks/soc2
Category
Community

More from GRCEngClub/claude-grc-engineering

All 70