---
name: audit-openclaw-security
description: Audit an OpenClaw deployment's gateway exposure, authentication, channel access, tool permissions, and secret handling. Use for OpenClaw security reviews or interpreting openclaw security audit results, not unrelated host hardening.
license: MIT
compatibility: OpenClaw CLI and a local shell for collection; Python 3.10+ for helpers. JSON5 redaction requires json5 or pyjson5.
metadata:
  version: "3.0.0"
  reviewed: "2026-09-13"
title: audit-openclaw-security
canonical_url: https://skilld.dev/gh/tristanmanchester/agent-skills/audit-openclaw-security
last_updated: 2026-10-06T19:32:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [assets/openclaw_checkid_map.json](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/assets/openclaw_checkid_map.json), [assets/report-template.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/assets/report-template.md), [CHANGELOG.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/CHANGELOG.md), [references/command-cheatsheet.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/command-cheatsheet.md), [references/openclaw-audit-checks.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/openclaw-audit-checks.md), [references/openclaw-baseline-config.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/openclaw-baseline-config.md), [references/platform-aws-ec2.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/platform-aws-ec2.md), [references/platform-docker.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/platform-docker.md), [references/platform-mac-mini.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/platform-mac-mini.md), [references/platform-personal-laptop.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/references/platform-personal-laptop.md), [scripts/collect_openclaw_audit.sh](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/scripts/collect_openclaw_audit.sh), [scripts/redact_openclaw_config.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/scripts/redact_openclaw_config.py), [scripts/render_report.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/scripts/render_report.py), [tests/test_redaction.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/tests/test_redaction.py), [tests/test_review_regressions.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/audit-openclaw-security/tests/test_review_regressions.py).
>
> If the user asked to install this Skill, run `npx skilld install tristanmanchester/agent-skills/audit-openclaw-security`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/audit-openclaw-security`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/tristanmanchester/agent-skills/audit-openclaw-security) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/audit-openclaw-security`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/audit-openclaw-security --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/audit-openclaw-security --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Audit OpenClaw security

Audit systems the user owns or is authorised to assess. Start read-only; get approval for configuration changes, repairs, restarts, credential rotation, or exposure changes. Never request raw tokens, passwords, cookies, or credential stores.

## Establish the trust boundary

Record the installed OpenClaw version, host/container arrangement, gateway bind address, proxy/tunnel path, and who can send messages or invoke tools. One gateway is one trusted operator/team boundary, not isolation between mutually adversarial users. Use separate gateways and credentials for separate trust domains.

Host installs and container images can have different bind defaults. Inspect the running listener and published container ports rather than inferring exposure from the install method.

## Collect evidence

Resolve `SKILL_DIR` to the directory containing this file. Bundled paths are relative to that directory, not the project being audited. Keep output local and private until reviewed.

```bash
openclaw --version
openclaw security audit --help
openclaw security audit --json
openclaw security audit --deep --json
```

For a fuller host/network capture, run the bundled collector and renderer:

```bash
bash "$SKILL_DIR/scripts/collect_openclaw_audit.sh" --out ./openclaw-audit
python3 "$SKILL_DIR/scripts/render_report.py" --input ./openclaw-audit --output ./openclaw-security-report.md
```

Record failures and unsupported commands as missing evidence, never as passed checks. The renderer is a report aid, not a proof that the deployment is secure. CLI diagnostics can include private identifiers or sensitive free text; inspect them before sharing.

## Redact configuration only when necessary

Prefer targeted reads of non-secret settings over complete configuration exports. When a configuration must be shared:

```bash
python3 "$SKILL_DIR/scripts/redact_openclaw_config.py" ~/.openclaw/openclaw.json > openclaw.redacted.json
```

The helper parses JSON/JSON5, replaces complete values of sensitive fields, and removes credentials from URLs. It returns a non-zero status with empty stdout on invalid input. Install a JSON5 parser when required; do not fall back to regex editing of raw configuration. Comments disappear during parsing. Review unknown fields and free text manually: redaction is not an exhaustive secret detector. The output is not a restorable backup.

## Triage and remediate

1. Contain public exposure and open message surfaces with runtime/filesystem/elevated tools.
2. Verify gateway authentication, allowed origins, trusted proxies, and the real client-identity path. Tailscale Serve and public Funnel have different exposure; neither substitutes for checking access policy.
3. Review DM pairing/allowlists, group access, mention gates, and session isolation. A mention gate controls triggering, not a hostile-user security boundary.
4. Restrict tool, browser, node, plugin, and automation permissions to the task. Test the effective policy, not just its intended configuration.
5. Review credential, transcript, and log permissions and retention. Treat installed plugins and writable skills as executable supply-chain inputs.
6. For each approved change, capture the previous configuration securely, apply one coherent change, then rerun the relevant audit and functional checks. Preserve a rollback path.

Use the installed CLI and current official configuration schema for exact keys. Do not infer safety from an old check-ID list or blindly paste a platform baseline.

## Load supporting material when needed

- `references/platform-mac-mini.md`, `references/platform-personal-laptop.md`, `references/platform-docker.md`, or `references/platform-aws-ec2.md`: platform investigation prompts.
- `references/openclaw-audit-checks.md` and `assets/openclaw_checkid_map.json`: explanations for known findings; an unknown current check still needs triage.
- `assets/report-template.md`: final report structure.

Report scope/version, observed findings with redacted evidence, severity and impact, approved changes, verification results, and untested boundaries. Separate observations from proposals.

## Sources and validation

Reviewed 2026-09-13 against [OpenClaw security](https://docs.openclaw.ai/gateway/security), including its current trust-model, audit, network-exposure, and secrets sections. Consult those pages before changing security policy.

Run the offline redaction regressions with:

```bash
python3 -m unittest discover -s "$SKILL_DIR/tests" -v
```
