Install
openclaw skills install audit-openclaw-securityAudit and harden OpenClaw deployments and interpret `openclaw security audit` findings. Use when the user wants to secure OpenClaw, review gateway exposure/a...
openclaw skills install audit-openclaw-securityRun a defensive, permissioned security audit of an OpenClaw deployment and turn the results into a practical remediation plan.
This revision is tuned for OpenClaw 2026.3.8 and uses {baseDir} when referencing bundled scripts from commands.
openclaw status --allopenclaw status --deepopenclaw gateway probe --jsonopenclaw security audit --jsonopenclaw security audit --deep --json--fix operations, firewall changes, or restarts, create a backup first and get explicit user approval.openclaw backup create --verify--no-include-workspace if the config is invalid but you still need state + creds--only-config if the user only wants a minimal safety copy before editssession.dmScope is isolated appropriately:
per-channel-peer for most multi-user setupsper-account-channel-peer when the same provider runs multiple accountstools.profile: "messaging" or stricter for inbox-facing agentsgroup:runtime, group:fs, group:automation on untrusted surfacestools.fs.workspaceOnly: truetools.exec.security: "deny" or at least approval-gatedtools.elevated.enabled: false unless there is a narrow, intentional needOnly open the extra files you need for the task:
references/command-cheatsheet.md — exact command laddersreferences/openclaw-audit-checks.md — current high-signal checkId glossaryreferences/openclaw-baseline-config.md — secure baseline snippetsreferences/platform-mac-mini.mdreferences/platform-personal-laptop.mdreferences/platform-docker.mdreferences/platform-aws-ec2.mdassets/report-template.md — report structureCollect just enough context to choose the audit path:
Ask the user to run the following on the OpenClaw host and share the outputs.
openclaw --version
openclaw status --all
openclaw status --deep
openclaw gateway status
openclaw gateway probe --json
openclaw channels status --probe
openclaw doctor
openclaw security audit --json
openclaw security audit --deep --json
openclaw health --json
openclaw backup create --dry-run --json
openclaw backup create --only-config --dry-run --json
openclaw skills list --eligible --json
openclaw plugins list --json
Prefer targeted reads over a full config dump:
openclaw config get gateway.bind
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.allowTailscale
openclaw config get gateway.controlUi.allowedOrigins
openclaw config get gateway.trustedProxies
openclaw config get gateway.allowRealIpFallback
openclaw config get discovery.mdns.mode
openclaw config get session.dmScope
openclaw config get tools.profile
openclaw config get tools.fs.workspaceOnly
openclaw config get tools.exec.security
openclaw config get tools.elevated.enabled
openclaw config get channels.defaults.dmPolicy
openclaw config get channels.defaults.groupPolicy
openclaw config get logging.redactSensitive
If the issue is “the bot is online but DMs or groups behave strangely”, check pairing and mention gating:
openclaw pairing list <channel>
Examples of <channel> include discord, slack, signal, telegram, whatsapp, matrix, imessage, and bluebubbles.
OpenClaw config is often JSON5-like. Redact it before sharing:
python3 "{baseDir}/scripts/redact_openclaw_config.py" ~/.openclaw/openclaw.json > openclaw.json.redacted
macOS
whoami
sw_vers
uname -a
lsof -nP -iTCP -sTCP:LISTEN
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode
fdesetup status || true
Linux / cloud VM
whoami
cat /etc/os-release
uname -a
ss -ltnp
sudo ufw status verbose || true
sudo nft list ruleset || true
sudo iptables -S || true
Docker / Compose
docker ps --format 'table {{.Names}} {{.Image}} {{.Ports}}'
docker compose ps || true
docker port openclaw-gateway 18789 || true
Run the bundled collector and report renderer:
bash "{baseDir}/scripts/collect_openclaw_audit.sh" --out ./openclaw-audit
python3 "{baseDir}/scripts/render_report.py" --input ./openclaw-audit --output ./openclaw-security-report.md
Then review openclaw-security-report.md, refine wording where needed, and present the final report to the user.
openclaw security audit --fix.openclaw status --deepopenclaw gateway probe --jsonopenclaw channels status --probeconfig get valuesUse OpenClaw’s own security audit output as the primary source of truth, then translate it into a clear threat narrative.
Prioritise in this order:
Pay extra attention to these newer or high-signal check IDs:
gateway.control_ui.allowed_origins_requiredgateway.control_ui.host_header_origin_fallbackgateway.real_ip_fallback_enabledconfig.insecure_or_dangerous_flagssandbox.dangerous_network_modetools.exec.host_sandbox_no_sandbox_defaultstools.exec.host_sandbox_no_sandbox_agentstools.exec.safe_bins_interpreter_unprofiledskills.workspace.symlink_escapesecurity.exposure.open_groups_with_elevatedsecurity.exposure.open_groups_with_runtime_or_fssecurity.trust_model.multi_user_heuristicUse references/openclaw-audit-checks.md and assets/openclaw_checkid_map.json to map each finding to likely config paths and remediation areas.
gateway.bind: "loopback".gateway.remote.* values as protection for local WS access; actual protection comes from gateway.auth.*.openclaw doctor --generate-gateway-token is the safe boring path.If there is a reverse proxy in front of the Gateway:
gateway.trustedProxiesgateway.allowRealIpFallback: false unless there is a very specific needgateway.controlUi.allowedOriginstailscale.mode: "serve" keeps the Gateway tailnet-only.tailscale.mode: "funnel" is public and should be treated as urgent/high risk.gateway.auth.allowTailscale can allow tokenless Control UI/WebSocket auth via Tailscale identity headers. That assumes the gateway host itself is trusted.gateway.auth.allowTailscale and require token/password or trusted-proxy auth.dmPolicy: "pairing" or allowlist for inbox-facing bots.session.dmScope: "per-channel-peer".per-account-channel-peer.groupPolicy: "open" unless the tool surface is extremely limited.agents.list[].groupChat.mentionPatterns where native mentions are unreliable.Start from the conservative baseline in references/openclaw-baseline-config.md.
Good defaults for user-facing agents:
tools.profile: "messaging"group:automationgroup:runtimegroup:fstools.fs.workspaceOnly: truetools.exec.security: "deny" and ask: "always"tools.exec.applyPatch.workspaceOnly: truetools.elevated.enabled: falsegateway / cron tools create persistence and should not be reachable from untrusted chat surfaces.Audit and discuss these paths carefully without asking for raw contents:
~/.openclaw/openclaw.json~/.openclaw/secrets.json~/.openclaw/agents/<agentId>/agent/auth-profiles.json~/.openclaw/agents/<agentId>/sessions/*.jsonl/tmp/openclaw/openclaw-YYYY-MM-DD.log~/.openclaw/credentials/Load the matching playbook when the environment is clear:
references/platform-mac-mini.mdreferences/platform-personal-laptop.mdreferences/platform-docker.mdreferences/platform-aws-ec2.mdUse assets/report-template.md or the rendered report from {baseDir}/scripts/render_report.py.
The final deliverable should include:
PATH.openclaw --version.OpenClaw now fails closed on invalid config keys, invalid values, or invalid types. That is intentional and security-relevant.
Use:
openclaw doctor
openclaw doctor --fix
Even when the config is invalid, diagnostic commands such as openclaw status, openclaw gateway status, openclaw gateway probe, and openclaw health are still useful.
Trust the probe details, not just the supervisor status:
Probe targetListeningLast gateway errorThis often means service/config drift, auth mismatch, or a listener that is not actually reachable by the CLI.
Check:
openclaw channels status --probe
openclaw pairing list <channel>
Common root causes:
dmPolicy too strict for the expected senderCheck:
groupPolicyrequireMentionmentionPatternsShould trigger:
openclaw security audit --deep --json findings.”Should not trigger: