agentleFS
ai-enhanced-engineerai-enhanced-engineer/aiee-skills/skills/compliance-frameworks/SKILL.md

compliance-frameworks

Skill4 starsChanged 5 months agoMITView on GitHub

Security and privacy compliance patterns for B2B SaaS. Use for SOC 2 audit preparation, GDPR compliance, audit logging, PII handling, data subject rights, or building compliance controls into features.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Compliance Frameworks Skill

Security and privacy compliance patterns for B2B SaaS products.

When to Use

  • Preparing for SOC 2 Type II audit
  • Implementing GDPR data handling requirements
  • Conducting compliance gap analysis
  • Designing controls for audit evidence
  • Building compliance into new features

Quick Reference

SOC 2 Trust Principles

PrincipleKey ControlsPriority
SecurityAccess control, encryption, monitoringRequired
AvailabilityUptime SLAs, redundancy, backupsRequired
Processing IntegrityInput validation, error handlingConditional
ConfidentialityData classification, encryptionCommon
PrivacyConsent, access requests, retentionIf PII handled

GDPR Rights (Data Subject)

RightImplementationResponse Time
AccessData export endpoint30 days
ErasureDeletion workflow30 days
RectificationEdit profileReasonable
PortabilityMachine-readable export30 days
ObjectionOpt-out mechanismsImmediate

Common Control Categories

CategoryExamples
PreventiveAccess controls, input validation, encryption
DetectiveAudit logging, anomaly detection, SIEM
CorrectiveIncident response, patching, rollback

Key Patterns

Control Design

Risk Identification → Control Selection → Implementation → Evidence Collection → Audit

Evidence Types

TypeExamples
DocumentationPolicies, procedures, diagrams
ConfigurationTerraform, IAM policies, firewall rules
LogsAudit trails, access logs, change records
ScreenshotsDashboard configs, settings, approvals

Integration with Development

PR Checklist (Security-Sensitive Changes)

  • No hardcoded secrets
  • Access controls implemented
  • Audit logging added
  • Input validation present
  • Error messages sanitized

Compliance by Design

Build compliance into features from the start:

  1. Data Classification - What data is being handled?
  2. Access Control - Who can access it?
  3. Audit Trail - What operations are logged?
  4. Retention - How long is data kept?
  5. Deletion - How is data removed?

SOC 2 Audit Logging Pattern

Production-ready audit logging for SOC 2 (validated in a prior ticket): no PII in logs (MD5 hashes), structured JSON, customer_id in every entry, category + confidence fields. Test every assertion as falsifiable; test exception paths (IntegrityError, OperationalError); verify no PII leaks in log output. See reference.md § SOC 2 Audit Logging Pattern for design principles table and key fields. See examples.md for log schema and exception handling code.

CSP Delivery-Point Parity

When CSP is delivered via both HTTP response headers and inline <meta http-equiv="Content-Security-Policy"> tags, directive strings that differ across delivery points produce silent policy weakening that no test catches. Two browser quirks: frame-ancestors is silently dropped in <meta> per HTML5 spec; X-Frame-Options via <meta http-equiv> is ignored by all browsers. Add maintainer-signal comments next to browser-ignored meta directives. See reference.md § CSP Delivery-Point Parity for the parity-check diff one-liner.

OWASP Secure Headers — Minimum Set

Minimum set for a static marketing site: Strict-Transport-Security, X-Frame-Options, Content-Security-Policy (with frame-ancestors 'none'), X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin, Permissions-Policy, Cross-Origin-Opener-Policy: same-origin. See reference.md § OWASP Secure Headers for the header table and post-deploy validation recipe.

Files

  • reference.md - Detailed checklists, control mappings, audit logging design, OWASP header table
  • examples.md - Implementation patterns, evidence templates

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.