1kalin/afrexai-compliance-engine/SKILL.md
# Compliance & Audit Readiness Engine Your AI compliance officer. Guides startups and scale-ups through SOC 2, ISO 27001, GDPR, HIPAA, and PCI DSS — from zero to audit-ready. No consultants needed. --- ## Phase 1 — Compliance Discovery ### Framework Selection Matrix | Framework | Who Needs It | Trigger | Timeline | Cost Range | |-----------|-------------|---------|----------|------------| | **SOC 2 Type I** | Any B2B SaaS | Enterprise prospect asks | 3-6 months | $20K-$80K | | **SOC 2 Type
npx skillsauth add openclaw/skills 1kalin/afrexai-compliance-engineInstall 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.
Your AI compliance officer. Guides startups and scale-ups through SOC 2, ISO 27001, GDPR, HIPAA, and PCI DSS — from zero to audit-ready. No consultants needed.
| Framework | Who Needs It | Trigger | Timeline | Cost Range | |-----------|-------------|---------|----------|------------| | SOC 2 Type I | Any B2B SaaS | Enterprise prospect asks | 3-6 months | $20K-$80K | | SOC 2 Type II | Established SaaS | After Type I, or direct | 6-12 months | $30K-$100K | | ISO 27001 | Global/EU-facing SaaS | EU enterprise deals | 6-12 months | $40K-$120K | | GDPR | Anyone with EU users | Day 1 if EU data | 1-3 months | $5K-$30K | | HIPAA | Health data handlers | Before first PHI | 3-6 months | $20K-$60K | | PCI DSS | Payment processors | Before card data | 3-9 months | $15K-$50K | | SOX | Public companies | IPO prep | 12-18 months | $100K-$500K |
company_profile:
name: ""
industry: ""
employee_count: 0
annual_revenue: ""
data_types_handled:
- PII (names, emails, addresses)
- Financial (payment cards, bank accounts)
- Health (PHI, medical records)
- Children (COPPA scope)
- Biometric
- Government/classified
customer_segments:
- SMB
- Mid-market
- Enterprise
- Government
geographic_scope:
- US only
- US + EU
- Global
current_state:
existing_frameworks: []
security_team_size: 0
has_written_policies: false
has_asset_inventory: false
has_risk_assessment: false
has_incident_response: false
has_vendor_management: false
previous_audits: []
known_gaps: []
drivers:
- Customer requirement
- Board/investor mandate
- Regulatory obligation
- Competitive advantage
- Insurance requirement
target_frameworks: []
target_date: ""
budget_range: ""
SOC 2 is built on 5 categories. Security is mandatory. Others are optional but often expected.
Availability (A1):
Confidentiality (C1):
Processing Integrity (PI1):
Privacy (P1):
| Week | Phase | Key Activities | |------|-------|---------------| | 1-2 | Scoping | Define system boundaries, select TSC, choose auditor | | 3-4 | Gap Assessment | Audit current state against TSC, document gaps | | 5-6 | Policy Writing | Draft all required policies (see policy list below) | | 7-8 | Control Implementation | Deploy technical controls, configure tools | | 9-10 | Process Implementation | Establish operational processes, train team | | 11-12 | Evidence Collection | Gather evidence for all controls, test internally | | 13-14 | Readiness Assessment | Mock audit, remediate findings | | 15-16 | Type I Audit | Auditor fieldwork, management response, report |
# [Policy Name]
**Version:** 1.0
**Owner:** [Name, Title]
**Approved by:** [Name, Title]
**Effective date:** [Date]
**Next review:** [Date + 1 year]
**Classification:** Internal
## 1. Purpose
[Why this policy exists — 2-3 sentences]
## 2. Scope
[Who and what this policy applies to]
## 3. Policy Statements
[Numbered, actionable requirements — not aspirational]
### 3.1 [Topic]
- SHALL [requirement]
- SHALL NOT [prohibition]
- SHOULD [recommendation]
## 4. Roles & Responsibilities
| Role | Responsibility |
|------|---------------|
| [Role] | [What they must do] |
## 5. Exceptions
[Process for requesting exceptions — who approves, how long, documentation]
## 6. Enforcement
[Consequences of non-compliance]
## 7. Definitions
[Technical terms used in the policy]
## 8. Related Documents
[Links to related policies, standards, procedures]
## 9. Revision History
| Version | Date | Author | Changes |
|---------|------|--------|---------|
| 1.0 | [Date] | [Author] | Initial release |
| Category | Controls | Key Areas | |----------|----------|-----------| | A.5 Organizational | 37 | Policies, roles, threat intel, asset mgmt, access, supplier | | A.6 People | 8 | Screening, T&C, awareness, disciplinary, termination | | A.7 Physical | 14 | Perimeters, entry, offices, monitoring, utilities, cabling | | A.8 Technological | 34 | Endpoints, access rights, auth, malware, vuln mgmt, logging, crypto, SDLC |
| SOC 2 TSC | ISO 27001 Annex A | Overlap | |-----------|------------------|---------| | CC1 Control Environment | A.5.1-5.6 (Org controls) | ~80% | | CC2 Communication | A.5.1, A.6.3 (Awareness) | ~70% | | CC3 Risk Assessment | Clause 6.1, A.5.7 (Threat intel) | ~90% | | CC5 Control Activities | A.8 (Technological) | ~75% | | CC6 Access | A.5.15-5.18, A.8.1-8.5 | ~85% | | CC7 Operations | A.8.7-8.16 (Monitoring) | ~80% | | CC8 Change Mgmt | A.8.25-8.33 (SDLC) | ~70% | | CC9 Vendors | A.5.19-5.23 (Supplier) | ~85% |
Strategy: Build for one framework, extend to the other. SOC 2 first (faster) → ISO 27001 (adds clauses 4-10 management system).
Lawful Basis for Processing — Document legal basis for each data processing activity
Data Subject Rights — Respond within 30 days
Privacy by Design & Default — Build privacy into products
Data Protection Officer (DPO) — Required if:
Consent Management
Data Processing Agreements (DPAs)
International Transfers
Breach Notification
Records of Processing Activities (ROPA)
processing_activity:
name: ""
purpose: ""
lawful_basis: ""
data_categories: []
data_subjects: []
recipients: []
retention_period: ""
transfers_outside_eea: false
transfer_mechanism: ""
technical_measures: []
organizational_measures: []
dpia_required: false
last_reviewed: ""
Privacy Notice — Must include:
Data Retention Schedule
| Data Type | Retention Period | Legal Basis | Disposal Method | |-----------|-----------------|-------------|-----------------| | Customer PII | Duration + 3 years | Contract + legitimate interest | Automated deletion | | Employee records | Duration + 7 years | Legal obligation | Secure shred | | Financial records | 7 years | Legal obligation | Secure shred | | Server logs | 90 days | Legitimate interest | Automated rotation | | Marketing consent | Until withdrawn | Consent | Database purge | | Support tickets | 2 years after resolution | Legitimate interest | Automated deletion |
| # | Requirement | Key Controls | |---|------------|-------------| | 1 | Install/maintain network security controls | Firewalls, network segmentation | | 2 | Apply secure configurations | No vendor defaults, CIS benchmarks | | 3 | Protect stored account data | Encryption, masking, key mgmt | | 4 | Encrypt transmission over open networks | TLS 1.2+, no SSL/early TLS | | 5 | Protect from malicious software | Anti-malware, regular updates | | 6 | Develop secure systems | SDLC, vuln mgmt, WAF | | 7 | Restrict access by business need | RBAC, least privilege | | 8 | Identify users and authenticate | MFA, password standards | | 9 | Restrict physical access | Badges, cameras, visitor logs | | 10 | Log and monitor all access | Centralized logging, review | | 11 | Test security regularly | Vuln scans, pen tests, IDS | | 12 | Support security with policies | Policies, training, incident response |
SAQ Decision:
| Category | Budget Option | Mid-Range | Enterprise | |----------|-------------|-----------|-----------| | GRC Platform | Notion/Sheets | Vanta, Drata | ServiceNow, OneTrust | | Policy Mgmt | Google Docs + versioning | Vanta policies | Hyperproof | | Vulnerability Scanning | OWASP ZAP, Trivy | Qualys, Tenable | Rapid7 | | SIEM/Logging | ELK Stack, Wazuh | Datadog, Sumo Logic | Splunk | | Endpoint Protection | CrowdStrike Falcon Go | SentinelOne | CrowdStrike Enterprise | | Identity/Access | Google Workspace + Okta | JumpCloud | Azure AD P2 | | Training | KnowBe4 Free | KnowBe4 | Proofpoint | | Pen Testing | HackerOne Community | Cobalt | Bishop Fox | | Backup | Native cloud backups | Veeam | Commvault |
What to automate (saves 70%+ of audit prep):
# Infrastructure compliance
- Terraform with Sentinel policies (enforce encryption, tagging)
- OPA/Rego for Kubernetes admission control
- AWS Config Rules / Azure Policy for cloud compliance
- GitHub branch protection rules as change management evidence
# Application compliance
- Automated dependency scanning in CI (Snyk, Dependabot)
- SAST in PR pipeline (Semgrep, CodeQL)
- Container scanning (Trivy, Grype)
- License compliance (FOSSA, Licensee)
Days 90-60: Foundation
Days 60-30: Evidence Gathering
Days 30-0: Final Prep
/compliance-evidence/
/SOC2-2026/
/CC1-control-environment/
org-chart.pdf
code-of-conduct-signed.pdf
background-check-process.pdf
/CC2-communication/
security-training-completion.csv
security-policy-acknowledgments.pdf
/CC3-risk-assessment/
risk-assessment-2026.xlsx
risk-treatment-plan.pdf
/CC6-access/
access-review-Q1.pdf
access-review-Q2.pdf
mfa-enforcement-screenshot.png
offboarding-checklist-samples/
/CC7-operations/
vulnerability-scan-reports/
pentest-report-2026.pdf
incident-log-2026.csv
/CC8-change-management/
sample-change-tickets/
deployment-pipeline-config.png
/CC9-vendors/
vendor-inventory.xlsx
vendor-assessments/
dpas-and-baas/
Common questions and who should answer:
| Question | Best Respondent | Key Points | |----------|----------------|-----------| | "Walk me through your risk assessment process" | CISO/Security Lead | Methodology, frequency, treatment | | "How do you manage access to production?" | Engineering Lead | RBAC, approval flow, reviews | | "Describe your change management process" | Engineering Lead | PR review, testing, deployment | | "How do you handle security incidents?" | Security Lead | Detection, response, communication | | "How do you evaluate vendors?" | Security/Procurement | Assessment, monitoring, contracts | | "Describe your backup and recovery process" | Infrastructure Lead | Schedule, testing, RTO/RPO | | "How do you track and remediate vulnerabilities?" | Security Lead | Scanning, SLAs, patching | | "Walk me through employee onboarding/offboarding" | HR + IT | Checklist, timing, verification |
compliance_dashboard:
month: ""
control_health:
total_controls: 0
controls_passing: 0
controls_failing: 0
controls_not_tested: 0
health_percentage: 0
action_items:
open: 0
overdue: 0
closed_this_month: 0
key_metrics:
mean_time_to_patch_critical: ""
access_reviews_completed: "X/X"
security_training_completion: ""
incidents_this_month: 0
vendor_reviews_due: 0
policies_due_for_review: 0
risk_register:
high_risks: 0
risks_without_treatment: 0
new_risks_identified: 0
upcoming:
next_pen_test: ""
next_dr_test: ""
next_audit: ""
next_access_review: ""
| Frequency | Activity | |-----------|----------| | Weekly | Review security alerts, patch critical vulln | | Monthly | Control testing sample, metrics dashboard, policy exception review | | Quarterly | Access reviews, vendor risk check, risk register update, tabletop exercise | | Semi-annual | Vulnerability scan (external), BCP/DR test, security training refresh | | Annual | Full risk assessment, penetration test, policy review cycle, SOC 2/ISO audit, security awareness training, management review |
compliance_debt:
- id: "CD-001"
framework: "SOC 2"
control: "CC6.1"
finding: "MFA not enforced on staging environment"
severity: "High"
identified: "2026-01-15"
owner: ""
target_remediation: "2026-02-15"
status: "In Progress"
compensating_control: "VPN + IP allowlisting"
Severity-based response:
| Severity | Response Time | Actions | |----------|-------------|---------| | Critical | 24 hours | Immediate remediation, notify management, consider if breach occurred | | High | 7 days | Remediation plan, compensating control if needed, risk acceptance by CISO | | Medium | 30 days | Add to sprint, track in compliance debt | | Low | 90 days | Batch with next review cycle |
Build controls ONCE, map to MULTIPLE frameworks:
control:
id: "CCF-AC-001"
title: "Multi-Factor Authentication"
description: "MFA required for all access to production systems and sensitive data"
owner: "Security Team"
framework_mapping:
soc2: ["CC6.1", "CC6.6"]
iso27001: ["A.8.5"]
gdpr: ["Article 32"]
hipaa: ["§164.312(d)"]
pci_dss: ["Req 8.4"]
evidence:
- type: "Configuration screenshot"
source: "Okta MFA policy"
frequency: "Quarterly"
- type: "Access review"
source: "Okta user report"
frequency: "Quarterly"
test_procedure: "Verify MFA policy is enforced, test with non-MFA login attempt"
last_tested: ""
result: ""
next_test: ""
Year 1: SOC 2 Type I → establishes baseline Year 1-2: SOC 2 Type II → proves sustained operation Year 2: + GDPR → covers EU expansion Year 2-3: + ISO 27001 → international credibility As needed: + HIPAA / PCI DSS → industry-specific
| Dimension | Weight | Score 0-10 | |-----------|--------|-----------| | Policy Coverage — All required policies exist, reviewed, approved | 15% | | | Technical Controls — Security tools deployed and configured | 20% | | | Process Maturity — Operational processes followed consistently | 20% | | | Evidence Quality — Complete, organized, recent evidence | 15% | | | Training & Awareness — All employees trained, records maintained | 10% | | | Vendor Management — All critical vendors assessed and contracted | 10% | | | Risk Management — Current assessment, treatment plans, monitoring | 10% | |
Scoring guide:
Interpretation:
| Command | What It Does | |---------|-------------| | "Assess our compliance readiness" | Run readiness assessment, score, identify gaps | | "Create SOC 2 project plan" | Generate 16-week implementation timeline | | "Write [policy name] policy" | Generate policy from template with your context | | "Map controls across frameworks" | Build common control framework mapping | | "Prepare for audit" | Generate 90-day audit prep checklist with evidence needs | | "Review our GDPR compliance" | Check all 12 GDPR requirements against current state | | "Score our compliance posture" | Run 7-dimension scoring rubric | | "Generate evidence checklist" | List all evidence needed for specific framework | | "Build vendor assessment" | Create vendor risk assessment for a specific vendor | | "Plan framework expansion" | Recommend next framework based on business needs | | "Track compliance debt" | Review and prioritize open compliance items | | "Run monthly compliance review" | Update dashboard, check deadlines, identify actions |
tools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。