OpenClaw Best Practices: A 15-Point Security Checklist

Reviewed by Ali Aleali, CISSP, CCSP · Last reviewed December 3, 2026

What are the OpenClaw best practices for security? OpenClaw best practices for security fall into five areas: contain the agent, keep the Gateway private, control who can message the agent, cut the tool list to the task, and check the install on a schedule. OpenClaw describes itself as "local-first agent infrastructure for trusted operators" (SECURITY.md), so most of the hardening is configuration the operator owns. Each item below gives the reason and the exact setting or command from the official OpenClaw documentation.

At a glance

  • Isolation (checks 1-3): contain the agent on the host
  • Network and Gateway (checks 4-5): keep the Gateway private
  • Identity and credentials (checks 6-8): control who can message the agent
  • Skills and tools (checks 9-12): cut the tool list to the task
  • Monitoring and response (checks 13-15): check the install on a schedule

The OpenClaw security guide explains the risks behind each item, and Is OpenClaw Safe? answers the yes/no question for teams still deciding.

How do you contain an OpenClaw agent on the host?

Isolation limits how far a hijacked OpenClaw agent can reach on the host.

ISOLATION: CHECKS 1-3

1. Run one OpenClaw Gateway per trust boundary.

Why: "Everyone who can message a tool-enabled agent shares that agent's delegated tool authority," and one shared Gateway for mutually untrusted users is listed as "Not supported" (trust model).

Setting: one OS user, host or VPS per boundary, as the trust model recommends. Separate teams with separate data get separate Gateways.

2. Turn on the OpenClaw sandbox.

Why: "Sandboxing is off by default and controlled by agents.defaults.sandbox" (sandboxing), and without the sandbox absolute paths can reach elsewhere on the host (agent workspace).

Setting: agents.defaults.sandbox.mode set to "all" (or "non-main") (sandboxing). Docker is the default local backend. Podman, SSH, OpenShell and Crabbox are the alternatives. "The Gateway process itself remains unsandboxed," so items 4 and 5 still apply.

3. Keep OpenClaw file tools inside the workspace.

Why: the default workspace, ~/.openclaw/workspace, is "the default cwd, not a hard sandbox" (agent workspace).

Setting: tools.fs.workspaceOnly: true, from the hardened baseline.

Key insight

OpenClaw sandboxing is off by default, and the Gateway stays outside the sandbox

OpenClaw sandboxing is controlled by agents.defaults.sandbox.mode, with modes off, non-main and all. The Gateway process itself stays unsandboxed, so network binding, auth and tool policy still need hardening once the sandbox is on.

How do you keep the OpenClaw Gateway private?

The OpenClaw Gateway owns every messaging channel and accepts control-plane clients over WebSocket on port 18789 (architecture), so the bind address and auth of the Gateway control who can reach the agent's controls.

NETWORK AND GATEWAY: CHECKS 4-5

4. Bind the OpenClaw Gateway to loopback, including in Docker.

Why: loopback is the default on regular hosts, but in containers the default auto bind resolves to 0.0.0.0 (network exposure). Censys counted 21,639 publicly exposed instances on January 31, 2026 (Censys).

Setting: gateway.mode: "local" and gateway.bind: "loopback". Check the bind explicitly in any OpenClaw Docker deployment.

5. Require a long random token, and use Tailscale Serve for remote access.

Why: Bitsight reported that a trivial token such as "a" was accepted on Bitsight's test instance, and that honeypot probes "arrived within minutes" (Bitsight).

Setting: gateway.auth.mode: "token" with a long random token. Non-loopback startup "requires configured auth and fails closed without it." For remote access the docs say to "prefer Tailscale Serve over LAN binds" and to "never expose the Gateway unauthenticated on 0.0.0.0" (network exposure). Serve "keeps the Gateway on loopback and Tailscale handles access," so the bind stays loopback.

Watch out

In containers, the default OpenClaw Gateway bind resolves to 0.0.0.0

On regular hosts the default bind is loopback. In containers the default auto bind resolves to 0.0.0.0, and Censys counted 21,639 publicly exposed OpenClaw instances on January 31, 2026. Check the bind explicitly in any OpenClaw Docker deployment.

How do you control who can instruct an OpenClaw agent?

In OpenClaw, anyone who can message the agent can use the agent's tools, so sender control is identity control.

IDENTITY AND CREDENTIALS: CHECKS 6-8

6. Set the DM policy to pairing or allowlist.

Why: with pairing, unknown senders get a short code and "their message is not processed until you approve" (pairing).

Setting: dmPolicy: "pairing" under each channel, for example channels.whatsapp.dmPolicy in the hardened baseline or channels.slack.dmPolicy with an allowFrom list (Slack config). The modes are pairing, allowlist, open and disabled. Review and approve with openclaw pairing list telegram and openclaw pairing approve telegram <CODE>. Codes are 8 characters and expire after 1 hour.

7. Require a mention in groups and scope DM sessions per sender.

Why: pairing approval grants "direct-message access only. It does not grant group access," so groups need their own rule (pairing).

Setting: groups: { "*": { requireMention: true } } under the WhatsApp channel (Slack sets requireMention per channel under channels.slack.channels), plus session.dmScope: "per-channel-peer", both from the hardened baseline.

8. Give every OpenClaw agent dedicated credentials, and keep keys out of plaintext environment variables.

Why: China's CNCERT/CC advised "avoiding storing keys in plaintext environment variables" (CGTN), and GHSA-8rh7-6779-cjqq let a working-directory .env file inject variables and take over config (fixed in 2026.3.28).

Setting: dedicated accounts and API keys per agent, scoped to the agent's task. Never put provider keys in a workspace .env (OpenClaw blocks provider credentials from untrusted workspace .env files), and protect ~/.openclaw/, which holds the config, channel credentials and token stores (secrets and storage). For Claude on Google Vertex AI, the anthropic-vertex provider authenticates with ADC or a service account (provider docs).

Approving OpenClaw for real work? Have the deployment reviewed against these 15 checks. Book a security architecture review

How do you limit what an OpenClaw agent can do?

Every enabled OpenClaw tool is authority any approved sender can use.

SKILLS AND TOOLS: CHECKS 9-12

9. Start from the messaging tool profile and deny high-risk tool groups.

Why: the hardened baseline removes automation, runtime, file system and cross-session tools from a messaging agent by default (hardened baseline).

Setting:

  • tools.profile: "messaging"
  • tools.deny: ["group:automation", "group:runtime", "group:fs", "sessions_spawn", "sessions_send"]
  • tools.elevated.enabled: false
  • tools.agentToAgent.enabled: false
  • tools.sessions.visibility: "agent"

Inspect and test the result with openclaw policy (security).

10. Set exec to deny, or to allowlist with approvals.

Why: exec security defaults to full on gateway and node hosts, and the ask mode defaults to off (exec approvals).

Setting: tools.exec.security: "deny" and tools.exec.ask: "always". Where the agent needs commands, use security: "allowlist" with ask: "on-miss" or "always", and set tools.exec.strictInlineEval: true (default false) so inline code-eval forms need approval.

11. Turn off web and browser tools unless a task needs them, and read untrusted content with a separate agent.

Why: "even if only you can message the bot, any untrusted content it reads...can carry adversarial instructions" (prompt injection). Zenity Labs showed a document with an injected instruction leading to full host compromise, with "no software vulnerability" required (Zenity Labs).

Setting:

  • Disable exec, browser, web_fetch and web_search where unused.
  • Give untrusted content to a "read-only or tool-disabled reader agent".
  • Use mention gating and contextVisibility "so the agent reads what it needs and no more".
  • Keep the allowUnsafeExternalContent bypass flags (hooks.mappings[].allowUnsafeExternalContent, hooks.gmail.allowUnsafeExternalContent and the cron payload field) off in production (prompt injection).

12. Read every third-party OpenClaw skill before installing the skill.

Why: Koi Security found 341 malicious skills among 2,857 audited on ClawHub (The Hacker News), and ClawHub's VirusTotal scanning "won't catch" a skill that uses natural language to instruct the agent to do something malicious (OpenClaw blog).

Setting:

  • Read the skill's SKILL.md first.
  • Install per agent with openclaw skills install @owner/<slug> and keep --global for skills every local agent needs (skills).
  • Keep a plugin allowlist in plugins.allow, which leaves tools from unlisted plugins unavailable "even when tools.allow includes "*"" (plugins).

Watch out

OpenClaw exec security defaults to full, with the ask mode off

On gateway and node hosts, OpenClaw exec security defaults to full and the ask mode defaults to off. Set tools.exec.security to deny, or to allowlist with approvals (item 10).

How do you check and patch an OpenClaw install?

OpenClaw monitoring covers three things: the configuration, the files the agent loads at startup, and the release version.

MONITORING AND RESPONSE: CHECKS 13-15

13. Run the OpenClaw security audit on a schedule and after every config change.

Why: the audit checks whether strangers can trigger the bot, gateway auth, token strength, browser control and CDP endpoints, file permissions and plugin allowlists (running the audit).

Setting:

  • openclaw security audit --deep for a live Gateway check.
  • --json to send results to a SIEM or ticket queue.
  • --fix to "apply safe remediations."

14. Watch OpenClaw workspace files and scheduled jobs for changes.

Why: in the Zenity Labs chain, the attacker modified SOUL.md and added a scheduled task to "periodically reinject attacker-controlled instructions" (Zenity Labs).

Setting: file integrity monitoring on ~/.openclaw/workspace (SOUL.md, AGENTS.md, MEMORY.md, IDENTITY.md). Review jobs with openclaw automations (alias openclaw cron) (automations).

15. Track OpenClaw advisories and patch quickly.

Why: the repository listed 723 published security advisories on December 2, 2026, 14 of them critical (advisories), including GHSA-9p3r-hh9g-5cmg (sandbox escape, fixed in 2026.3.31).

Setting: watch the repository's security advisories. Compare the installed version (openclaw --version, CLI) against each fix. CNCERT/CC also advised installing extensions "only from trusted and verified channels" and disabling their automatic updates.

How do you check an OpenClaw install for security gaps in 10 minutes?

Run the OpenClaw security audit for a first read on an existing install in about ten minutes.

  1. Run openclaw security audit --deep. Read every finding, starting with gateway auth and "can strangers trigger the bot?"
  2. Compare the config with the hardened baseline. Confirm gateway.bind: "loopback", gateway.auth.mode: "token", dmPolicy: "pairing" and tools.exec.security: "deny" (or allowlist).
  3. Run openclaw policy. Confirm the tools each agent can call match the job of the agent.
  4. Run openclaw pairing list telegram (or the channel in use) and reject any request from an unknown sender.
  5. Run openclaw automations. Remove any job nobody on the team created.
  6. Run openclaw security audit --fix, review what changed, then run the deep audit again.
  7. Save openclaw security audit --json output with the date. The file becomes evidence for the control mapping below.

How do OpenClaw security controls map to SOC 2 and ISO 27001?

Evidence from the 15 OpenClaw controls supports three SOC 2 criteria and three ISO 27001:2022 controls. Build the controls for security first. The mapping follows.

OpenClaw control area Checklist items SOC 2 criterion ISO 27001:2022 control
Who and what can reach the agent and the tools of the agent 1-12 CC6.1 Logical access security A.5.15 Access control
Audit runs, file and job monitoring 13, 14 CC7.2 Monitoring for anomalies A.8.16 Monitoring activities
Patching, skill installs, config changes 12, 13, 15 CC8.1 Change management A.8.32 Change management

The agentic AI security architecture guide applies the same controls to any AI agent, from inventory and autonomy tiers to audit logging and incident response.

Who can review an OpenClaw deployment before production launch?

If your team is approving OpenClaw for real work, Truvo reviews the deployment against this checklist and maps the findings to the SOC 2 and ISO 27001 evidence your customers ask for. Truvo also tested several of these controls in the Truvo OpenClaw lab. The build is in How to Set Up OpenClaw Safely on a Mac, and the findings are in OpenClaw Security Audit: What We Found in a Default Install. Book a security architecture review, or start with the AI penetration testing service.

Review your OpenClaw deployment before launch

Fit OpenClaw into an effective security program before the agent touches company accounts.

 

Frequently Asked Questions About OpenClaw Security Best Practices

What are the most important OpenClaw security best practices?

Bind the Gateway to loopback with token auth, set DM policy to pairing or allowlist, turn on sandboxing, set exec to deny or allowlist, and read third-party skills before installing them. Run openclaw security audit --deep after every config change, and patch promptly.

Is OpenClaw sandboxed by default?

OpenClaw sandboxing is off by default and is controlled by agents.defaults.sandbox.mode, with modes off, non-main and all. Docker is the default local backend. The Gateway process itself stays unsandboxed, so network binding, auth and tool policy still need hardening once the sandbox is on.

How do I check whether an OpenClaw install is secure?

Run openclaw security audit --deep. The audit checks DM and group policies, gateway auth, token strength, browser control, file permissions and plugin allowlists against the live Gateway. --fix applies safe remediations, and --json produces output to keep as evidence.

Should the OpenClaw Gateway be reachable from the internet?

OpenClaw docs recommend keeping the Gateway on loopback, preferring Tailscale Serve over LAN binds for remote access, and never exposing the Gateway unauthenticated on 0.0.0.0. Non-loopback startup requires auth and fails closed without auth. Internet scans counted tens of thousands of exposed instances in early 2026.

Are ClawHub skills safe to install?

ClawHub scans skills with VirusTotal and re-scans active skills daily, but the scan misses skills that use plain-language instructions to make the agent act maliciously. OpenClaw's own docs say to treat third-party skills as untrusted code and read them before enabling.

Ready to Start Your Compliance Journey?

Get a clear, actionable roadmap with our readiness assessment.

Contact Us

Share this article:

Sample SOC 2 Control List

Input your email to download the list.

About the Author

Former security architect for Payments Canada. 20+ years building compliance programs for critical infrastructure.