Skip to content

OpenMoat 0.7.0

Released 2026-10-19. GitHub release v0.7.0.

The host adapters behind one contract, moat doctor --bundle for bug reports, and a round of checks: tar and su options that run a program, bash network redirections, more credential files, variables and secret-printing commands, MCP pins under CLAUDE_CONFIG_DIR, model switches that no longer freeze a session, and long sessions that no longer time out moat guard.

  • MCP server pinning reads Claude Code’s .claude.json inside ~/.claude as well as the one beside it: Claude Code uses the inner one whenever CLAUDE_CONFIG_DIR is set, even to the default directory, and its servers were left unpinned, so a changed server was not held back (#598).
  • moat run on Linux refuses to start when OpenMoat’s state directory (MOAT_HOME) is inside a tree the sandbox grants (the project, a read root such as /tmp, a --write path, the temp directory), or a granted path is inside it: Landlock cannot deny inside a grant, so commands could read the audit log and the lock there. The message names the tree to move MOAT_HOME out of; --isolate still starts when the state directory is below the temp directory, which it hides. The default ~/.moat is unaffected, and moat doctor warns on Linux when the state directory is inside a grant (#580).
  • moat mcp proxy no longer trusts a server the first time it sees it: every tool of a server with no tool pins yet is left out of tools/list and its calls are refused, naming moat mcp accept <server>, which shows each tool’s name, description and input schema and asks. moat mcp wrap and moat init --mcp-proxy say so when they wrap a server. Servers already pinned keep their pins; mcp: { trust_first_sight: true } in the policy restores pinning on first sight, and moat policy lint warns about it (#580).
  • kernel-self protects OpenClaw’s state directory, openclaw.json and OpenMoat’s plugin from the agent’s writes, and writes to OpenClaw plugin directories (~/.openclaw/extensions/, a project’s .openclaw/extensions/) ask (runs-later); session taint protects the same files. Existing policies get it with moat policy upgrade (#581).
  • OpenClaw’s MCP servers (mcp.servers in openclaw.json) are pinned one by one, like Claude Code’s, Codex’s and Cursor’s: a changed or new server denies only its own tools (mcp-server-changed) until moat mcp accept, instead of every call through a changed openclaw.json. OpenClaw’s tool names (<server>__<tool>, with its own spelling of the server’s name) are matched to their server. An $include that may bring servers from another file holds back every OpenClaw MCP call (#584).
  • An agent cannot add or update OpenClaw cron jobs or write OpenClaw’s state database (~/.openclaw/state/, which holds its exec approvals and the jobs the Gateway runs later, a command job directly in its own process, which no hook sees): kernel-self denies it. Existing policies get it with moat policy upgrade (#584).
  • OpenClaw view_image is checked as a read of each local image (a secret’s path is denied) or a fetch of its URL, nodes invoke (a command relayed to a paired device) is unparseable, and a nodes capture saved with outPath is a write of that path; reading cron and nodes state stays unchecked (#584).
  • kernel-self protects OpenClaw’s configuration where OPENCLAW_CONFIG_PATH puts it and its state directory where OPENCLAW_HOME or OPENCLAW_STATE_DIR put it (#584).
  • tar options that run a program (--to-command, -I/--use-compress-program, --checkpoint-action=exec=, -F/--info-script, --new-volume-script, --rsh-command, --rmt-command, in every spelling GNU tar accepts, abbreviations included) are checked as the command they run (#596).
  • su -c/--command/--session-command and runuser -c are checked as the command they run, and pkexec and runuser -u USER as wrappers like sudo (#596).
  • secrets-paths also covers ~/.pgpass, ~/.my.cnf, ~/.mylogin.cnf, ~/.vault-token, ~/.terraform.d/credentials.tfrc.json, ~/.gem/credentials, ~/.config/op/, ~/.password-store/ and ~/.local/share/keyrings/, and kubectl config view --raw. Existing policies get it with moat policy upgrade (#596).
  • env-secrets also covers passwords and connection strings: *_PASS, *_PASSWD, *_PWD, PGPASSWORD, *_CREDENTIALS, *_DSN, DATABASE_URL, *_DATABASE_URL, REDIS_URL, MONGODB_URI and MONGO_URL; other *_URL variables are unchanged. Existing policies get it with moat policy upgrade (#596).
  • moat proxy checks a 6to4 (2002::/16) or Teredo (2001::/32) address as the IPv4 addresses it leads to (for Teredo the client and the server), as it already did for NAT64 and IPv4-compatible ones, so an embedded loopback, link-local, metadata or private address is refused and address deny rules apply to it (#596).
  • A shell redirection to or from /dev/tcp/HOST/PORT or /dev/udp/HOST/PORT, which bash opens as a network connection, is checked as network access to HOST, like curl to it: unlisted hosts and cloud metadata addresses are denied (#597).
  • secrets-paths also covers ~/.authinfo, ~/.authinfo.gpg, Podman and Buildah registry logins (~/.config/containers/auth.json) and ~/.config/doctl/config.yaml, and the commands vault kv get, vault read, vault print token, op read, op item get --reveal, heroku auth:token and pass showing or searching a password (pass NAME, pass show, pass grep; listing and managing entries is unchanged). Existing policies get it with moat policy upgrade (#597).
  • moat doctor --bundle <file> writes one local file for a bug report: the moat version and build target, the operating system, each agent’s hook state and protection level, the policy version and lint warnings, the doctor checks, and the last 20 audit decisions (--bundle-events N) with only time, host, tool name, verdict and rule ids. Commands, paths, arguments and URLs are left out, every text is redacted and the home directory reads ~; nothing is sent. The bug report template asks for it (#589).
  • OpenClaw support: moat init --hosts openclaw installs a small OpenMoat plugin whose before_tool_call hook checks every tool call with moat guard --host openclaw (shell, file, patch, fetch, search, browser and MCP tools; other tools are tool.unknown). A deny blocks the call, an ask becomes OpenClaw’s own approval request, and any failure or a missing answer blocks the call. moat uninstall restores openclaw.json and deletes the plugin. Not yet tested against a running Gateway (#581).
  • moat doctor shows, for each policy secret, whether Claude Code’s own broker masks it in the settings on disk: masked, denied instead of masked (a file source on macOS), skipped with the reason, or not yet written (run moat sandbox sync). It also names sandbox.credentials.allowPlaintextInject: true as a weakness when the policy did not ask for it, since it lets every masked secret go to a plain-HTTP host (#580).
  • Breaking openmoat-audit (library API, breaking): Store::session_cache takes the digest it looks up, since a session keeps one saved fold per digest, and Store::session_page reads a session’s events a page at a time (#596).
  • moat init follows OPENCLAW_HOME, OPENCLAW_STATE_DIR and OPENCLAW_CONFIG_PATH as OpenClaw does (~, blank, undefined and null included) and records where it set OpenClaw up, so later commands find it without them; moat doctor reports a shell whose variables name another OpenClaw. The plugin goes in the state directory, wherever the configuration is (#584).
  • openclaw.json is read as JSON5 (comments, unquoted keys, single quotes, trailing commas), so moat init sets up a JSON5 configuration and writes it back as plain JSON with every value kept. A file with comments is not written, since that would drop them: init, uninstall and moat mcp wrap say so and change nothing. No new dependency (#584).
  • openmoat-hosts keeps each host’s facts (id, name, the hook format it sends, what it does with an ask) in one HostSpec, returned by Host::spec, and turns an ask into a deny in one place from it; every host’s answers are unchanged (#586).
  • Breaking openmoat-hosts (library API, breaking): HostSpec also says what the host does when its hook fails, what OpenMoat does not cover for it and where its configuration lives (InstallSpec); HostSpec, Asks and InstallSpec are #[non_exhaustive]. Host::bench_payload, Host::read_reply and Host::seen with the bench module build and score moat bench calls per host. moat itself behaves as before (#589).
  • openmoat-hosts (library API): HostSpec also says where the host reads its MCP server definitions (McpSpec) and which OS sandbox OpenMoat writes for it (SandboxSpec), both #[non_exhaustive]. moat init, sandbox, uninstall, doctor, status and the MCP pins read them instead of naming each agent, and behave as before (#589).
  • moat sandbox show says a file secret on macOS is denied rather than masked, and that nothing is masked on native Windows, where it used to say Claude Code injects it (#580).
  • moat guard no longer times out in long sessions whose calls switch between working directories: each directory keeps its own saved session taint instead of replacing the other’s, so a call reads only the calls recorded since rather than the whole session again. A session too long to read in one call saves its progress and is denied with a recorded reason, and the next call reads on from there; taint verdicts are unchanged. Hooks inside moat run that time out are listed under the relay phase instead of stdin (#596).
  • Switching models in Claude Code no longer makes moat guard deny every call until moat doctor --accept: the model (a string) and switchModelsOnFlag (a string, number or boolean) keys Claude Code writes in settings.json are settings drift the guard decides through, as language and effortLevel already were. moat doctor and moat status still show the change; the same change next to any other key, or an object or list under either key, still denies every call (#596).
  • moat guard looks up whether a session already recorded settings drift with one indexed query that stops at the first match instead of reading the whole session, and the long-session latency check in CI takes the median p95 of three batches and shows the latency_us p95 beside it (#585).
  • A hook inside moat run on macOS connects again, a few times within its time limit, when Seatbelt refuses the connection to moat run for a moment, as it does on some macOS 14 machines, instead of denying the call with kernel-error; a refusal that lasts still denies (#595).
  • moat bench’s hook-failure line for Claude Code says that from Claude Code 2.1.295 a hook that is missing, crashes or times out blocks the call (moat init sets onFailure: "block"); it said only that the call runs (#589).