SOC 2 Evidence Collection
Overview
This skill implements automated and semi-automated evidence collection for SOC 2 Type I/II examinations. Evidence must be complete, dated, tamper-evident, and mapped to TSC control IDs. The agent uses MCP tools where available:
- Playwright MCP: screenshots, DOM/state captures for web admin consoles
- Postgres MCP: query exports for access lists, change tickets, control status
- Slack MCP: export approval messages (redacted) for change management evidence
- Shell/API exports: IAM policies, Terraform state metadata, cloud config snapshots
Every artifact receives a SHA-256 hash and entry in an evidence manifest suitable for auditor import.
When to Use
Use this skill when:
- Building an audit evidence binder for SOC 2 Type I or Type II
- Responding to auditor evidence requests (ERDs, sample periods)
- Populating GRC platform evidence slots (Vanta, Drata, Secureframe alternatives)
- Packaging quarterly control testing results
- Collecting point-in-time and period-of-time samples (Type II requires continuous samples)
- Documenting agent/MCP compliance after running other skills (PCI, HIPAA)
Do not use this skill when:
- Defining which TSC controls apply (use
soc2-trust-services-criteria)
- Real-time drift detection (use
soc2-ccm-continuous-monitoring)
- Replacing auditor judgment on sample adequacy
Core Process
Execute steps in order.
Step 1: Evidence request intake
- Obtain auditor evidence request list or map from TSC control matrix.
- For each request, record:
- Control ID (e.g., CC6.1, CC7.2)
- Evidence type (screenshot, config export, log sample, policy PDF)
- Sample period (for Type II: e.g., Q1–Q4 2025)
- Population and sample size (auditor may specify)
- Artifact:
evidence-request-register-{id}.csv.
Step 2: Collection plan and tool mapping
| Evidence type |
Primary collection method |
MCP/tool |
| IAM user list + MFA status |
Cloud API or IdP export |
Shell, Postgres |
| Admin console screenshot |
Authenticated browser capture |
Playwright MCP |
| Firewall/security group rules |
Cloud API JSON export |
Shell |
| Change tickets |
ITSM export |
Postgres, API |
| Log sample (auth failures) |
SIEM query export |
Postgres, API |
| Policy documents |
Document store hash |
File read |
| Agent skill validation |
Git commit + CI run |
Shell |
| MCP access logs |
Log aggregator export |
Postgres |
Identify blocking gaps (missing MCP credentials, read-only access)—document before collection.
Step 3: Automated collection execution
For each evidence item:
- Collect using prescribed tool—do not manually recreate data that can be exported programmatically.
- Redact ePHI/PII/secrets from evidence unless auditor specifically requires raw sample under NDA.
- Timestamp collection in UTC; record collector identity (human or agent run ID).
- Hash raw artifact:
sha256sum equivalent; store in manifest.
- Name files predictably:
{control-id}_{evidence-type}_{date}.{ext}.
Playwright MCP screenshot protocol
- Authenticate to target console via approved test account (not production admin unless authorized).
- Navigate to exact page showing control (e.g., MFA enforcement policy).
- Capture full-page screenshot including URL bar and timestamp overlay if available.
- Save as PNG with manifest entry.
Postgres MCP export protocol
- Run read-only queries against compliance/evidence schema only.
- Export CSV/JSON; limit rows to sample size.
- Verify query logged in audit trail.
Step 4: Period-of-time sampling (Type II)
- For each recurring control (access reviews, vulnerability scans, backup tests):
- Collect one sample per required interval in examination period (e.g., quarterly access review × 4).
- Verify samples are evenly distributed—not all collected last week before audit.
- Flag missing intervals as FAIL with remediation note.
Step 5: Integrity and chain of custody
- Generate
evidence-manifest-{id}.json:{
"artifact_id": "EV-2025-001",
"control_id": "CC6.1",
"filename": "CC6.1_mfa-enforcement_2025-06-13.png",
"sha256": "...",
"collected_at_utc": "...",
"collector": "...",
"source_system": "playwright-mcp"
}
- Sign manifest or store in append-only evidence bucket (WORM, S3 Object Lock).
- Package as
evidence-bundle-{id}.tar.gz with manifest at root.
Step 6: Control cross-reference validation
- Map every manifest entry to TSC control ID—no orphan artifacts.
- Map every auditor request to ≥1 artifact—or document exception with compensating evidence.
- Cross-check dates fall within sample period.
Step 7: Auditor delivery package
- Produce:
- Evidence bundle (encrypted at rest for transit)
- Index spreadsheet: Control ID → filename → hash → description
- Collection methodology note (tools, redaction approach, limitations)
- Obtain internal reviewer sign-off before external delivery.
Common Rationalizations
| Excuse the agent might generate |
Required rebuttal |
| "A verbal confirmation is enough for CC8 change approval." |
SOC 2 requires verifiable evidence—ticket export or signed approval message with timestamp. |
| "One screenshot at audit time covers the whole Type II period." |
Type II requires period-of-time samples across the examination window—not point-in-time only. |
| "We can recreate logs from memory for the sample." |
Recreated logs are not auditable—export from authoritative SIEM/system. |
| "Hashes are overkill for screenshots." |
Integrity hashes prove evidence unchanged since collection—auditors expect them. |
| "Redaction removes too much; send raw PHI to auditor email." |
Use secure auditor portal with minimum necessary redaction—never unencrypted email. |
| "Missing Q2 access review—we'll note it later." |
Missing intervals are findings—document now with remediation plan. |
Red Flags
- Evidence collected entirely in final audit week for 12-month Type II period
- Screenshots without URL/context proving system and date
- Config exports contain live secrets or API keys unredacted
- Manifest missing hashes or UTC timestamps
- Orphan artifacts not mapped to control IDs
- Playwright captures using unauthorized production credentials
- Evidence bundle transmitted unencrypted via email or Slack
Verification
1---2name: soc2-evidence-collection3description: Automates SOC 2 evidence gathering—screenshots, configuration exports, access reviews, log samples, and audit-trail packaging with integrity hashes—for AICPA TSC examinations. Trigger when preparing audit binders, populating Vanta/Drata-style evidence requests, or packaging agent/MCP compliance artifacts. Do not use for control mapping (use soc2-trust-services-criteria) or continuous drift monitoring (use soc2-ccm-continuous-monitoring).4---56# SOC 2 Evidence Collection78## Overview910This skill implements **automated and semi-automated evidence collection** for SOC 2 Type I/II examinations. Evidence must be **complete, dated, tamper-evident, and mapped to TSC control IDs**. The agent uses MCP tools where available:1112- **Playwright MCP**: screenshots, DOM/state captures for web admin consoles13- **Postgres MCP**: query exports for access lists, change tickets, control status14- **Slack MCP**: export approval messages (redacted) for change management evidence15- **Shell/API exports**: IAM policies, Terraform state metadata, cloud config snapshots1617Every artifact receives a **SHA-256 hash** and entry in an evidence manifest suitable for auditor import.1819## When to Use2021Use this skill when:2223- Building an **audit evidence binder** for SOC 2 Type I or Type II24- Responding to **auditor evidence requests** (ERDs, sample periods)25- Populating **GRC platform** evidence slots (Vanta, Drata, Secureframe alternatives)26- Packaging **quarterly control testing** results27- Collecting **point-in-time** and **period-of-time** samples (Type II requires continuous samples)28- Documenting agent/MCP compliance after running other skills (PCI, HIPAA)2930Do **not** use this skill when:3132- Defining which TSC controls apply (use `soc2-trust-services-criteria`)33- Real-time drift detection (use `soc2-ccm-continuous-monitoring`)34- Replacing auditor judgment on sample adequacy3536## Core Process3738Execute steps **in order**.3940### Step 1: Evidence request intake41421. Obtain auditor evidence request list or map from TSC control matrix.432. For each request, record:44 - Control ID (e.g., CC6.1, CC7.2)45 - Evidence type (screenshot, config export, log sample, policy PDF)46 - Sample period (for Type II: e.g., Q1–Q4 2025)47 - Population and sample size (auditor may specify)483. Artifact: `evidence-request-register-{id}.csv`.4950### Step 2: Collection plan and tool mapping5152| Evidence type | Primary collection method | MCP/tool |53| --- | --- | --- |54| IAM user list + MFA status | Cloud API or IdP export | Shell, Postgres |55| Admin console screenshot | Authenticated browser capture | Playwright MCP |56| Firewall/security group rules | Cloud API JSON export | Shell |57| Change tickets | ITSM export | Postgres, API |58| Log sample (auth failures) | SIEM query export | Postgres, API |59| Policy documents | Document store hash | File read |60| Agent skill validation | Git commit + CI run | Shell |61| MCP access logs | Log aggregator export | Postgres |6263Identify blocking gaps (missing MCP credentials, read-only access)—document before collection.6465### Step 3: Automated collection execution6667For each evidence item:68691. **Collect** using prescribed tool—do not manually recreate data that can be exported programmatically.702. **Redact** ePHI/PII/secrets from evidence unless auditor specifically requires raw sample under NDA.713. **Timestamp** collection in UTC; record collector identity (human or agent run ID).724. **Hash** raw artifact: `sha256sum` equivalent; store in manifest.735. **Name** files predictably: `{control-id}_{evidence-type}_{date}.{ext}`.7475#### Playwright MCP screenshot protocol76771. Authenticate to target console via approved test account (not production admin unless authorized).782. Navigate to exact page showing control (e.g., MFA enforcement policy).793. Capture full-page screenshot including URL bar and timestamp overlay if available.804. Save as PNG with manifest entry.8182#### Postgres MCP export protocol83841. Run read-only queries against compliance/evidence schema only.852. Export CSV/JSON; limit rows to sample size.863. Verify query logged in audit trail.8788### Step 4: Period-of-time sampling (Type II)89901. For each recurring control (access reviews, vulnerability scans, backup tests):91 - Collect **one sample per required interval** in examination period (e.g., quarterly access review × 4).922. Verify samples are **evenly distributed**—not all collected last week before audit.933. Flag **missing intervals** as FAIL with remediation note.9495### Step 5: Integrity and chain of custody96971. Generate `evidence-manifest-{id}.json`:98 ```json99 {100 "artifact_id": "EV-2025-001",101 "control_id": "CC6.1",102 "filename": "CC6.1_mfa-enforcement_2025-06-13.png",103 "sha256": "...",104 "collected_at_utc": "...",105 "collector": "...",106 "source_system": "playwright-mcp"107 }108 ```1092. Sign manifest or store in append-only evidence bucket (WORM, S3 Object Lock).1103. Package as `evidence-bundle-{id}.tar.gz` with manifest at root.111112### Step 6: Control cross-reference validation1131141. Map every manifest entry to TSC control ID—no orphan artifacts.1152. Map every auditor request to ≥1 artifact—or document **exception** with compensating evidence.1163. Cross-check dates fall within sample period.117118### Step 7: Auditor delivery package1191201. Produce:121 - Evidence bundle (encrypted at rest for transit)122 - Index spreadsheet: Control ID → filename → hash → description123 - Collection methodology note (tools, redaction approach, limitations)1242. Obtain internal reviewer sign-off before external delivery.125126## Common Rationalizations127128| Excuse the agent might generate | Required rebuttal |129| --- | --- |130| "A verbal confirmation is enough for CC8 change approval." | SOC 2 requires **verifiable** evidence—ticket export or signed approval message with timestamp. |131| "One screenshot at audit time covers the whole Type II period." | Type II requires **period-of-time** samples across the examination window—not point-in-time only. |132| "We can recreate logs from memory for the sample." | Recreated logs are **not auditable**—export from authoritative SIEM/system. |133| "Hashes are overkill for screenshots." | Integrity hashes prove evidence **unchanged since collection**—auditors expect them. |134| "Redaction removes too much; send raw PHI to auditor email." | Use secure auditor portal with **minimum necessary** redaction—never unencrypted email. |135| "Missing Q2 access review—we'll note it later." | Missing intervals are **findings**—document now with remediation plan. |136137## Red Flags138139- Evidence collected entirely in final audit week for 12-month Type II period140- Screenshots without URL/context proving system and date141- Config exports contain live secrets or API keys unredacted142- Manifest missing hashes or UTC timestamps143- Orphan artifacts not mapped to control IDs144- Playwright captures using unauthorized production credentials145- Evidence bundle transmitted unencrypted via email or Slack146147## Verification148149- [ ] Evidence request register complete with control IDs and sample periods150- [ ] Collection plan maps each request to tool/method151- [ ] All artifacts collected with UTC timestamps and collector identity152- [ ] SHA-256 recorded for every artifact in manifest153- [ ] Type II recurring controls have samples for each required interval154- [ ] ePHI/secrets redacted per minimum necessary policy155- [ ] Playwright screenshots include authenticating context (URL, policy visible)156- [ ] No orphan artifacts or unfulfilled auditor requests without documented exception157- [ ] Evidence bundle packaged with immutable storage or Object Lock158- [ ] Internal reviewer sign-off recorded before auditor delivery