# The OpenClaw Security Settings I Actually Change
<!--
ref: @content/youtube/yifan-bth/the-openclaw-security-settings-i-actually-change
tags: [OpenClaw, agent security, prompt injection, sandboxing, session isolation, allow-lists, skills, model choice]
version: 2
updated_at: 2026-11-24T07:20:36.092Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=ZpzqAVy-Y-c)**

# The OpenClaw Security Settings I Actually Change

*Synthesized from Yifan on Beyond the Hype, 2026-04-17.*

Yifan is the only speaker; the transcript names no host or guest. The episode is a configuration walkthrough of an OpenClaw install on a Mac Mini.

## Core Thesis
Yifan argues that the hard part of running OpenClaw is not installation but setting it up so that it does not corrupt local data, leak secrets, or act unexpectedly in the background. He frames the problem as two questions, who can message the agent and what the agent can execute, and recommends hard boundaries (allow-lists, separate agents, sandboxes, egress limits) because a language model's instructions to keep secrets are only probabilistic.

## Key Insights
- **Message routing.** DMs and group or channel messages from Telegram and Slack reach the Gateway on the OpenClaw host. DMs go to one main session that holds the full conversation history; each group or channel gets its own separate session.
- **Boundary is per agent, not per session.** The workspace (agents.md, memory.md and similar files) belongs to the agent, so group sessions of the same agent can reach memory that the main session holds. Telling group sessions not to share it is a soft rule.
- **Best practice 1: route groups to a second agent.** Yifan's example is a separate agent named "Bob" with its own workspace, agents.md and memory for group traffic.
- **Scheduled integrations are new input channels.** Gmail or social-feed integrations run as scheduled jobs that inject content into the main or cron sessions, so any email or post the agent reads can carry a prompt injection. He cites a troll post telling the agent to run a destructive command.
- **Skills are a source too.** Skills are text injected at session start. He cites a popular ClawHub Obsidian skill whose own security scan flagged unclear reads of user configuration files, and says the most dangerous risk is silent exfiltration rather than visible damage.
- **Sandbox defaults.** By default the main session runs on the host with the gateway, while non-main sessions run in a Docker sandbox. Yifan recommends sandboxing all sessions, including main, with the workspace mounted read-write so the agent can still edit its memory and instruction files.
- **Network egress.** A sandbox with no egress is safer but breaks tools such as web fetch and curl, so he keeps internet access and treats the sandbox as protection for the host rather than for data.
- **Sandbox scope options.** The default scope is per agent. A per-session scope isolates even sessions of the same agent; a single shared sandbox across all agents uses fewer resources. He says the Docker backend is sufficient unless there is a strong reason otherwise.
- **Model choice for injection resistance.** He ranks Opus 4.6 as among the best at resisting prompt injection, places GPT 5.4 behind it, and says open models such as Kimi K2.5 and GLM 5.1 are well below that. With a cheaper model he suggests tightening egress explicitly.
- **Browser.** He recommends OpenClaw's sandboxed browser, which can be logged into remotely inside the sandbox, instead of giving the agent the host's Chrome credentials through the Chrome DevTools MCP, which he calls too dangerous for everyday use.
- **Channel allow-lists.** Keep the DM policy on an allow-list of user IDs, set Slack channels to allow-list too, and enable groups and users explicitly. He notes OpenClaw is designed as a personal assistant rather than a group tool by default.

## Actionable Takeaways
1. Change the sandbox mode from non-main to all, keep the scope at agent (or shared for a lighter setup), and set workspace access to read-write.
2. Route group and channel sessions to a separate agent with its own workspace, agents.md and memory.
3. Keep DM and group access on user-ID allow-lists, and enable each group explicitly.
4. Use the sandboxed browser and avoid exposing host Chrome credentials to the agent.
5. Read the actual text of each skill before installing it, not only the registry's scan result.
6. Use the strongest model you can afford for injection resistance; if you use a weaker one, restrict egress explicitly.

## Notable Quotes
> "The more I use Open Claw, the more I realize the hard part is not getting it set up." — Yifan

> "If you know anything about LLMs, you know that they are probabilistic." — Yifan

> "It's not designed to be a thing that serves a group, at least not by default." — Yifan

---

*Related: `@content/web/github/2026-11-25-claude-code-v2-1-332` · `@content/web/github/2026-11-24-builtin-ship-shadows-user-skill` · `@content/web/github/2026-11-17-open-artifact` · `@content/youtube/tiago-forte/stop-overthinking-ai-use-this-4-step-framework` · `@content/youtube/cole-medin/deepseek-just-built-the-next-generation-of-coding-agents`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*