Skip to content

0.5.7 - 2026-10-18

Choose a tag to compare

@github-actions github-actions released this 19 Oct 02:52
40da78b

Alpha: the hook's decisions are not enforced by the operating system (ADR-013). Only commands inside the host sandboxes moat init configures, or under moat run, are confined by the OS. Elsewhere an allowed call runs with your permissions, so a classifier mistake is a security bug.

Release Notes

Push check for tokens and secrets, token egress, MCP server and tool pinning, a Claude Code hook that blocks when it fails, per-session proxy credentials, hooks inside moat run, human-only commands, and classifier fixes.

Security

  • git push and gh pr create are checked for what they would publish: a commit that adds a known token format or a brokered secret's value is denied (push-secret), a change to a CI workflow or another runs-later file asks in a session that read untrusted content or a secret (push-runs-later), and a push that cannot be checked within 2 s or 8 MiB asks (push-unchecked); any other push is decided as before (#574).
  • With Claude Code 2.1.295 or later, moat init sets "onFailure": "block" on OpenMoat's PreToolUse hook, so a call is blocked when moat cannot start, crashes or times out instead of running unchecked. The key is written only when the claude on PATH reports that version; moat status and moat doctor report a hook without it as out of date (run moat init), and moat doctor warns when Claude Code is older or not found (#574).
  • token-egress denies a GitHub, OpenAI/Anthropic, AWS, Slack, Google, npm or GitLab token sent to a host that is not its service's, allowed hosts included: in a fetch or network tool's URL, an MCP URL argument, a web search, or the arguments of a command that connects to a host and of commands piped into it. placeholder-egress denies a brokered secret's placeholder sent anywhere but that secret's host. Only prefixed token formats count, so commit SHAs, UUIDs and base64 data are not affected. Existing policies get both with moat policy upgrade (#574).
  • Audit redaction also masks Anthropic keys (sk-ant-…) and OpenAI project, service-account and admin keys whose body holds - or _ (#574).
  • The policy lock pins each MCP server definition the agents read (~/.claude.json, a project's .mcp.json, Cursor's mcp.json, Codex's config.toml, and their project files). A server whose definition changed, or one added since (a cloned repository's .mcp.json included), has its tool calls denied with mcp-server-changed until a person runs moat mcp accept, which shows the change and asks. Other servers and tools are not affected, and moat doctor and moat status report it (#574).
  • moat mcp accept, moat mcp wrap and moat mcp unwrap are denied to agents (kernel-self), pseudo-terminal wrappers included. Existing policies get it with moat policy upgrade (#574).
  • moat run's proxy serves its own run only: the agent's HTTP_PROXY/HTTPS_PROXY carry a per-run credential (http://<session>:<token>@127.0.0.1:<port>), and a request without it, or with another run's, gets 407. Each proxy row is recorded under the run's session (#574).
  • Session taint reaches moat run's proxy: once an agent session of the run has read secret material, a request to any host but that secret's own is refused (session-taint), registries included, so a script the hook never sees cannot send it on. The default policy denies secret reads, so default setups see no change (#574).
  • One session of moat run's proxy, or the connections that have not authenticated yet, can hold at most half of its connections; the next gets 503 (#574).
  • A deny can no longer be turned into a defer by padding the rest of a command line until the classifier stops. A here-document with no delimiter line and a trailing backslash are read as bash runs them, a command substitution that cannot be classified keeps its command's own reads and writes, and a line not read in full or past a classifier limit (64 KB, nesting depth, 2048 actions) asks instead of taking the catch-all (#569).
  • moat run removes the environment variables brokered secrets are read from before it starts the agent; the agent and its commands held the real value instead of the placeholder (#569).
  • runs-later asks before the agent writes what its host starts in the next session, outside any sandbox: a project's .claude/hooks/, .mcp.json, .cursor/mcp.json and .codex/config.toml, and ~/.claude.json, ~/.claude/plugins/, ~/.cursor/mcp.json and ~/.cursor/cli-config.json. Existing policies get it with moat policy upgrade (#569).
  • A tool OpenMoat does not govern is left to the host's own permission flow instead of being approved past it; it is still recorded. Cursor, whose hooks cannot leave a call undecided, keeps the allow (#569).
  • moat run --isolate takes bubblewrap from /usr/bin, /bin or /usr/local/bin only, never from PATH, where a relative entry let a project ship its own (#571).
  • A project root whose path holds a glob character (*, ?, brackets, braces) names no files: spliced into ${project}/** it widened project-fs, with a project at ~/* to the whole home (#572).
  • Under moat run on macOS, a pattern with ** inside braces (~/{.ssh/**,.aws/**}) and a pattern under a symlinked directory (/tmp/x/**, which is /private/tmp/x) are enforced as the hook reads them; both were narrower (#572).
  • A patch handed to apply_patch in a shell command, which Codex applies like its own patch tool, is checked as writes to every file it names; a write to a denied file deferred (#572).
  • MCP arguments named in camel or kebab case (sourcePath, output-dir, baseUrl) are read as paths and URLs, and a write verb anywhere in a tool's name (file_write, download_file) makes its paths writes (#572).
  • In Claude Code's bypassPermissions and dontAsk modes, where no question reaches a person, an OpenMoat ask is a deny that says how to approve it (moat allow --last), as for Codex; calls OpenMoat leaves to Claude Code are unchanged (#574).
  • moat allow, moat doctor --accept, moat trust, moat secret add, moat edit, moat policy upgrade, moat uninstall, moat sandbox sync, moat mcp accept/wrap/unwrap and moat proxy install/uninstall refuse when Claude Code, Codex, the Cursor CLI or moat run started them, even through a terminal wrapper, and read their answer from the controlling terminal. Windows checks the terminal only (#574).
  • moat proxy refuses a TLS tunnel whose ClientHello carries an encrypted server name (ECH or ESNI), with which an allowed host's provider could serve another site; sandbox.proxy_allow_ech: true allows it (#574).
  • The Claude Code hook also receives ReadMcpResourceTool (a file: resource is checked as a read of that file, another as the MCP server's read), EnterWorktree (entering an existing worktree is checked as a read of its directory) and Skill (recorded, left to Claude Code). Existing installs show the hook as out of date until moat init is run (#574).
  • Session taint protects every file runs-later asks about (azure-pipelines.yml, Jenkinsfile, .buildkite/, .pre-commit-config.yaml, lefthook.yml, ~/.claude.json) and OpenMoat's own .moat/, and a test keeps the lists in step (#574).
  • A shell command that gives HOME, PWD or project a value it does not show (project=$(cat f), read HOME) no longer has paths under them read as the real home, working directory or project: project=$(cat f); cat ${project}/id_rsa was allowed as a project file, and now asks like any unknown directory (#574).
  • ${project} in a shell command is the shell's variable project, empty when unset, not the project root: cat ${project}/Users/me/.ssh/id_rsa reads the key and was allowed as a project file (#574).
  • A relative path from the root directory (cd / && cat Users/me/.ssh/id_rsa) is checked as /Users/…; it was read as the network path //Users/…, which no rule names (#574).
  • xargs input that the command line shows, a here-string, a here-document or text piped from echo, is checked as the arguments of the command xargs runs, with -I, -n and -0 read as xargs reads them (#575).
  • Files that curl and wget send are checked as reads: curl -F name=@FILE, -F name=<FILE, --form, -T/--upload-file, -d @FILE and the other data options, --data-urlencode name@FILE and -K FILE, and wget --post-file, --body-file and -i (#575).
  • Files rewritten in place are checked as writes: the file operands of perl -i and ruby -i (and their backups), the file patch patches and its -o and -r files (its -i patch file is a read), and dd of=~/…, whose ~ bash expands (#575).
  • env -S 'cmd args' (--split-string) is checked as the command line env runs (#575).
  • An unquoted glob that starts with . (.*) also names . and .., as macOS /bin/bash and other bash before 5.2 expand it, so the directory and its parent are checked; rm and rmdir, which refuse those two operands, are unchanged (#575).
  • Shell rule patterns match in time bounded by the pattern length times the command length; a pattern with many * against a long command took exponential time (#575).
  • The program git runs for the other side of a remote, --upload-pack and -u for clone, fetch, pull and ls-remote, push --receive-pack/--exec and archive --exec, is checked as a command line. A local repository that clone, fetch, pull, ls-remote or archive --remote names is a read, and the directory clone creates and a local repository push updates are writes (#575).
  • Hooks inside moat run send each tool call to the moat run process over the proxy's port with a token made for the run, and that process decides and records it; the sandbox stays closed to ~/.moat, a wrong token is recorded and gets no decision, and any failure denies (#575).

Added

  • moat mcp proxy, opt-in per server with moat mcp wrap or moat init --mcp-proxy: it runs a stdio MCP server through OpenMoat, pins each tool's description and input schema on first sight, hides a tool that changed or is new until moat mcp accept, and records every tool call in the audit log. With --sandbox the server runs under moat run. moat uninstall and moat mcp unwrap restore the original command (#574).

Changed

  • Changing one of Claude Code's own settings, such as permissions.blockReadsOutsideWorkingDirectories, a permission list or mode, or a display toggle, no longer makes moat guard deny every call until moat doctor --accept. Calls are decided by the policy as usual, the change is recorded once per session, and moat doctor and moat status report it until you accept it. Any change to hooks, to keys that run a program or redirect the agent (env, apiKeyHelper, the model, plugins, MCP servers, sandbox), removing a deny rule OpenMoat wrote, an unknown key or a file that no longer parses still denies every call. Under a lock pinned by an earlier release a change to permissions still denies until the next re-pin (#575).
  • moat proxy says at start-up that it asks for no session credential, so any local process may use it and session taint does not apply; the host sandboxes cannot send one (#574).
  • moat status says when a policy update waits for moat policy upgrade, and its JSON adds policy_update and lock_drift (#573).
  • On a session-taint ask, moat allow --last offers s: it approves every protected write of that session until it reads untrusted content again (other sessions still ask; a secret's asks never) (#573).
  • moat init shows a diff of every file it would change for an agent before asking about it, hooks and sandbox settings together (#573).
  • --help and the moat run banner use plain words: no ADR numbers or tier names, and the banner is two lines (--verbose for the rest) (#573).
  • A tool call over the 1 MiB payload limit is refused with a message naming the limit, instead of failing as malformed input (#573).
  • moat guard stays fast in long agent sessions: the session's taint is folded from the calls since the last one, cached in the audit database, instead of from the whole session. Late in a 5,000-call session a call took 158 ms on Linux and 370 ms on macOS; it now takes about 10 and 18 ms (#571).

Fixed

  • moat guard no longer denies slow calls on a heavily loaded machine as no decision within 10 s: the time limit is 30 s (still a deny when it runs out), the session-cache write skips instead of waiting for the audit database's lock and shares the record's connection, and moat doctor names the step most such calls were stuck in (#574).
  • Under moat run, every governed tool call was denied as a kernel-error and nothing was recorded, because the hook could not read the policy lock or write the audit log from inside the sandbox; hooks now get the real decision, and session taint reaches the run's proxy (#575).

Install openmoat 0.5.7

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/crocodile-labs/openmoat/releases/download/v0.5.7/openmoat-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/crocodile-labs/openmoat/releases/download/v0.5.7/openmoat-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install crocodile-labs/tap/moat

Download openmoat 0.5.7

File Platform Checksum
openmoat-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
openmoat-x86_64-apple-darwin.tar.xz Intel macOS checksum
openmoat-x86_64-pc-windows-msvc.zip x64 Windows checksum
openmoat-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
openmoat-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
openmoat-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
openmoat-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo crocodile-labs/openmoat

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>