Running the Security Audit
OpenClaw includes a built-in security audit tool:
openclaw security audit --deep --fixThis scans for:
DM Policy Configuration
Control who can message your bot:
Pairing Mode (Recommended for Personal Use)
{
"channels": {
"whatsapp": {
"dmPolicy": "pairing"
}
}
}New contacts receive a pairing code they must enter to start messaging.
Allowlist Mode (Recommended for Business)
{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+1555123456", "+1555789012"]
}
}
}Only pre-approved numbers can interact with your bot.
Group Chat Policies
Restrict to Specific Groups
{
"channels": {
"telegram": {
"groupPolicy": "allowlist",
"allowedGroups": ["-1001234567890"]
}
}
}Group Policy Options
Sandboxing Tool Execution
Isolate potentially dangerous operations in Docker containers:
{
"sandbox": {
"enabled": true,
"docker": {
"image": "openclaw/sandbox:latest"
}
}
}File Permission Hygiene
Ensure proper permissions on your OpenClaw directory:
# Check permissions
ls -la ~/.openclaw# Fix permissions
chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json
chmod 600 ~/.openclaw/credentials/*
Credential Storage
Credentials are stored in ~/.openclaw/credentials/ with:
Never commit credentials to version control!
Reverse Proxy Security
If running behind nginx/Caddy/Traefik:
{
"gateway": {
"trustedProxies": ["127.0.0.1", "::1"]
}
}This ensures X-Forwarded-For headers are only trusted from your proxy.
Production Checklist
Before going live:
Enterprise Security
Need SOC 2 compliance or custom security configurations? Contact us for enterprise hardening services.