1---2name: compliance-frameworks3description: Security and privacy compliance patterns for B2B SaaS (SOC 2, GDPR). Use for audit preparation, control design, compliance gap analysis, or building compliance into features. Use when this capability is needed.4---56# Compliance Frameworks Skill78Security and privacy compliance patterns for B2B SaaS products.910## When to Use1112- Preparing for SOC 2 Type II audit13- Implementing GDPR data handling requirements14- Conducting compliance gap analysis15- Designing controls for audit evidence16- Building compliance into new features1718## Quick Reference1920### SOC 2 Trust Principles2122| Principle | Key Controls | Priority |23|-----------|--------------|----------|24| **Security** | Access control, encryption, monitoring | Required |25| **Availability** | Uptime SLAs, redundancy, backups | Required |26| **Processing Integrity** | Input validation, error handling | Conditional |27| **Confidentiality** | Data classification, encryption | Common |28| **Privacy** | Consent, access requests, retention | If PII handled |2930### GDPR Rights (Data Subject)3132| Right | Implementation | Response Time |33|-------|----------------|---------------|34| Access | Data export endpoint | 30 days |35| Erasure | Deletion workflow | 30 days |36| Rectification | Edit profile | Reasonable |37| Portability | Machine-readable export | 30 days |38| Objection | Opt-out mechanisms | Immediate |3940### Common Control Categories4142| Category | Examples |43|----------|----------|44| **Preventive** | Access controls, input validation, encryption |45| **Detective** | Audit logging, anomaly detection, SIEM |46| **Corrective** | Incident response, patching, rollback |4748## Key Patterns4950### Control Design5152```53Risk Identification → Control Selection → Implementation → Evidence Collection → Audit54```5556### Evidence Types5758| Type | Examples |59|------|----------|60| **Documentation** | Policies, procedures, diagrams |61| **Configuration** | Terraform, IAM policies, firewall rules |62| **Logs** | Audit trails, access logs, change records |63| **Screenshots** | Dashboard configs, settings, approvals |6465## Integration with Development6667### PR Checklist (Security-Sensitive Changes)6869- [ ] No hardcoded secrets70- [ ] Access controls implemented71- [ ] Audit logging added72- [ ] Input validation present73- [ ] Error messages sanitized7475### Compliance by Design7677Build compliance into features from the start:78791. **Data Classification** - What data is being handled?802. **Access Control** - Who can access it?813. **Audit Trail** - What operations are logged?824. **Retention** - How long is data kept?835. **Deletion** - How is data removed?8485## Files8687- `reference.md` - Detailed checklists, control mappings88- `examples.md` - Implementation patterns, evidence templates8990---91> Converted and distributed by [TomeVault](https://tomevault.io/claim/ai-enhanced-engineer) — claim your Tome and manage your conversions.92<!-- tomevault:4.0:skill_md:2026-04-14 -->