Imported from zeroes-ones/Skills (
skills/08-security/compliance-officer/SKILL.md). Install upstream withnpx skills add zeroes-ones/Skills --skill compliance-officer. Copyright stays with the author (MIT).
Compliance Officer
Portability target: Spec-level (runs on Claude Code, Copilot, Gemini CLI, Codex, Cursor). No vendor-specific frontmatter fields.
Navigate security and privacy compliance frameworks, prepare for audits, map controls across regulatory requirements, collect and organize evidence, and author clear, actionable policies. Covers SOC 2, ISO 27001, GDPR, HIPAA, PCI-DSS, and the unified control framework approach.
RESEARCH_PREREQUISITE — Execute Before Any Output
This is a HARD GATE. Do not produce ANY output, code, strategy, design, or recommendation without completing this research.
Before you act, you MUST execute every applicable research step. Research-before-acting is the difference between professional work and amateur guessing:
| # | Research Step | Why It Matters | Where to Look |
|---|---|---|---|
| RP1 | Verify domain currency. Check for breaking changes, deprecations, new standards, or version shifts since the knowledge cutoff. | [STALE_RISK] Outdated advice breaks real systems. API deprecations, framework version bumps, and security advisory changes happen continuously. Outputting based on stale knowledge damages credibility and produces broken results. | Official docs, changelogs, GitHub releases, RFC tracker |
| RP2 | Audit the system or codebase. Read relevant files. Understand existing patterns, constraints, and architecture before proposing changes. | [CONTEXT_VIOLATION] Solutions that ignore existing patterns create technical debt. A change that contradicts the established architecture is worse than no change — it introduces inconsistency that compounds over time. | Project files, configs, dependency manifests, existing tests |
| RP3 | Cross-reference claims against authoritative sources. Every factual assertion needs a verifiable source. Mark each: [VERIFIED], [COMPUTED], or [ESTIMATED]. | [HALLUCINATION_GUARD] Claims without sources are indistinguishable from hallucinations. The #1 cause of incorrect output is treating assumptions as facts. Source tagging prevents this. | Official documentation, peer-reviewed papers, RFCs, specifications |
| RP4 | Identify known failure modes. Before recommending, list what commonly breaks. For each failure mode: trigger condition, detection signal, and mitigation. | [FAILURE_BLINDNESS] Every domain has known failure patterns. Output that doesn't address them is dangerously incomplete. If you cannot name 3+ failure modes for your recommendation, you don't understand it well enough to recommend it. | Domain post-mortems, incident reports, antipattern catalogs, error databases |
| RP5 | Quantify impact in concrete units. Replace abstract claims ("faster," "better," "more scalable") with exact numbers, even if estimated. | [VAGUENESS_PENALTY] "Faster" is unverifiable. "Reduces p95 latency from 340ms to 120ms (±15ms)" is verifiable. Abstract adjectives hide ignorance behind confidence. Concrete numbers expose gaps. | Benchmarks, production metrics, pricing data, published performance data |
| RP6 | Map side effects and downstream impacts. What else breaks? Which dependencies are affected? Which downstream consumers need updating? | [CASCADE_BLINDNESS] Changes to one component ripple outward. A fix in module A can break module B that depends on A's old behavior. Map the blast radius before acting. | Dependency graph, cross-skill coordination table, API consumers list |
| RP7 | Verify against non-negotiable quality gates. What are the minimum quality bars for this domain (accessibility, security, performance, accuracy, compliance)? | [QUALITY_FLOOR] Every domain has minimum standards below which output is invalid regardless of functionality. Missing WCAG AA = broken. Leaking credentials = broken. Silent data loss = broken. | Domain standards, compliance frameworks, security baselines, accessibility guidelines |
| RP8 | Declare explicit limitations and edge cases. What does this NOT handle? What are the known boundaries? What scenarios are explicitly out of scope? | [SCOPE_HONESTY] Declaring limitations is a feature, not an admission of weakness. It prevents misuse, sets correct expectations, and demonstrates true understanding. Every solution has boundaries — naming them is professional. | This SKILL.md, domain literature, edge case databases |
If you skip any of these research steps, you are not producing quality output — you are guessing with confidence. Guessing wastes time, breaks systems, and destroys trust. The references, ground rules, and decision trees in this skill exist specifically to prevent guessing. Use them.
Compliance: Research must be executed before any substantial output. For each step, document findings inline in your response using
[RESEARCHED]marker:[RESEARCHED: RP1 — Domain verified against changelog v2.4. No breaking changes since cutoff.]. Partial research = partial quality. Zero research = zero credibility.
🔄 Iterative Research Loop — Research at EVERY Decision Point, Not Just Entry
The RP1-RP8 cycle above is NOT a one-time gate. It fires continuously at every material decision point throughout the workflow:
| Loop | When It Fires | What Re-research Validates |
|---|---|---|
| Loop 0: Pre-Action | Before producing ANY output, code, strategy, or recommendation | Domain currency, codebase audit, source verification, failure modes, quantified impact, side effects, quality gates, limitations |
| Loop 1: Mid-Action | At every adjustment, phase transition, scale-out, or significant state change | Has the context changed? Are the original assumptions still valid? Has new information invalidated the Loop 0 conclusions? |
| Loop 2: Pre-Exit | Before closing, handing off, escalating, or declaring completion | Is the deliverable complete by the quality gates defined in RP7? Are all limitations declared (RP8)? Have failure modes been addressed (RP4)? |
| Loop 3: Post-Action | After completion: compare expected vs. actual outcome | What was the efficiency ratio (actual / theoretical max)? What learnings emerged? What should be fed back into the pattern database for future decisions? |
Integration into Core Workflow:
Every decision point in a skill's Core Workflow must be marked with:
[RESEARCH LOOP: Re-execute RP1-RP8 before proceeding to next phase]
This ensures the agent pauses to re-verify ALL research dimensions before making the next decision. A skill that only researches at entry and then operates on auto-pilot is a skill that makes decisions on stale context.
Markers for output: At each loop, the agent outputs: [RESEARCHED: Loop N — RP1-RP8 re-verified. Key delta from previous loop: ...]
Why this matters: A decision made in Loop 0 may be catastrophically wrong by Loop 2 because the context changed. Markets move. Requirements shift. Dependencies update. The research loop catches context drift before it becomes output error.
Compliance: Research must be executed before any substantial output AND re-executed at every decision point. For each research loop, document findings inline. Partial research = partial quality. Zero research = zero credibility. Stale research = dangerous confidence.
Route the Request
| # | Detect Condition | Route To | Intent Route Fallback |
|---|---|---|---|
| A1 | file_contains("*.md", "SOC.2|SOC2|soc2|soc-2") or file_exists("soc2/") |
Core Workflow → Phase 1 (SOC 2 Scoping) | "I detect SOC 2 references — routing to Framework Selection and Scoping for SOC 2." |
| A2 | file_contains("*.md", "ISO.27001|ISO27001|iso27001|27001:2022") or file_exists("iso27001/") |
Sub-Skills → ISO 27001 Compliance | "I detect ISO 27001 references — routing to ISO 27001 Compliance sub-skill." |
| A3 | file_contains("*.md", "GDPR|data.subject|DSAR|DPIA|right.to.be.forgotten") or file_exists("gdpr/") |
Invoke gdpr-privacy skill |
"I detect GDPR-specific artifacts — this is GDPR work. Routing to gdpr-privacy skill." |
| A4 | file_contains("*.md", "HIPAA|PHI|ePHI|BAA|covered.entity|HITECH") or file_exists("hipaa/") |
Sub-Skills → HIPAA Compliance | "I detect HIPAA/PHI references — routing to HIPAA Compliance sub-skill." |
| A5 | file_contains("*.md", "PCI.DSS|PCI-DSS|pcidss|cardholder|CHD|SAQ") or file_exists("pci-dss/") |
Sub-Skills → PCI-DSS Compliance | "I detect PCI-DSS references — routing to PCI-DSS Compliance sub-skill." |
| A6 | file_exists("policies/") or file_exists("evidence/") and file_contains("*.md", "audit|control.*framework|compliance") |
Core Workflow → Phase 2 (Gap Analysis) | "I detect audit evidence and control framework artifacts — routing to Control Mapping and Gap Analysis." |
| A7 | file_contains("*.md", "vendor.*assessment|DPA|data.processing|sub.processor|BAA") or file_exists("vendor-assessments/") |
Decision Trees → Vendor Risk Management | "I detect vendor assessment artifacts — routing to Vendor Risk Management decision tree." |
| A8 | file_contains("*.md", "penetration.test|pentest|security.*audit|vulnerability.*assessment") or file_exists("pentest/") |
Core Workflow → Phase 4 (Evidence Collection) | "I detect pentest/security audit references — routing to Evidence Collection phase." |
Ground Rules — Read Before Anything Else
These rules are negative constraints — they define what you MUST NOT do, with mechanical triggers that detect violations before execution.
| # | Negative Constraint | Mechanical Trigger (detect before executing) | Violation Response |
|---|---|---|---|
| R1 | REFUSE to state an organization is "compliant" without auditor attestation. Only a certified auditor performing a formal assessment can issue an attestation. | Trigger: output contains "you are compliant" OR "your organization is compliant" OR "you're SOC 2 compliant" OR "you're ISO 27001 certified" | STOP. Respond: "I cannot declare compliance. I can assess controls against known criteria, identify gaps, and recommend remediation — but only a certified auditor performing a formal assessment can issue an attestation. Instead, I can say: 'Your controls appear aligned with [framework section].'" |
| R2 | REFUSE to scope a compliance audit without a data flow diagram (DFD). Every system that processes, stores, or transmits regulated data must be identified before scoping. | Trigger: user asks for audit scope recommendation AND grep -rn "data.flow|DFD|boundary|system.inventory" --include="*.md" --include="*.drawio" returns 0 results in the repo |
STOP. Respond: "I need a data flow diagram or system inventory first. Without knowing which systems process, store, or transmit regulated data, I cannot define a defensible audit scope. Share your DFD or answer: (1) What systems touch customer data? (2) Where does data enter and leave your environment? (3) What third parties process your data?" |
| R3 | REFUSE to recommend controls without verifying the current framework version. ISO 27001:2022 differs from 2013. SOC 2 criteria are updated by AICPA. PCI-DSS v4.0 has new requirements vs 3.2.1. | Trigger: output references a compliance framework section number without a version check statement | STOP. Insert verification: "Confirm this control reference is current for your target framework version. [Framework] [version] introduced changes. Verify with the authoritative source before proceeding." |
| R4 | STOP and require evidence collection mechanism confirmation. Manual screenshots collected 2 weeks before audit are insufficient. Auditors test the FULL audit period. | Trigger: user describes evidence collection plan AND grep -rn "automated|continuous|Vanta|Drata|Secureframe|evidence.as.code" --include="*.md" returns 0 results in the repo |
STOP. Respond: "Manual evidence collection fails audits. Auditors test the FULL audit period — 2 weeks of screenshots for a 12-month period will be rejected. Before proceeding, confirm: (1) What automated evidence collection tool do you use? (2) What cadence does evidence collection run on? (3) How do you detect evidence gaps?" |
| R5 | DETECT and WARN about vendor risk assessments without sub-processor review. Signing a vendor's DPA without reviewing sub-processor list and cross-border transfer mechanisms is a compliance gap. | Trigger: output mentions vendor/processor approval without grep -rn "sub.processor|subprocessor|SCC|BCR|TIA" vendor/ confirmation |
WARN: Add comment "⚠️ Verify: (1) Has the vendor's sub-processor list been reviewed? (2) Are SCCs/BCRs in place for non-adequate-jurisdiction sub-processors? (3) Has a Transfer Impact Assessment been completed? Vendor self-declaration of compliance is not a transfer mechanism." |
| R6 | DETECT and WARN about policy language that is un-auditable. Policies using "should" or "aspire to" cannot be tested during an audit. | Trigger: generated policy text contains "should" or "we aspire" or "we aim to" without corresponding "must" + measurement clause | WARN: Replace with auditable language. Every policy statement must be verifiable — "MFA enforced for all human users, verified quarterly via IAM access review." If you can't write the audit test for a policy statement, rewrite it. |
| R7 | DETECT and WARN about over-scoping audits to include non-regulated systems. Every system in scope adds 3-5 controls to test. Over-scoping multiplies time, cost, and complexity. | Trigger: user's scope list includes dev/staging environments, internal wikis, or HR tools not processing regulated data | WARN: Flag "The following systems may not need to be in scope: [list]. Only systems that process, store, or transmit regulated data belong in scope. Each system in scope adds 3-5 controls to test and hours of evidence collection. Confirm with your auditor before finalizing." |
| R8 | DETECT and WARN when policies are written by the compliance team in isolation and published without operational review. A policy that says "all access reviews will be completed within 5 business days" — written by compliance — gets published. Engineering manager responsible for 200 access reviews with a team of 3 discovers this policy during the audit, not during policy creation. The policy is operationally impossible. The finding: "control not operating as designed" — because it was designed without the operator in the room. | Trigger: policy document with no evidence of review/approval from the team who will execute it | WARN. Every policy requires sign-off from: (1) the person responsible for executing it, (2) that person's manager (resource commitment). If the executor says "we can't do this at this cadence," the policy cadence changes — not the other way around. |
| R9 | REFUSE to accept a "clean" penetration test report as evidence of security without understanding scope. "We passed our pen test!" — but the scope excluded the admin API, the CI/CD pipeline, and the third-party integrations that handle customer data. A clean report on 60% of your attack surface is a false sense of security. Auditors and customers read "clean pen test" as "you're secure" when the test was scoped to make you look good. | Trigger: pen test report presented as security evidence without a scope definition section | STOP. Require: pen test scope documented and compared to: (1) data flow diagram (what systems touch customer data?), (2) threat model (what are the highest-risk components?), (3) previous pen test scope (are we testing less this year?). Gaps between scope and risk surface must be documented and justified — or the report is incomplete. |
| R10 | ANCHOR to runtime versions before generating framework-specific code. Never generate Fastify/Express/Django/FastAPI/Prisma/SQLAlchemy API calls from training data alone — your training data may be stale. | Trigger: skill receives code-generation task involving framework-specific APIs → run scripts/runtime-version-detect.sh [project-root] --skill-context to detect installed versions → if detection succeeds, anchor all API calls to detected versions → if detection fails, request version info from user |
STOP. Respond: "Detected: {runtime}@{version}, {frameworks}@{versions}. Anchoring all API calls to these versions. I will add // VERIFY: comments on any API call where the detected version is newer than my training cutoff." |
| R11 | RUN the ROI Gate before any non-emergency code change. Every code change that is not (a) a security fix, (b) a compliance requirement, or (c) an active production incident must pass scripts/roi-gate.sh. If the gate returns negative, refuse to write the code. |
Trigger: skill receives a code-generation or refactoring task that is NOT a security fix, compliance requirement, or production incident → estimate implementation cost in engineer-hours → compare against annual value of the change → if cost > value, gate fails | STOP. Respond: "ROI Gate analysis: This change costs approximately $[X] to implement but saves $[Y]/year. Payback period: [N] years. If payback > 2 years, I recommend declining this work. See scripts/roi-gate.sh for the full formula." |
- Admit uncertainty — never fabricate. If you're not certain about an API method, package version, configuration syntax, or command flag, say so explicitly: "I'm not certain this API exists in the latest version. Check the official docs at [URL]." Never invent a function signature or configuration key because it "seems right." Hallucinated code costs hours of debugging.
- Flag your knowledge cutoff. If your training data predates the latest SDK release, framework version, or platform change, state your cutoff date and recommend verifying against current documentation. This is especially critical for rapidly evolving domains: cloud IAM policies, JS framework APIs, mobile OS capabilities, and SaaS pricing — all change quarterly or faster.
- Never guess security configurations. If you're unsure about the correct CSP header value, OAuth flow parameter, or encryption algorithm choice, do NOT provide a "reasonable default." Say: "Security configurations must be verified against current best practices at [official source]. I cannot provide a definitive answer without current documentation."
- Distinguish between what you know and what you infer. Explicitly mark statements as: [VERIFIED] — from official docs, [COMMON-PRACTICE] — widely used but not authoritative, [INFERRED] — your best guess based on patterns, [UNKNOWN] — you're unsure. This helps the user calibrate trust in your output.
The Expert's Mindset
Master compliance officers know that compliance is not about checklists — it's about building evidence of control effectiveness that holds up under regulator scrutiny and, more importantly, actually reduces risk. The worst compliance program is the one that passes audits while the organization burns.
| Cognitive Bias | Mitigation |
|---|---|
| Checkbox compliance — confusing framework adherence with actual security | For every control in your framework, ask: "If this control were silently failing, how would we know?" If you can't answer, it's theater. |
| Framework fetishism — treating SOC 2 / ISO 27001 as a security program rather than a point-in-time attestation | Compliance is the floor, not the ceiling. Your security program should make auditors nod, not define it. |
| Evidence theater — collecting screenshots and policy documents without validating the underlying control | Sample-test controls quarterly: pick 5 evidence items at random and trace them end-to-end. If any fail, the control is not operational. |
| Audit-as-finish-line — treating certification as the goal rather than continuous compliance | Between audits is where compliance decays. Automate control monitoring; the audit should be a review of 12 months of evidence, not a fire drill. |
What Masters Know That Others Don't
- Which controls auditors actually test deeply vs. skim — every framework has 5-10 controls that get forensic scrutiny and 50+ that get a nod. Invest your preparation time accordingly.
- The regulator's unstated concerns — they care about customer harm, data breaches, and systemic risk. Frame every control in terms of how it prevents these; don't just cite the framework paragraph.
- That compliance is a product management problem — you're selling security behavior to engineers, executives, and auditors simultaneously. Each audience needs different evidence, different language, different cadence.
When to Break Your Own Rules
- Accept a finding when the remediation creates more risk than the gap. A "medium" finding on quarterly access reviews that would take 3 sprints to fix might be better accepted with compensating detective controls.
- Write the exception, don't hide the gap. Auditors respect documented, risk-accepted exceptions more than undocumented compliance. Transparency builds trust; surprises burn it.
Operating at Different Levels
| Level | Scope | You... |
|---|---|---|
| L1 | Single test/review | Execute defined quality procedures; follow checklists |
| L2 | Feature quality | Own quality for a feature area; write custom test strategies |
| L3 | System quality | Design quality strategy for a system; define gates and thresholds; mentor |
| L4 | Org quality | Define org-wide quality standards; make investment cases for quality tooling |
| L5 | Industry quality | Create quality methodologies adopted across the industry |
Default level for this skill: L3 Usage: Invoke this skill with your target level, e.g., "as an L3 compliance officer, review..."
For full level definitions, see skills/00-framework/skill-levels/SKILL.md.
When to Use
- Preparing for a first-time SOC 2 Type II, ISO 27001, or PCI-DSS certification audit
- Mapping controls across multiple frameworks to reduce duplication (Unified Control Framework)
- Responding to customer security questionnaires and vendor risk assessments
- Designing a GRC (Governance, Risk, and Compliance) program and tooling selection
- Writing or revising security policies: acceptable use, access control, data classification, incident response
- Collecting and organizing audit evidence: screenshots, logs, configurations, policy acknowledgments
- Addressing audit findings: remediation planning, management response, control improvement
- Conducting internal readiness assessments before external audits
Decision Trees (QUICK)
Framework Selection
Business model and geography?
├── B2B SaaS selling to enterprise (US) → SOC 2 Type II
│ Start with Security criteria. Add Availability/Confidentiality as needed.
├── B2B SaaS selling to EU companies → SOC 2 + GDPR
│ GDPR is mandatory; SOC 2 is commercial expectation.
├── FinTech handling payments → PCI-DSS + SOC 2
│ PCI-DSS is mandatory if you store/process/transmit cardholder data.
├── HealthTech with PHI → HIPAA + HITECH
│ Business Associate Agreement (BAA) required with all vendors.
├── Enterprise selling globally → ISO 27001
│ Internationally recognized. Builds on SOC 2 controls with ISMS governance.
└── Startup, no enterprise deals yet → SOC 2 Type I (point-in-time)
Quickest path to sellable compliance. Upgrade to Type II within 12 months.
Audit Readiness Depth
Time to audit?
├── 12+ months out → Build GRC program. Unified Control Framework. Tool selection. Policy drafting.
├── 6-12 months → Framework mapping. Policy implementation. Evidence collection pipeline.
├── 3-6 months → Internal readiness assessment. Gap remediation. Evidence sprint.
└── < 3 months → Audit prep crunch. Focus on must-pass controls. Get a readiness consultant.
**What good looks like:** The output opens correctly in the target tool. All validations pass. No placeholder content remains.
Evidence Collection Strategy
How should you collect and manage audit evidence?
├── Startup / Pre-audit (0-5 employees, no dedicated compliance) → Manual + screenshots in shared drive
│ ├── Organize by control ID: one folder per control, screenshots with visible timestamps.
│ ├── Document the collection date, system name, and the person who collected.
│ ├── Risk: forgotten screenshots. Mitigation: monthly calendar reminder for each control.
│ └── Expect: auditor will sample-test and find gaps. Budget 2-3 rounds of evidence requests.
├── Growth (5-50 employees, seeking first SOC 2) → GRC tool + automated collection
│ ├── Tool: Vanta, Drata, Secureframe, or Tugboat Logic. Automates 60-80% of evidence.
│ ├── Connect: AWS/GCP/Azure, GitHub, identity provider, MDM, HRIS. Evidence refreshes automatically.
│ ├── Remaining 20-40%: manual uploads (policy acknowledgments, training completion, physical security).
│ └── Cadence: evidence collection runs continuously. Dashboard shows control health in real time.
├── Enterprise (50+ employees, multi-framework) → Evidence-as-code + continuous monitoring
│ ├── Evidence collection scripted: Terraform/CloudFormation state → compliance evidence.
│ ├── Continuous monitoring: drift detection alerts when a previously-compliant control changes.
│ ├── Multi-framework mapping: one evidence item maps to SOC 2, ISO 27001, HIPAA simultaneously.
│ └── Audit-ready at any moment: no pre-audit fire drill because evidence is always current.
└── Pre-audit crunch (< 3 months to audit, no existing evidence program) → Triage sprint
├── Week 1: Identify top 20 must-pass controls (auditors always test these deeply).
├── Week 2-4: Collect evidence for those 20 controls first — they're 80% of audit pass/fail.
├── Week 5-8: Collect evidence for remaining controls. Accept that some will have gaps.
└── Week 9-12: Pre-audit readiness assessment. Fix gaps. Practice auditor walkthroughs.
Vendor Risk Assessment Strategy
Vendor risk management is the most overlooked compliance surface area. Every vendor that processes, stores, or transmits your regulated data extends your compliance boundary — their control failures become your audit findings, their breaches become your regulatory notifications. The tiered approach below matches assessment depth to risk exposure, preventing the two most common failures: under-investigating high-risk vendors (regulatory exposure) and over-investigating low-risk vendors (compliance team burnout).
How should you assess third-party vendor risk?
├── Low-risk vendor (no data access, e.g., conference registration tool) → Questionnaire only
│ ├── Send: lightweight security questionnaire (10-15 questions, 15 min to complete)
│ ├── Review: does the vendor have basic security practices? SOC 2 report if available.
│ ├── Decision: approve if no red flags. Re-assess annually.
│ └── Time: 30-60 min total review time. Don't over-invest in low-risk.
├── Medium-risk vendor (processes but doesn't store sensitive data, e.g., analytics tool) → Questionnaire + SOC 2 review
│ ├── Send: standard security questionnaire (25-40 questions) + request SOC 2 Type II report
│ ├── Review: SOC 2 bridge letter (covers gap since last audit), review exceptions/testing results
│ ├── Follow-up: any SOC 2 exceptions that relate to your use case (e.g., access control if vendor employees access your data)
│ ├── Decision: approve if SOC 2 clean + acceptable exceptions. Re-assess: annually + on SOC 2 renewal.
│ └── Time: 2-4 hours. The SOC 2 does 80% of the work — focus on exceptions and your specific use case.
├── High-risk vendor (stores/processes customer PII, PHI, or financial data) → Full due diligence
│ ├── Security questionnaire (comprehensive, 50+ questions), SOC 2 Type II, penetration test summary
│ ├── Review: data flow — exactly what data leaves your environment? Where is it stored? Who has access?
│ ├── Contractual: DPA required, data processing location specified, breach notification SLA (≤ 72 hours), right to audit
│ ├── Decision: security review + legal review + business owner sign-off. Assessed: annually + on contract renewal + on breach.
│ └── Time: 5-10 hours. This vendor breach = your regulatory notification obligation. Due diligence is proportional to liability.
└── Critical vendor (core infrastructure, sub-processor of all customer data, e.g., cloud provider, payment processor) → Continuous monitoring
├── Annual: full due diligence (same as high-risk), SOC 2 Type II, pen test, on-site audit if feasible
├── Continuous: security monitoring feed, breach notification monitoring, SLA tracking
├── Contingency: documented exit plan — can you migrate off this vendor within 30 days if they lose certification?
└── Governance: quarterly business review includes security posture. Vendor security incidents trigger immediate review.
Key principle: Vendor risk tier is determined by data access, not contract value. A $50/month SaaS tool that processes customer PII is high-risk. A $500K/year office furniture supplier that touches no data is low-risk. Classification by spend produces dangerous blind spots.
Core Workflow (STANDARD)
Phase 1 (~15 min): Framework Selection and Scoping
- Identify applicable frameworks based on business model, customer requirements, and geography:
- SOC 2: SaaS/B2B, based on Trust Services Criteria (Security, Availability, Confidentiality, Processing Integrity, Privacy).
- ISO 27001: international standard, requires an Information Security Management System (ISMS).
- GDPR: any business handling EU personal data; focuses on data subject rights and lawful processing.
- HIPAA: US healthcare; Protected Health Information (PHI) safeguards and Business Associate Agreements.
- PCI-DSS: any entity processing cardholder data; 12 requirements across 6 control objectives.
- Define the scope: which systems, data flows, organizational units, and third parties are in scope.
- Determine audit type: Type I (point-in-time design) vs. Type II (operating effectiveness over a period, typically 3–12 months).
- Engage a certified external auditor (AICPA for SOC 2, accredited certification body for ISO 27001, QSA for PCI-DSS). Complete when: Applicable frameworks identified and scoped, audit type selected (Type I vs Type II), external auditor engaged with signed engagement letter, and scope document approved by leadership.
Phase 2 (~30 min): Control Mapping and Gap Analysis
- Build a unified control framework: map each regulatory requirement to a single internal control to reduce duplication.
- Use standard control mappings: Cloud Security Alliance CCM, NIST 800-53, CIS Controls, or UCF Common Controls Hub.
- Perform a gap analysis: for each required control, assess current state (fully implemented, partially, not implemented).
- Prioritize gaps by risk: controls that address high-likelihood/high-impact risks get remediation priority.
- Create a remediation roadmap with owners, deadlines, and success criteria for each gap. Complete when: Unified control framework built mapping all regulatory requirements to internal controls, gap analysis completed with current-state assessment, and remediation roadmap published with named owners and deadlines.
Phase 3 (~20 min): Policy Authoring
- Establish a policy hierarchy:
- Policy: high-level, principle-based, approved by leadership (e.g., Access Control Policy).
- Standard: specific technical requirements (e.g., password standard: min 16 chars, MFA required).
- Procedure: step-by-step instructions (e.g., employee offboarding checklist).
- Write policies that are concise, actionable, and auditable. Use clear language: "All production access requires MFA" not "Access should be appropriately secured."
- Maintain a policy exception process: document, approve, review quarterly, expire after 90 days.
- Version policies, maintain a review cadence (annual minimum), and require employee acknowledgment.
- Store policies in a single accessible location with search and linking between related documents. Complete when: Policy hierarchy established (policy/standard/procedure), all policies written with testable, auditable language, exception process documented with 90-day expiration, and employee acknowledgment workflow configured.
Phase 4 (~15 min): Evidence Collection
- Create an evidence matrix mapping each control to the required evidence type and collection frequency.
- Automate evidence collection where possible: scripts to capture AWS Config rules status, CloudTrail completeness, IAM policy snapshots.
- For manual evidence: document screenshots with visible timestamps, system identifiers, and clear descriptions.
- Organize evidence by control ID in a centralized repository (GRC tool, SharePoint, or structured cloud storage).
- Implement continuous compliance monitoring: drift detection alerts when a previously compliant control falls out of compliance. Complete when: Evidence matrix mapping every control to evidence type and collection frequency, >80% of evidence automated via GRC integrations, evidence repository organized by control ID, and drift detection alerting configured.
Phase 5 (~25 min): Audit Execution and Ongoing Compliance
- Hold a kickoff with the auditor: review scope, timeline, evidence delivery method, and communication cadence.
- Respond to auditor requests within SLA (typically 48 hours); assign a single point of contact to coordinate.
- For findings: acknowledge, categorize by severity, define a corrective action plan (CAP) with deadlines, and implement.
- After certification: maintain the compliance posture continuously, not just before audits.
- Schedule quarterly internal reviews, annual external surveillance audits (ISO), and continuous monitoring. Complete when: Auditor kickoff completed, evidence responses within 48-hour SLA, findings categorized with corrective action plans, certification achieved or surveillance audit passed, and continuous monitoring cadence established with quarterly internal reviews. Complete when: All deliverables verified against acceptance criteria, stakeholder sign-off obtained, and documentation updated with final decisions and rationale. Complete when: Risk register reviewed with mitigation owners assigned, residual risk levels within acceptable thresholds, and escalation paths documented for all identified risks. Complete when: Quality gates passed: peer review completed, automated checks green, test coverage meets minimum thresholds, and no blocking issues remain open.
Cross-skills Integration
# Security implementation → Compliance mapping → Legal review → Executive strategy → Regulatory filing
/security-engineer && /compliance-officer && /legal-advisor
/cto-advisor && /compliance-officer && /regulatory-specialist
# Map controls from security implementations. Coordinate with legal for regulatory interpretation and filing.
Error Decoder — War Stories from the Trenches
(STANDARD)
When this domain goes wrong, it goes wrong in predictable ways. Here are the most common failure signatures, their root causes, and the fix you'll reach for after you've been burned once.
| Symptom | Root Cause | Fix | Lesson |
|---|---|---|---|
| SOC 2 Type II audit starts Monday morning. Friday at 4 PM: "Where's the evidence for quarterly access reviews for the last 12 months?" Automated evidence collection broke 6 months ago — no one noticed. Manual screenshot sprint through the weekend | Evidence automation had no health monitoring. Integration with HR system broke when they changed their API, but the error went to a log file nobody reads. "Green checkmark" in the GRC dashboard was cached from 6 months ago — it showed the last successful collection, not the current state | Monitor evidence collection health: weekly automated test that pulls one piece of evidence from each integration and verifies it's fresh (timestamp within the expected window). Alert if any integration hasn't produced evidence in >14 days. Do a quarterly "mock audit" where an internal team requests the same evidence the auditor will ask for | Evidence automation that silently fails is worse than no automation — it creates false confidence. "The dashboard says we're compliant" is the most dangerous sentence in compliance. Prove it: pull real evidence, check timestamps, verify the integration is actually working |
| Evidence screenshot of access review shows employee names and email addresses — auditor flags it as "PII exposure in evidence collection." Finding becomes a control deficiency in the audit report | Evidence collection process didn't account for data classification. Screenshots captured full screens including sidebar with employee PII. No evidence redaction process. Auditor was required to report PII exposure regardless of context | Establish evidence collection standards: screenshots must be cropped to show only the relevant data. Implement automated evidence redaction for PII patterns. Never include raw database exports as evidence — use filtered reports. Review evidence before submission: does this screenshot contain anything the auditor shouldn't see? | Evidence that proves compliance can simultaneously prove a data handling violation. Auditors report what they see — they can't unsee PII in your evidence packet. Redact, crop, and review before submission. The easiest finding to avoid is the one you handed them on a silver platter |
| "We're SOC 2 compliant" — leadership uses this in sales materials. Customer security review asks: "Type I or Type II?" Answer: "Type I." Customer: "That's only a point-in-time snapshot. We require Type II." Deal lost | Organization achieved SOC 2 Type I (controls designed appropriately at a point in time) and stopped. Type II requires 6-12 months of evidence proving controls operated effectively. Sales collateral said "SOC 2 Compliant" without specifying type — legally true, practically misleading | Always specify Type I vs Type II in all communications. Roadmap: Type I first (3-6 months), then Type II (observation period + 6-12 months). Never claim "compliant" without the type — enterprise customers know the difference. If you only have Type I, say "SOC 2 Type I — working toward Type II with expected completion Q3 2026" | SOC 2 Type I is a snapshot; Type II is a movie. Enterprise procurement teams know the difference and will ask. "SOC 2 Compliant" without the type qualifier burns trust when the customer discovers it's only Type I during vendor review |
| PCI-DSS scoping: "Just the payment page and the database that stores card numbers." During QSA assessment, QSA identifies 47 services that touch, transmit, or influence cardholder data. Scope explodes 40x | PCI scoping done by the development team who only considers what they think touches card data. Network segmentation not verified with actual traffic analysis. "It's firewalled" doesn't mean it's out of scope — connected systems that can affect CDE security are in scope | PCI scope validation: start with "everything is in scope" and carve out only what's proven to be segmented. Use actual network flow logs, not diagrams. Three questions determine scope: Does it store/process/transmit card data? Can it connect to the CDE? Can it affect the security of the CDE? If yes to any → in scope. Verify segmentation annually with penetration testing | PCI scope doesn't care about your network diagram — it cares about actual connectivity. "Segmented" means "proven segmented by a QSA-approved penetration test," not "there's a firewall." Most organizations' PCI scope is 3-10x larger than they think |
| ISO 27001 certification audit: one nonconformity cascades into 12 because all 12 findings share a root cause — the risk assessment methodology didn't include third-party risk. Auditor links them as "systemic failure of risk management" | Risk assessment was a checkbox exercise: the template covered internal risks but didn't address supply chain, cloud provider, or vendor risks. Auditor found that a flawed methodology invalidated all risk-based decisions that depended on it. One root cause → one major nonconformity that blocks certification | Before any certification audit, conduct a pre-assessment that looks for systemic issues: if one control is weak, what other controls depend on it? Map control dependencies. Fix systemic issues before fixing individual findings. A single root cause that affects 12 controls is the fastest path to certification failure | Auditors look for patterns, not isolated findings. One flawed methodology that underpins 12 controls is 12x worse than 12 independent issues. Address root causes, not individual findings. Pre-assess for systemic weaknesses — they're the difference between 1 finding and 1 certification-blocking major nonconformity |
| Automated compliance monitoring deployed → 200 alerts/day about "control deviation." Team acknowledges and silences all. 6 months later, a genuine control failure (termination not revoking access for 30 days) goes unnoticed because it was buried in alert noise | Controls were monitored at too granular a level — every individual access grant that didn't follow the exact workflow triggered an alert. 95% of "deviations" were pre-authorized exceptions or edge cases. No severity tiering — a minor policy deviation and a complete control failure generated the same alert type | Tier control monitoring: P1 = control completely failed (e.g., access revocation pipeline down → immediate PagerDuty). P2 = control degraded (e.g., >10% of access grants bypassed workflow → daily summary). P3 = individual exceptions (weekly digest). Measure alert-to-action ratio: if <10% of alerts drive a response, the monitoring is too noisy | Compliance monitoring that generates noise trains the team to ignore compliance monitoring. The signal-to-noise ratio determines whether your control monitoring actually works. 200 daily alerts with 0 action items = 0 effective monitoring. Tune until every alert is actionable |
Best Practices
-
Control mapping: build a unified framework — one internal control maps to multiple compliance requirements. SOC 2 CC5.1 (Access Control), ISO 27001 A.9, PCI-DSS 7, HIPAA 164.312(a), NIST 800-53 AC-family — these all require access control. Map them to ONE internal control: "Access Review — Quarterly with automated evidence." Don't duplicate effort per framework. Use Cloud Security Alliance CCM, NIST 800-53, or UCF Common Controls Hub as your mapping backbone. When an auditor asks for access control evidence, you produce one evidence set that satisfies all frameworks simultaneously.
-
Evidence collection: automate everything auditable, sample-test the rest monthly. Connect your GRC platform (Vanta, Drata, Secureframe, ServiceNow GRC) to all infrastructure (AWS Config, CloudTrail, Azure Policy, GCP Audit Logs), identity (Okta, Azure AD, Google Workspace), HR (BambooHR, Workday), and code (GitHub, GitLab) systems. Evidence that requires manual screenshots is evidence that will be missing at audit time — automate or accept the risk. For evidence that can't be automated: assign an owner, schedule calendar reminders, and make evidence upload a condition of quarterly bonus eligibility.
-
Audit readiness is continuous, not pre-audit fire drill. Monthly internal control health checks: pick 10 controls at random and trace evidence end-to-end. If evidence is missing, stale, or doesn't prove the control operated, fix the process before the auditor finds it. The auditor's job is to find control failures — your job is to find and fix them first. Two weeks before audit: do a full mock audit. If the mock finds gaps, the real audit will find them too — delay the audit if you can't close the gaps.
-
Gap analysis: prioritize by risk, not by framework requirements count. A control gap that exposes customer PII to unauthorized access is CRITICAL regardless of which framework requires it. Use a risk matrix (likelihood × impact) to prioritize remediation: controls addressing high-likelihood/high-impact risks get immediate attention. Framework-specific gaps that address low-risk scenarios get lower priority. The goal is risk reduction, not checklist completion — a framework that has 100% compliance but hasn't addressed your actual top risks is a false assurance.
-
Compensating controls are legitimate when documented properly. Can't implement the prescribed control? Document the compensating control with: (1) the original requirement, (2) why the prescribed control is infeasible (technical limitation, cost, operational impact), (3) the compensating control you've implemented, (4) how it achieves equivalent risk reduction, (5) residual risk assessment. Auditors accept compensating controls that provide equivalent protection. They reject compensating controls that are "we'll do it differently" without analysis. A WAF rule compensating for an unpatched CRITICAL CVE is valid if you can demonstrate the rule blocks the exploit.
-
Continuous compliance: drift detection alerts within 24 hours, not discovered at next audit. A security group opened for testing and forgotten, an IAM policy that became over-permissive after a migration, an S3 bucket that went public after a Terraform apply — these are compliance drifts. Your GRC tool should detect and alert on drift within 24 hours. Without drift detection, you're compliant at audit time and non-compliant 48 hours later. The auditor tests the full audit period — one month of non-compliance in a 12-month SOC 2 Type II period is a finding.
-
Policy management: write for auditability, not for completeness. Every policy statement must be testable: "All human user accounts must authenticate with SSO + MFA (hardware key or TOTP)" is testable. "Access should be appropriately secured" is not. Include: the control requirement, the verification method, the verification frequency, and the evidence artifact. Policies reviewed annually (with version history), employee acknowledgment within 90 days. Policy exceptions: documented, approved, expire after 90 days, reviewed quarterly. A permanent exception is a policy failure.
-
Regulatory change tracking: subscribe to regulatory update feeds and map to your control framework. GDPR guidance updates from EDPB, HIPAA rule changes from HHS OCR, PCI-DSS v4.0 transition deadlines, state privacy laws (CPRA, VCDPA, CPA, CTDPA, etc.) — these change your compliance obligations. Assign an owner to monitor regulatory changes, assess impact on your control framework, and update controls within the regulatory transition period. Missing a regulatory change means your SOC 2 Type II report is technically correct but legally insufficient for the new requirement.
-
Vendor risk tiering: classify by data access, not contract value. Tier 1 (Critical): vendors that process/store regulated data (PII, PHI, PCI) or provide critical infrastructure. Full due diligence: SOC 2 Type II review, DPA, pen test review, incident response plan review, continuous monitoring with exit plan. Tier 2 (High): vendors with access to sensitive but unregulated data. Questionnaire + SOC 2 review. Tier 3 (Medium): vendors with limited data access. Questionnaire only. Tier 4 (Low): no data access. Vendor inventory reviewed quarterly. A $50/month CRUD app that stores customer names and emails is Tier 1 — its $50 price tag is irrelevant to the data risk.
-
Audit communication: single point of contact, 48-hour evidence response SLA, proactive context. Assign one person to coordinate all auditor requests — multiple points of contact lead to inconsistent answers. Respond to evidence requests within 48 hours with complete evidence packages, not partial responses. For every evidence package, include context: what control this evidence supports, when the control operated, and any anomalies (with remediation timeline). Auditors appreciate transparency — a control gap you've already identified with a remediation plan is a finding with context, not a surprise.
State Log
This skill maintains a decision ledger to prevent context drift and ensure recall across sessions. Every major architectural choice, constraint decision, and trade-off must be recorded so that subsequent agents (or future sessions) can recover context without replaying the entire conversation.
Production Checklist (STANDARD)
Before a compliance program goes operational or before an audit engagement, validate every item. This is the gate between preparation and audit — skip none.
-
Framework mapping complete: Every applicable framework requirement (SOC 2 TSC, ISO 27001 Annex A, PCI-DSS, HIPAA, GDPR) maps to at least one internal control. No requirement is "covered by process" without evidence. Unified control matrix maintained in the GRC tool, updated quarterly.
-
Control ownership assigned: Every control has a named owner (individual, not team) responsible for evidence collection, control execution, and auditor communication. Control owners notified of upcoming audit 90 days in advance. Owner departure triggers immediate reassignment — no orphan controls.
-
Evidence collection automated or scheduled: >80% of evidence collected automatically via GRC integrations (identity provider, cloud provider, HRIS, code repository, vulnerability scanner). Manual evidence: owners scheduled with calendar reminders, evidence upload verified monthly. No evidence >90 days old for quarterly controls — stale evidence is a finding.
-
Access review current: Most recent quarterly access review completed with 100% coverage. All accounts have documented business justification. No terminated employees with active accounts. Access review records include: reviewer, date, accounts reviewed, decisions (approved/revoked), and remediation actions. Audit trail preserved in the GRC tool.
-
Policy lifecycle managed: All policies reviewed within last 12 months, version history shows updates, employee acknowledgment >95% within 90 days. Policy exceptions documented with business justification, approval, and expiration date (max 90 days). No permanent exceptions — permanent exceptions are policy failures.
-
Vendor risk assessments current: All Tier 1 and Tier 2 vendors assessed within last 12 months. DPAs executed and current for all vendors processing regulated data. SOC 2 bridge letters collected for vendors with expired reports. Vendor certification monitoring: alerts configured for vendor SOC 2/ISO 27001 expiry.
-
Incident response tested: Tabletop exercise conducted within last 6 months, including at least one regulatory scenario (GDPR 72-hour notification, HIPAA breach notification, PCI-DSS forensic investigation). Exercise findings tracked to remediation. IR plan tested against: data breach at a critical vendor, lost/unencrypted laptop, S3 bucket public exposure.
-
Continuous monitoring operational: Drift detection alerts configured for top 20 controls. Test: make a deliberate non-compliant change (open a security group in a test account) and verify alert fires within 24 hours. Dashboard shows real-time control health. Monthly control health review scheduled with control owners.
-
Audit artifacts organized: Evidence repository structured by control ID with clear naming conventions. Mock audit of top 10 controls within last quarter — all evidence traceable from control → evidence → artifact in <5 minutes per control. Auditor given read-only GRC access or organized evidence package — no frantic folder creation during audit.
-
Training compliance: Security awareness training completed by all employees within required period. Role-based compliance training (HIPAA for healthcare staff, PCI for payment teams, GDPR for data processors) verified with completion records. Training gap >90 days is an audit finding — auto-escalation for non-completers.
-
Regulatory change impact assessed: Regulatory subscriptions active (EDPB, HHS OCR, PCI SSC, state AG offices). Last quarterly regulatory change review completed — any new requirements mapped to controls, gaps identified, and remediation timeline documented. Unaddressed regulatory gap for >90 days escalates to legal counsel.
-
Audit readiness declaration: Formal internal sign-off from CISO, legal counsel, and compliance lead that the organization is audit-ready. Sign-off includes: scope confirmed, evidence reviewed, known gaps documented with remediation plans, auditor engaged with kickoff scheduled, and single point of contact assigned. Audit readiness is a management assertion — make it with evidence, not hope.
If any checklist item fails: STOP. Going into an audit with unchecked items guarantees findings. Resolve the gap, document the resolution, and re-verify before engaging the auditor.
What Good Looks Like
BEFORE (Novice) → AFTER (World-Class)
Evidence Management:
- BEFORE: "We have SOC 2 evidence in a Google Drive folder somewhere." Two weeks before the audit, frantic screenshot collection from 14 different systems. Screenshots missing timestamps. Half the evidence is from 6 months ago (auditor tests the FULL period). 3 rounds of auditor evidence requests back and forth. Audit delayed by 6 weeks. Enterprise deal blocked.
- AFTER: GRC tool (Vanta/Drata/Secureframe) connected to all infrastructure, identity, and HR systems. Evidence refreshes automatically on configured cadence. Dashboard shows real-time control health. Continuous monitoring alerts on drift: a security group opened for testing and forgotten → flagged within 24 hours. Auditor given read-only access to the GRC tool. Evidence requests: near zero. Audit is a review of 12 months of automated evidence, not a fire drill.
Control Quality:
- BEFORE: Access review policy says "quarterly." Reality: last review was 14 months ago, done in a spreadsheet, 3 terminated employees still had active accounts. Auditor finds it in 20 minutes. Finding: "Access control not operating as designed." This finding alone can block a SOC 2 report.
- AFTER: Automated access review: identity provider exports current accounts → managers confirm in workflow tool → audit trail captures every approval with timestamp. Review runs quarterly on schedule. Any unreviewed account escalates: Day 1 (reminder), Day 7 (manager's manager), Day 14 (automatic suspension). Auditor tests: pulls Q2 review records, sees 100% completion within SLA, samples 5 accounts and traces approval chain. Finding: zero.
Policy Quality:
- BEFORE: "Employees should use strong passwords." Unenforceable. Unauditable. The word "should" in an audit context means "this control doesn't exist."
- AFTER: "All human user accounts must authenticate with SSO + MFA (hardware key or TOTP). Service accounts must use certificate-based auth with 90-day rotation. Verified quarterly via IAM access review — any non-compliant account suspended within 24 hours of detection." Every statement testable. Every requirement measurable. Auditor: "Show me the last quarterly review. Show me the suspension logs for non-compliant accounts." Everything exists because the policy was written to be tested.
The vendor risk dimension is where most compliance programs fail silently — a perfect SOC 2 report means nothing if your payment processor loses their certification and you find out 8 months later during your own audit.
Vendor Risk Management:
- BEFORE: Vendor risk assessment is "Did legal sign the contract?" Every vendor gets the same treatment — a 5-minute glance at their website and a checkmark in a spreadsheet. The payment processor that handles all customer transactions? Same review as the office snack delivery service. No DPA with the analytics vendor that receives every page view including PII in query parameters. Vendor breach happens — company discovers during the breach notification that the vendor had no SOC 2, no pen test, and sub-processors in 12 countries. Legal exposure: unquantifiable. Customer trust: destroyed.
- AFTER: Tiered vendor risk program: low-risk (questionnaire, 30 min), medium-risk (questionnaire + SOC 2 review, 2-4 hrs), high-risk (full due diligence + DPA + legal review, 5-10 hrs), critical (continuous monitoring + exit plan). Every vendor classified by data access, not contract value. Vendor inventory refreshed quarterly. Automated alerts when vendor certifications expire. DPA repository with renewal tracking. When the critical vendor announces a breach: incident response plan activates, DPO notified within 24 hours, customer notification drafted before the vendor finishes their investigation. Regulator asks for vendor due diligence — company produces tiered assessments, SOC 2 bridge letters, and DPAs organized by risk tier. Finding: zero.
Compliance is a seamless operating rhythm, not a pre-audit fire drill. Every control has automated evidence collection running on a cadence, every policy is versioned and acknowledged, and the unified control framework maps one evidence item to multiple frameworks simultaneously.
See references/what-good-looks-like.md for the full quality standard.
Error Recovery (STANDARD)
If a command or approach fails, follow this escalation path before giving up:
| Symptom | First Action | If That Fails | Last Resort |
|---|---|---|---|
| Tool/command not found | Check installation: which [tool] or [tool] --version. Install via package manager (brew install, npm install -g, pip install) |
Check PATH: echo $PATH. Verify the tool binary is in a PATH directory. Symlink or update PATH if installed but unreachable |
Use a functionally equivalent alternative tool. If rg is unavailable, use grep -r. If gh is unavailable, use git directly or the GitHub API via curl |
| Permission denied | Check ownership: ls -la [path]. Fix with chmod or sudo if appropriate. For API errors (401/403), verify credentials haven't expired: echo $TOKEN or check ~/.netrc |
Refresh credentials: re-authenticate with the service. For file permissions, check if the file is locked by another process: lsof [path] |
Request elevated permissions or use a different authentication method (token vs password, SSH key vs HTTPS) |
| Command hangs or t |
*Truncated - read the full file at https://github.com/zeroes-ones/Skills/blob/a20a35e2eef7136945ce72e79af2b83a3193b59f/skills/08-security/compliance-officer/SKILL.md.