skills/soc2-compliance/SKILL.md
SOC2 Type II compliance - Trust Service Criteria, access controls, audit logging, change management, incident response, evidence collection
npx skillsauth add vibeeval/vibecosystem soc2-complianceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Control | Requirement | Implementation | |---------|-------------|----------------| | CC1.1 | COSO principles | Documented security policies | | CC2.1 | Information communication | Security awareness training | | CC3.1 | Risk assessment | Annual risk assessment process | | CC5.1 | Control activities | Technical + administrative controls | | CC6.1 | Logical access | RBAC, MFA, least privilege | | CC6.2 | Auth mechanisms | SSO, password policy, key rotation | | CC6.3 | Access revocation | Automated deprovisioning | | CC7.1 | Threat detection | IDS/IPS, SIEM, vulnerability scanning | | CC7.2 | System monitoring | Real-time alerting, log aggregation | | CC7.3 | Incident evaluation | Severity classification, escalation | | CC7.4 | Incident response | Documented IR plan, tabletop exercises | | CC8.1 | Change management | PR review, CI/CD gates, rollback plan | | CC9.1 | Risk mitigation | Business continuity, DR plan |
// MFA enforcement middleware
async function requireMFA(req: Request, res: Response, next: NextFunction) {
const user = req.user;
if (!user) return res.status(401).json({ error: 'Unauthenticated' });
if (!user.mfaVerified) {
await auditLog({
action: 'auth.mfa.required',
actor: user.id,
resource: req.path,
result: 'blocked',
});
return res.status(403).json({ error: 'MFA verification required' });
}
next();
}
interface Permission {
resource: string;
action: 'read' | 'write' | 'delete' | 'admin';
}
interface Role {
name: string;
permissions: Permission[];
}
function checkPermission(user: User, resource: string, action: string): boolean {
const role = getRoleByName(user.role);
const hasPermission = role.permissions.some(
(p) => p.resource === resource && p.action === action
);
auditLog({
action: `authz.${action}.${hasPermission ? 'granted' : 'denied'}`,
actor: user.id,
resource,
});
return hasPermission;
}
| Event Category | Examples | Retention | |---------------|----------|-----------| | Authentication | Login, logout, MFA, password reset | 1 yil | | Authorization | Permission grants, denials, role changes | 1 yil | | Data access | PII reads, exports, downloads | 1 yil | | Data modification | Create, update, delete operations | 1 yil | | System events | Config changes, deployments, restarts | 1 yil | | Admin actions | User management, policy changes | 3 yil |
interface AuditLogEntry {
id: string; // UUID
timestamp: string; // ISO 8601
action: string; // 'user.login.success'
actor: {
id: string;
email: string;
ip: string;
userAgent: string;
};
resource: {
type: string; // 'user', 'document', 'config'
id: string;
name?: string;
};
result: 'success' | 'failure' | 'error';
details?: Record<string, unknown>;
correlationId?: string; // Request tracing
}
async function writeAuditLog(entry: AuditLogEntry): Promise<void> {
// Append-only, tamper-evident storage
await auditStore.append({
...entry,
hash: computeHash(entry), // Chain hash for integrity
});
}
| Anti-Pattern | Neden Yanlis | Dogru Yol | |-------------|-------------|-----------| | Logging PII in plaintext | Data exposure riski | Mask/hash sensitive fields | | Mutable audit logs | Tampering riski | Append-only, immutable store | | No correlation ID | Trace edilemez | Her request'e UUID ata | | Missing failure logs | Saldiri tespiti zorlasiyor | Basarisiz denemeleri de logla | | Client-side only logging | Manipule edilebilir | Server-side zorunlu |
## Change Request
**Requester:** [isim]
**Date:** [tarih]
**Priority:** [P0-P3]
**Type:** [Standard | Emergency | Normal]
### Description
[Ne degisecek]
### Impact Assessment
- Affected systems: [liste]
- Affected users: [kac kisi, hangi roller]
- Risk level: [Low | Medium | High | Critical]
- Rollback plan: [nasil geri alinir]
### Approval
- [ ] Engineering lead
- [ ] Security review (High/Critical risk)
- [ ] Business owner (user-facing changes)
### Implementation
- [ ] Changes tested in staging
- [ ] Monitoring dashboards checked
- [ ] Rollback procedure verified
- [ ] Post-deployment verification
# SOC2 compliant pipeline
deployment:
stages:
- lint-and-test
- security-scan
- code-review-approval # Min 1 reviewer
- staging-deploy
- staging-verification
- production-approval # Manual gate
- production-deploy
- post-deploy-verification
rules:
- require_code_review: true
- require_passing_tests: true
- require_security_scan: true
- no_direct_push_to_main: true
- branch_protection: true
| Severity | Definition | Response Time | Examples | |----------|-----------|--------------|---------| | SEV-1 | Service down, data breach | 15 min | Production outage, unauthorized access | | SEV-2 | Major degradation | 1 saat | Feature broken, performance issue | | SEV-3 | Minor impact | 4 saat | Non-critical bug, cosmetic issue | | SEV-4 | No user impact | Next business day | Internal tool issue |
1. DETECT → Monitoring alert / user report
2. TRIAGE → Classify severity, assign IC (Incident Commander)
3. CONTAIN → Stop the bleeding (isolate, rollback, block)
4. ERADICATE → Root cause fix
5. RECOVER → Restore normal operations
6. REVIEW → Post-incident review within 48 saat
7. IMPROVE → Action items tracked to completion
## Post-Incident Review
**Incident:** [INC-XXXX]
**Date:** [tarih]
**Duration:** [suresi]
**Severity:** [SEV-1/2/3/4]
**IC:** [isim]
### Timeline
- HH:MM - Event detected
- HH:MM - IC assigned
- HH:MM - Root cause identified
- HH:MM - Fix deployed
- HH:MM - Service restored
### Root Cause
[Detayli aciklama]
### Impact
- Users affected: [sayi]
- Duration: [sure]
- Data impact: [varsa]
### Action Items
- [ ] [Action 1] - Owner: [isim] - Due: [tarih]
- [ ] [Action 2] - Owner: [isim] - Due: [tarih]
### Lessons Learned
[Ne ogrendi]
| Evidence Type | Source | Frequency | Tool | |--------------|--------|-----------|------| | Access reviews | IAM provider | Quarterly | Okta/Auth0 export | | Change logs | Git, CI/CD | Continuous | GitHub audit log | | Security scans | SAST/DAST | Per deploy | Snyk, SonarQube | | Penetration tests | External auditor | Annual | Report PDF | | Training records | LMS | Annual | Completion certs | | Incident reports | Incident tracker | Per incident | PagerDuty, Jira | | Backup tests | DR runbook | Quarterly | Restore verification | | Uptime metrics | Monitoring | Continuous | Datadog, Grafana | | Vulnerability patches | Dependency manager | Continuous | Dependabot, Renovate |
// Automated evidence collector
async function collectMonthlyEvidence(): Promise<EvidencePackage> {
const [accessLogs, changeLog, securityScans, uptimeMetrics] = await Promise.all([
fetchAccessReviewReport(),
fetchGitChangeLog(),
fetchSecurityScanResults(),
fetchUptimeMetrics(),
]);
return {
period: getCurrentMonth(),
accessReview: accessLogs,
changeManagement: changeLog,
securityScanning: securityScans,
availability: uptimeMetrics,
generatedAt: new Date().toISOString(),
};
}
| Finding | Risk | Fix | |---------|------|-----| | No MFA for admin accounts | High | Enable MFA for all privileged users | | Missing access reviews | Medium | Implement quarterly review process | | No encryption at rest | High | Enable disk/database encryption | | Inadequate logging | Medium | Implement centralized audit logging | | No change management | High | Require PR reviews, approval gates | | Missing incident response plan | High | Document and test IR procedures | | No vulnerability scanning | Medium | Add SAST/DAST to CI/CD | | Shared service accounts | Medium | Individual accounts with RBAC | | No backup verification | Medium | Quarterly restore tests | | Missing security training | Low | Annual security awareness program |
development
Goal-based workflow orchestration - routes tasks to specialist agents based on user goals
tools
Wiring Verification
development
Connection management, room patterns, reconnection strategies, message buffering, and binary protocol design.
testing
VP Engineering perspective - org design (team topologies), process improvement, cross-team dependencies, engineering culture, OKRs, incident management maturity, platform strategy, DX optimization, release management at scale