Skip to main content
Follow these security best practices to deploy ZeroClaw safely in production.

Principle: Defense in Depth

ZeroClaw implements multiple security layers:
  1. Authentication - Pairing codes, API keys, allowlists
  2. Authorization - Autonomy levels, approval prompts
  3. Validation - Command filtering, path checking
  4. Sandboxing - Process isolation, resource limits
  5. Monitoring - Audit logs, anomaly detection

Authentication

API Keys

Never commit API keys to version control.
Best practices:

Gateway Pairing

Always enable pairing for internet-exposed gateways:
Pairing workflow:
1

Start gateway

Generates one-time pairing code: AB12-CD34
2

Client pairs

Returns session token.
3

Use token

Channel Allowlists

Restrict who can interact with the agent:

Authorization

Autonomy Levels

Control tool execution permissions:

Tool Allowlists

Disable unused tools:

Validation

Command Filtering

Block dangerous shell commands:

Path Validation

Enforce workspace boundaries:

Network Restrictions

Limit outbound connections:

Sandboxing

Landlock (Linux)

Filesystem sandboxing with Landlock LSM:

Process Limits

Prevent resource exhaustion:

Timeout Enforcement

Limit execution time:

Monitoring

Audit Logging

Enable comprehensive audit logs:
Audit log format:

Anomaly Detection

Monitor for unusual behavior:

Rate Limiting

Prevent abuse:

Network Security

TLS/HTTPS

Always use TLS for public endpoints:
Generate self-signed cert for testing:

Reverse Proxy

Use nginx or Caddy in front of gateway:

Firewall Rules

Restrict access to gateway:

Secret Management

Environment Variables

Never hardcode secrets:

Secret Rotation

Rotate API keys regularly:
1

Generate new key

Create new key in provider dashboard
2

Update environment

3

Restart service

4

Verify

5

Revoke old key

Delete old key from provider dashboard

Incident Response

When security incidents occur:
1

Isolate

Stop the affected service:
2

Investigate

Review audit logs:
3

Remediate

  • Revoke compromised credentials
  • Update security policies
  • Patch vulnerabilities
4

Restore

Restart with updated configuration:
5

Document

Record incident in security log

Compliance

Data Retention

Configure retention policies:

PII Handling

Redact sensitive information:

Security Checklist

Before deploying to production:
  • API keys in environment variables, not config files
  • Gateway pairing enabled
  • Channel allowlists configured
  • Autonomy level set to supervised or semi-autonomous
  • Dangerous commands blocked
  • Workspace path restricted
  • TLS/HTTPS enabled for public endpoints
  • Rate limiting configured
  • Audit logging enabled
  • Resource limits set
  • Firewall rules applied
  • Regular backups configured
  • Incident response plan documented