agentleFS
MaheshAwasareMaheshAwasare/claude-skills-pro/skills/soc2-evidence/SKILL.md

soc2-evidence

Skill1 starsChanged 7 months agoMITView on GitHub

Map SOC 2 controls to actual code and CI artifacts an auditor can verify — access reviews, change management, vulnerability scanning, encryption, monitoring, incident response. Use when starting SOC 2 Type 1/Type 2 prep, working with Vanta/Drata/Secureframe, or responding to a customer security questionnaire that asks for SOC 2 evidence.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every admin action in your app writes to an audit_log table:

    line 175

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SOC 2 Evidence (Engineering View)

SOC 2 isn't a prescriptive standard — auditors evaluate whether your controls as designed and as operating meet the Trust Services Criteria. The art is mapping abstract criteria (CC6.1, CC7.4, etc.) to concrete code/CI artifacts. This skill is that mapping.

When to use

  • Starting SOC 2 Type 1 or Type 2 prep (typically 6–12 months out from audit).
  • Working with Vanta / Drata / Secureframe / Sprinto and they ask "what evidence do you have for control X?"
  • Sales-driven: customer asks "are you SOC 2 compliant?" and you need to articulate posture.
  • Pre-audit gap assessment.

When NOT to use

  • Looking for legal advice — work with an auditor.
  • ISO 27001 — overlaps but distinct framework; mapping is different.
  • Pure compliance "checkbox" mode — SOC 2 done well changes how engineering operates.

Trust Services Criteria you'll actually face

CategoryRequired for mostWhat it covers
Common Criteria (CC)Yes — requiredSecurity; the bulk of controls
Availability (A)CommonUptime, DR, capacity
Confidentiality (C)CommonEncryption, access
Processing Integrity (PI)Less commonData accuracy, completeness
Privacy (P)Common for B2CNotice, consent, data subject rights

Most SaaS vendors do CC + A + C. PI is often skipped (hard, less audited). Privacy added if processing consumer PII heavily.

The mapping (sample controls → engineering artifacts)

CC6.1: Logical access controls

"The entity implements logical access security software, infrastructure, and architectures over protected information assets."

Evidence auditor wantsWhere in your stack
Authentication enforces MFAClerk/Okta config screenshot + SSO policy
Password complexity policyClerk password policy / Okta config
Auto-disable inactive accountsCron job in Vanta/Drata, or HR-driven offboarding
Privileged access reviewed quarterlyDocumented review meeting + ticket per user
Service accounts have rotationKMS rotation policy + last rotation date

CC6.6: Encryption in transit and at rest

EvidenceWhere
TLS 1.2+ enforced on all endpointsnginx/cloudfront/cloudflare config; SSL Labs scan
Database encryption at restRDS / Cloud SQL config screenshot
S3/GCS bucket encryptionBucket policy; AWS Config rule
Backup encryptionAutomated backup config
Customer-managed keys (CMK) where applicableKMS key rotation, separation of duty

CC7.1: System monitoring

EvidenceWhere
Centralized loggingCloudWatch / Datadog / Loki
Alerts on critical eventsSentry / PagerDuty / OpsGenie config
Log retention ≥ 1 yearStorage class config
Anomaly detectionGuardDuty, custom alerts on auth failures
Audit logs of admin actionsCloudTrail + app-level audit log

CC7.4: Incident response

EvidenceWhere
Documented incident response proceduredocs/runbooks/incident-response.md
Incident tickets in trackerLinear / Jira project for incidents
Post-mortem for severity 1/2 incidentsFiled within 5 business days
On-call rotationPagerDuty schedule

CC8.1: Change management

"The entity authorizes, designs, develops or acquires, configures, documents, tests, approves, and implements changes to infrastructure, data, software, and procedures to meet its objectives."

EvidenceWhere
All code changes via PRGitHub branch protection rules
Required reviewersCODEOWNERS file; protected branch settings
CI runs tests before mergeGitHub Actions workflow + required checks
Production deploys are auditableCD logs, deploy notifications in Slack
Database migrations reviewedPR labels, migration approval workflow
Emergency change procedureRunbook documenting break-glass deploy

CC9.1: Risk assessment

EvidenceWhere
Annual risk assessmentSpreadsheet / Vanta module
Vendor risk reviewsVendor list + assessment per vendor
Penetration test (annual)Third-party report
Vulnerability scanningDependabot / Snyk / GitHub Advanced Security

A1.2: Availability

EvidenceWhere
SLA / SLO documentedPublic uptime page or internal SLO doc
Backups run successfullyAutomated backup logs
DR test (annual)Restore-from-backup test report
Capacity monitoringDashboards showing headroom

The artifact list (what you actually produce)

Across all controls, these are the buckets:

  1. Configurations — screenshots or as-code definitions (Terraform, IaC).
  2. Logs and reports — exported from systems, retained.
  3. Tickets — change requests, access requests, incidents in Linear/Jira.
  4. Policies — written documents (security policy, data retention, etc.).
  5. Training records — annual security training completion.
  6. Reviews — periodic access reviews, vendor reviews.

GRC tools (Vanta, Drata, Secureframe) automate evidence collection by hooking into AWS, GitHub, Okta, etc., and pulling configurations / running checks continuously.

Engineering-side actions to make audit easy

1. Branch protection on main

# Repo settings → Branches → main
require_pull_request_reviews: true
required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
require_status_checks_to_pass: true
required_status_checks: [ci, security-scan]
require_signed_commits: true
require_linear_history: true
include_administrators: true

This single config covers a chunk of CC8.1.

2. CODEOWNERS file

# .github/CODEOWNERS
*                          @platform-team
/infra/                    @platform-team @security-team
/migrations/               @platform-team @data-team
/payments/                 @payments-team @security-team

Required reviewers for sensitive paths. Auditors love this.

3. Mandatory CI security scan

# .github/workflows/security.yml
on: [pull_request]
jobs:
  scan:
    steps:
      - uses: github/codeql-action/init@v3
      - uses: github/codeql-action/analyze@v3
      - uses: aquasecurity/trivy-action@0.20.0     # container scan
      - uses: snyk/actions/node@master              # dep scan

Required check on main. Evidence of "automated vulnerability scanning."

4. Centralized logging with retention

CloudWatch log groups with retention_in_days = 365 (or longer). Application logs flow to CloudWatch / Loki / Datadog. CloudTrail captures all AWS API calls; retain ≥ 1y.

5. Audit log table for admin actions

Every admin action in your app writes to an audit_log table:

await db.auditLog.create({ data: {
  actor: adminUser.id,
  action: "view_user_pii",
  resource: targetUserId,
  context: { ip, userAgent, route },
}});

Auditors will sample this. Make it real.

6. Quarterly access review

Cron a script that exports user list with roles → manager reviews → ticket attached as evidence. Tools like Vanta automate the workflow.

7. Annual penetration test

Hire a reputable firm (HackerOne, Bishop Fox, Cobalt). Get the report. Track findings to closure.

Type 1 vs Type 2

  • Type 1: design of controls at a point in time. Shorter; cheaper. Good first audit.
  • Type 2: design + operating effectiveness over a period (typically 6 or 12 months). What customers actually want.

Most SaaS targets Type 2 with a 12-month observation window after a Type 1.

GRC tool tips

Vanta / Drata / Secureframe / Sprinto automate ~70% of evidence collection. They'll flag failing checks daily. Worth the cost; saves the engineering team from manual evidence gathering.

But:

  • Tools detect what's connected. They won't catch the third-party service that's not integrated.
  • "Vanta says we're 99% compliant" ≠ "auditor will pass us 99% compliant." Tools are heuristics.
  • Engineering still has to build the controls; tools just monitor them.

Anti-patterns

  • Treating SOC 2 as a checkbox — controls have to actually operate. "We have a policy" without enforcement fails Type 2.
  • Buying a GRC tool first, building controls later — tool monitors emptiness.
  • Branch protection skipped for "speed" — change management is the most-audited control area.
  • No CODEOWNERS — auditor question: "who reviews production-impacting code?"
  • Audit log writable by application — must be tamper-resistant.
  • Vendor list out of date — listing only old vendors, missing the 5 added this year.
  • No backup restore test — backups exist but never tested. Auditor asks "when did you last restore?"
  • Pen test findings ignored — needs a tracked remediation path.
  • Access review = "I looked at the list once" — must be documented; outcome (approve/revoke per user) recorded.
  • Generic incident response policy nobody's read — auditor asks "walk me through what would happen for incident X."

Verify it worked

  • Controls mapped to evidence in a spreadsheet (or GRC tool).
  • Branch protection active on default branch; bypasses require approval.
  • CODEOWNERS file enforces reviewers on sensitive paths.
  • CI runs security scans (CodeQL, Snyk, Trivy) and blocks merges on critical findings.
  • All admin actions in app are audit-logged; sample query produces sensible results.
  • Access reviews documented quarterly with manager sign-off.
  • Backup restore tested annually; report retained.
  • Penetration test report from current year on file; findings tracked to closure.
  • Incident response runbook exists; on-call has been trained.
  • Encryption at rest and in transit verified by config and external scan.
  • No production access from personal laptops without MDM-enforced disk encryption.
  • All workforce members completed annual security training.
  • Vendor list current; BAAs / DPAs / SOC 2 reports collected from material vendors.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.