- name
- clawdbot-security
- description
- Security hardening for Clawdbot Gateway. Use when running security audits, interpreting audit findings, configuring DM/group policies, setting up sandboxing, managing elevated tools, extracting secrets to .env, or responding to security incidents. Also triggers on questions about prompt injection defense, access control, network exposure, or the three-layer security model (sandbox, tool policy, elevated).
Clawdbot Security
Harden Clawdbot Gateway deployments by fetching current security practices and applying them.
Fetch Current Docs First
Before advising on security, fetch the latest official documentation:
# Primary security guide
web_fetch https://raw.githubusercontent.com/clawdbot/clawdbot/main/docs/gateway/security.md
# Specific topics
web_fetch https://raw.githubusercontent.com/clawdbot/clawdbot/main/docs/gateway/sandboxing.md
web_fetch https://raw.githubusercontent.com/clawdbot/clawdbot/main/docs/gateway/authentication.md
web_fetch https://raw.githubusercontent.com/clawdbot/clawdbot/main/docs/gateway/pairing.mdQuick Commands
clawdbot security audit # Basic check
clawdbot security audit --deep # Live Gateway probe
clawdbot security audit --fix # Auto-apply safe fixes
clawdbot sandbox explain # Debug sandbox/tool policyDecision Tree
User needs help with security
├── Running audit or interpreting findings?
│ └── Run `clawdbot security audit`, explain findings, suggest fixes
├── Configuring access control (DM/group policies)?
│ └── Fetch security.md, explain pairing vs allowlist vs open
├── Setting up sandboxing?
│ └── Fetch sandboxing.md, explain mode/scope/workspaceAccess
├── Managing secrets in config?
│ └── Run scripts/extract_secrets.py or guide manual .env creation
├── Responding to incident?
│ └── Follow contain → rotate → audit workflow
└── General security question?
└── Fetch security.md, consult references/quick-reference.mdThree-Layer Model (Quick Summary)
- Sandbox — Where tools run (Docker vs host)
- Tool Policy — Which tools are allowed
- Elevated — Exec-only host escape hatch
For details, read references/quick-reference.md.
Extract Secrets Script
Automate moving hardcoded secrets from config to .env:
python scripts/extract_secrets.py --dry-run # Preview
python scripts/extract_secrets.py # ExecuteAudit Priority Order
- Open groups + tools → Lock down with allowlists
- Network exposure → Fix immediately
- Browser control → Require token auth
- File permissions →
chmod 600config,chmod 700dirs - Plugins → Only load trusted ones
- Model choice → Use instruction-hardened models (Opus 4.5)
Incident Response
- Contain: Stop gateway,
bind: "loopback", freeze policies - Rotate: gateway.auth.token, API keys, browser control token
- Audit: Check logs (
/tmp/clawdbot/*.log) and transcripts - Re-run:
clawdbot security audit --deep