Compliance Guide
Step-by-step compliance implementation
Go from non-compliant OpenClaw deployment to audit-ready production in 8 steps. This guide covers GDPR, HIPAA, and SOC2 — pick the sections relevant to your regulatory requirements.
Assess your compliance requirements
Determine which regulations apply to your organization and use case. Most organizations need at least one of the following:
- GDPR — if you process personal data of EU residents (applies to most organizations with EU customers)
- HIPAA — if you handle protected health information (healthcare providers, insurers, business associates)
- SOC2 — if you store or process customer data in a SaaS environment (expected by enterprise buyers)
Install ClawPine and choose a compliance profile
ClawPine wraps your existing OpenClaw setup. No infrastructure changes required.
# Install ClawPine npm install @clawpine/core @clawpine/cli # Initialize with a compliance profile clawpine init --profile gdpr # Or combine multiple profiles clawpine init --profile gdpr,hipaa # Verify the configuration clawpine config verify
Configure PII detection rules
ClawPine ships with built-in PII detectors for common patterns. Customize sensitivity and add organization-specific rules.
# clawpine.config.ts
export default {
pii: {
sensitivity: "high", // low | medium | high
mode: "redact", // detect | redact | block
builtinRules: [
"names", "emails", "phones",
"addresses", "ssn", "credit-cards",
"dates-of-birth", "ip-addresses"
],
customRules: [
{
name: "patient-id",
pattern: /PAT-\d{8}/g,
category: "PATIENT_ID",
action: "redact"
}
]
}
}Set up audit logging
Enable tamper-proof audit logging for all agent interactions. Logs capture the data flowing through your agents, actions taken, and compliance profile applied.
# clawpine.config.ts (continued)
export default {
audit: {
enabled: true,
storage: "managed", // managed | s3 | local
retention: "7 years", // HIPAA requires 6 years minimum
tamperProof: true, // cryptographic chain verification
includePayloads: false, // set true for full data lineage
exportFormats: ["csv", "json"],
}
}Configure data residency
Ensure agent data processing stays within approved geographic boundaries. Required for GDPR and often requested by enterprise customers.
# clawpine.config.ts (continued)
export default {
residency: {
region: "eu-west-1", // or "us-east-1", "ap-southeast-1"
allowedRegions: ["eu-west-1", "eu-central-1"],
blockCrossRegion: true, // fail if data would leave region
llmProvider: {
enforce: true, // only use LLM endpoints in region
fallback: "local" // use Ollama if no regional endpoint
}
}
}Add CI/CD compliance checks
Gate deployments on compliance status. ClawPine CLI returns non-zero exit codes on violations.
# Add to your CI pipeline clawpine scan ./agents --sensitivity high --fail-on-detect clawpine config verify --strict clawpine audit verify --since "24 hours ago"
Test with the compliance simulator
Before going to production, run the compliance simulator to verify your configuration handles edge cases correctly.
# Run compliance simulation clawpine simulate --profile gdpr --scenarios all # Test specific scenarios clawpine simulate --scenario "pii-in-prompt" clawpine simulate --scenario "cross-region-request" clawpine simulate --scenario "right-to-erasure" clawpine simulate --scenario "audit-export" # Generate a compliance readiness report clawpine report --output compliance-report.pdf
Deploy and monitor
Once your configuration passes simulation, deploy to production. ClawPine monitors compliance status continuously.
- PII detections are logged in real time — review flagged interactions in the dashboard
- Audit log integrity is verified on a rolling basis with alerts on anomalies
- Data residency violations trigger immediate alerts and optional request blocking
- Export compliance reports on demand for auditor requests or regulatory inquiries
Further reading
- GDPR compliance checklist — requirement-by-requirement breakdown
- HIPAA compliance checklist — safeguards and implementation details
- SOC2 compliance checklist — trust service criteria mapping
- API & CI/CD integration docs — full API reference and pipeline examples
- Security overview — infrastructure, encryption, and access controls