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.

1

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)
Tip: Not sure which applies? Start with our compliance assessment checklist at /compliance/gdpr, /compliance/hipaa, or /compliance/soc2.
2

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
Tip: Each profile pre-configures PII rules, audit logging, data residency, and retention policies for that regulation.
3

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"
      }
    ]
  }
}
Tip: Use sensitivity "high" for HIPAA. It catches partial matches and contextual PII that "medium" misses.
4

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"],
  }
}
Tip: For GDPR, set retention to match your data processing agreement. For HIPAA, minimum 6 years. SOC2 auditors typically want 1 year.
5

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
    }
  }
}
Tip: Enable blockCrossRegion for GDPR. This prevents accidental data transfers to non-EU LLM endpoints.
6

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"
Tip: See the full CI/CD integration docs at /docs for GitHub Actions and GitLab CI examples.
7

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
Tip: The readiness report is formatted for auditors. Share it with your compliance team or SOC2 auditor directly.
8

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
Tip: Set up webhook alerts for PII detections and residency violations. Integrate with Slack, PagerDuty, or your existing incident management.

Further reading