Audit openclaw security

From lxyeternal/MalSkillBench · View interactive version

Audit openclaw security is an AI agent skill from the GitHub repository lxyeternal/MalSkillBench. Audit and harden OpenClaw deployments and interpret `openclaw security audit` findings. Use when the user wants to secure OpenClaw, review gateway exposure/auth/reverse proxies/Tailscale Serve or Funnel, check DM/group access (pairing, allowlists, mention gating, `session.dmScope`), minimise tool pe

How to use this skill

Skill file

audit-openclaw-security

Run 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.

Guardrails

  1. Only audit systems the user owns or has explicit permission to assess.
  2. Never ask for raw secrets. Do not request gateway tokens/passwords, model API keys, session cookies, OAuth creds, or raw credential files.
  3. Prefer outputs that are designed to be shareable or redacted:
  1. Treat the Gateway, Control UI, browser control, paired nodes, and automation surfaces as operator-level access.
  2. Default to audit-only. Before any config edits, --fix operations, firewall changes, or restarts, create a backup first and get explicit user approval.
  3. When the user wants remediation, make the backup step explicit:

What “good” looks like

Use the bundled files progressively

Only open the extra files you need for the task:

Step 0 — Establish context quickly

Collect just enough context to choose the audit path:

Mode A — Assisted self-audit (chat-only)

Ask the user to run the following on the OpenClaw host and share the outputs.

Minimum audit set

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

Helpful extras

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

Safe targeted config reads

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

DM / group follow-up checks

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.

If the user must share the config

OpenClaw config is often JSON5-like. Redact it before sharing:

python3 "{baseDir}/scripts/redact_openclaw_config.py" ~/.openclaw/openclaw.json > openclaw.json.redacted

Host / network snapshots

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

Mode B — Automated local audit (shell access)

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.

Notes on the collector

How to interpret the audit

Use OpenClaw’s own security audit output as the primary source of truth, then translate it into a clear threat narrative.

Triage order

Prioritise in this order:

  1. Anything open + tools enabled

Lock down DMs/groups first, then tighten tool policy and sandboxing.

  1. Public network exposure

LAN bind, Funnel, missing auth, weak reverse-proxy handling.

  1. Browser / node / Control UI exposure

Treat these as operator access, not “just another feature”.

  1. Filesystem permissions

State dir, config file, auth profiles, logs, and transcript locations.

  1. Plugin / skill supply chain

Trust only what is intentionally installed and writable by the right user.

  1. Model and prompt-injection resilience

Important, but not a substitute for access control.

Findings that are easy to miss in newer OpenClaw builds

Pay extra attention to these newer or high-signal check IDs:

Use references/openclaw-audit-checks.md and assets/openclaw_checkid_map.json to map each finding to likely config paths and remediation areas.

Core remediation patterns

1) Gateway exposure and auth

2) Reverse proxies and browser-origin policy

If there is a reverse proxy in front of the Gateway:

3) Tailscale Serve vs Funnel

4) DM and group isolation

5) Tool surface reduction

Start from the conservative baseline in references/openclaw-baseline-config.md.

Good defaults for user-facing agents:

6) Node / browser / automation trust

7) Secrets, logs, transcripts, and writable paths

Audit and discuss these paths carefully without asking for raw contents:

Platform-specific guidance

Load the matching playbook when the environment is clear:

Deliverable format

Use assets/report-template.md or the rendered report from {baseDir}/scripts/render_report.py.

The final deliverable should include:

Troubleshooting notes

“openclaw: command not found”

“Gateway won’t start — configuration invalid”

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.

“Runtime: running” but “RPC probe: failed”

Trust the probe details, not just the supervisor status:

This often means service/config drift, auth mismatch, or a listener that is not actually reachable by the CLI.

“Bot is online but DMs fail”

Check:

openclaw channels status --probe
openclaw pairing list <channel>

Common root causes:

“Groups are silent”

Check:

Trigger tests (skill author sanity check)

Should trigger:

Should not trigger:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.