Skip to content

OpenMoat 0.12.0

Released 2026-10-29. GitHub release v0.12.0.

Feature Page
openmoat mcp proxy is a gateway: a call OpenMoat refused never reaches the server, and every call it passes is one the agent’s hook decided The MCP gateway
A browser MCP call that only opens a page is checked like WebFetch; a file: URL is a read; a long encoded value in a URL after a secret read is denied Browser page opens
openmoat proxy serves agent sessions only: Claude Code’s SessionStart hook gives each session a credential, so its taint applies at the proxy The proxy serves agent sessions only
A brokered secret goes into HTTPS inside openmoat run, and only into the requests its method and path rules name Secrets over HTTPS, for some requests only
openmoat-sdk and @openmoat/sdk: OpenMoat’s decisions in your own agent The SDK
Fewer asks and denies in daily work: a taint answer covers the file, git branch -D asks, GIT_EDITOR=true, awk and perl -pi, curl -o downloads, df, env | cut -d= -f1, [ -n "$TOKEN" ], openmoat --help Shell command checks, Session taint
  • openmoat mcp proxy is now an MCP gateway (ADR-045): a call OpenMoat refuses never reaches the server, and every call it passes is tied to the agent session that made it. A tools/call passes only when the policy does not deny it as the server receives it (the paths and URLs its arguments name, under the name mcp__<server>__<tool> whatever the agent calls the tool) and when the hook decided exactly that call: the same tool and arguments, within the hour, each decision used once. The proxy’s audit row (host mcp-proxy) carries the hook’s session and call id, so the session’s taint and the person’s answer to an ask apply. A call no hook decided is refused with rule mcp-unattributed (#687).
  • The proxy no longer passes on bytes it did not check: every message it sends is the one it read, written again by itself, so a key given twice, a \r inside a line or a line separator inside a string can no longer carry a message the proxy did not check to the server, or an unfiltered tool listing to the agent. A line from the server it cannot read is dropped instead of passed on. Batches inside batches, messages that are both a request and a response, ids that are not strings or numbers, reused ids and a method spelled in another case are refused (#687).
  • A response from the server reaches the agent only when it answers a request the agent sent, so a server can no longer answer a call the proxy refused or send a tool listing nobody asked for (#687).
  • When a server says its tools changed (notifications/tools/list_changed), the proxy reads them again itself and holds each changed tool, even if the agent keeps its old list. Under mcp.trust_first_sight, a call made before the server’s first listing is refused (#687).
  • resources/read through the proxy is decided on its URI (a file: URI as the file it names, an https: one as the host), and prompts/get and the server’s own requests to the agent (sampling/createMessage, elicitation/create) are recorded (#687).
  • The audit database is at schema version 6: it holds the MCP calls the hook let through until the proxy uses each or it is an hour old. An older database is upgraded when OpenMoat first writes to it (#687).
  • A server wrapped with openmoat mcp wrap now answers only calls an agent’s OpenMoat hook decided; a script or tool that used a wrapped server directly gets error -32001 (mcp-unattributed). openmoat mcp unwrap <server> takes the proxy out of its path (#687).
  • openmoat proxy now serves agent sessions only (ADR-044). Claude Code’s new SessionStart hook gives each session’s sandboxed commands a proxy credential of their own (signed, accepted for 24 hours, issued again at every start, resume, /clear and compaction), so the proxy records each request under that session, applies its taint (after the session reads a secret, its commands’ connections to other hosts are refused) and its share of the connections. A request without a valid credential, from another local program or with a credential edited, borrowed from another session or expired, gets 407 and a proxy-session row. The key is ~/.moat/proxy.key, which the default policy denies to agents (kernel-self); replacing it revokes every credential. Run openmoat init after upgrading so Claude Code gets the SessionStart entry, then start a new session (#688).
  • Codex’s proxy cannot send a session credential, so openmoat proxy now refuses what a Codex started with HTTP_PROXY hands on. sandbox.proxy_serve_without_credential: true serves requests that carry no credential, with no session, as before (openmoat policy lint, doctor and status warn about it); openmoat run -- codex gives each run a credential of its own. openmoat status and openmoat doctor say for each host sandbox whether its traffic carries a session (#688).
  • A browser MCP call that only opens a page (Chrome DevTools MCP navigate_page and new_page, Playwright MCP browser_navigate, Puppeteer puppeteer_navigate, Claude in Chrome navigate, Browserbase navigate) is decided like WebFetch: it defers to the agent’s own prompt instead of being denied for every unlisted host. A call that sends more than its URL (a script on the page, launch options, headers, a form) stays denied for unlisted hosts, an IP address or single-label host stays net, a localhost dev server still defers through local-net, and mcp: { browser_open: net } keeps the old behaviour. A policy whose defaults.fetch or fetch rules allow a host now allows browser page opens of it too (#689).
  • A URL is judged by every host a client may read it as reaching, including the URL Standard’s reading that browsers and WebFetch follow: WebFetch https://evil.com\@github.com/ was decided as github.com, which the default policy allows, and is now also evil.com; tabs, newlines, http:/ with one slash and a percent-encoded host no longer hide a metadata address from cloud-metadata (#689).
  • A file: URL in an MCP URL argument is a read of the file it names, so navigate file:///Users/you/.ssh/id_rsa is denied by secrets-paths instead of deferring; javascript:, data:, chrome: and other URLs that name no network address ask (#689).
  • New deny group encoded-egress: once the session read secret material, a URL a fetch, network or MCP tool opens that carries 80 or more characters of base64 or hex is denied; run openmoat policy upgrade to add it to an existing policy (#689).
  • A browser’s screenshot, snapshot or trace tool writes the file its path names, so take_screenshot {filePath: "~/.zshrc"} is denied by shell-rc (#689).
  • A brokered secret can now be used over HTTPS without the agent ever holding it, and only for the requests its rules name (ADR-043). With tls: terminate, openmoat run’s proxy decrypts the agent’s tunnel to the secret’s host with its own certificate authority, puts the value in, verifies the host’s certificate itself, and stops an answer before any brokered value in it. allow: [GET /repos/**, POST /repos/*/*/issues] refuses every other request to the host before anything is sent (proxy-secret-route), plain HTTP included, along with .. in any spelling, encoded slashes, ;, double encoding and method overrides. openmoat proxy ca init (person-only, asks first) makes the CA, limited by name constraints to those hosts and pinned in the policy lock; only the commands openmoat run starts trust it. openmoat secret add --tls-terminate --allow '…' sets both up (#691).
  • The default policy’s kernel-self now denies reading ~/.moat/proxy-ca/, the CA’s key and certificate, and every host sandbox OpenMoat writes keeps it from sandboxed commands; openmoat policy upgrade offers the rule (#691).
  • An SDK puts OpenMoat’s decisions into your own agent product (The SDK, ADR-046): openmoat-sdk for Rust and @openmoat/sdk for JavaScript (sdk/js, the engine as a WebAssembly module that imports nothing; no dependencies, no network, no telemetry). Compile a policy once, then decide each tool call (shell command, file read or write, network host, fetch, web search, MCP or unknown tool) before it runs, with filesystem facts (program pins, symlinks, glob operands), session taint and repository policies; each decision carries its verdict, rule ids and reasons, and in JavaScript a frozen copy of the action decided. The SDK decides and the caller enforces: a denied call must not run, an ask runs only after a person approves that exact call; it is not a sandbox. Both packages decide every conformance fixture exactly as openmoat guard does, and carry the release’s version. Examples with tests: crates/openmoat-sdk/examples/agent_loop.rs, sdk/js/examples/agent-loop.js (#686).
  • An awk program whose | is regex alternation or whose > sits inside a regex or a string (awk '/^## |^# /{print}' f, awk '/>>>>>>> /{p=0}' f, awk '{print $1 " -> " $2}' f) is read-only and allowed by text-tools; a pipe, a redirection, system, getline, ENVIRON, close(, fflush(, a program file and a program the shell expands a variable into (awk "$prog") still ask (#693).
  • perl -pi -e 's/a/b/g' FILE… (also -0pi, -pi.bak, -i -pe, -ni, -0777 -pi, any delimiter or bracket pair, several substitutions) is an edit of the named files, decided by the path rules as sed -i is: a project file allows, ~/.zshrc is shell-rc, a hook under .git asks. The e flag, interpolated code or variables, anything beside the substitutions, a -M module and a program in a shell variable are decided as any other inline program, and perl -pe without -i is unchanged (#693).
  • git -c KEY=VALUE with a key that never names a program (user.name, user.email, commit.gpgsign=false, init.defaultBranch, advice.*, color.*, i18n.*, core.autocrlf, core.safecrlf, core.quotepath, pull.rebase, pull.ff, push.default, push.autoSetupRemote, fetch.prune, rebase.autostash, rebase.autosquash, merge.conflictstyle, diff.renames, log.date, status.short, gc.auto) is no longer git-internals; every other key (core.hooksPath, alias.*, core.editor, credential.helper, include.path, user.signingkey, commit.gpgsign=true, …) still asks, and git init --template=DIR with a directory now asks too while an empty --template= does not (#693).
  • env-poison no longer sees an assignment whose value changes nothing: GIT_EDITOR, GIT_SEQUENCE_EDITOR, EDITOR or VISUAL set to true, : or cat, and PATH kept as $PATH or set to system directories only (/usr/bin:/bin, /usr/bin:/bin:/usr/sbin:/sbin, /usr/local/bin:/usr/bin:/bin), prefixed, exported or given to env -i. EDITOR and VISUAL set to anything else (EDITOR=/tmp/x) are now denied like GIT_EDITOR, and a PATH that adds any other directory stays denied (#693).
  • git branch -D NAME and git branch --delete --force NAME ask (new group destructive-recoverable: the reflog holds the commits for weeks) instead of being denied by destructive, which keeps git push --force, git push --delete, git reset --hard, rm -rf ~ and the rest; run openmoat policy upgrade to add the group to an existing policy (#693).
  • A session-taint ask is answered once per file: after you approve the agent’s Write, Edit or MultiEdit of a protected file in a session that read untrusted content, later writes and edits of the same file in that session are allowed until the session reads untrusted content again (the reason names the earlier write). The evidence is the file itself, which must hold what the approved call leaves (for an edit, the file with its replacements applied) and not what it held before, so a declined write, a write of the file’s own content, an edit Claude Code would refuse, a patch or shell write, another file or another session still ask (ADR-048; the audit database gains a column and migrates on first use) (#693).
  • A curl or wget download that sends nothing (curl -o FILE URL, curl -O URL, wget -O FILE URL, wget URL) is a fetch of the URL plus a write of the file: an unlisted host defers to the agent’s own prompt like WebFetch, and the file is decided by the path rules (curl -o ~/.zshrc … is denied by shell-rc, curl -o ~/.local/bin/x … asks, a project file is allowed). -q, --no-config --no-netrc and --max-redirect=0 are no longer required and redirects are followed; a download that sends data, uses .netrc or --location-trusted, or writes a file the line does not name stays net. Setting CURL_HOME, XDG_CONFIG_HOME, WGETRC or SYSTEM_WGETRC is denied by env-poison, since it moves the configuration files that could turn such a download into an upload (#693).
  • New allow group openmoat-readonly: an agent may run openmoat --help, -h, help, --version, -V, <command> --help, policy lint FILE, policy check … and demo (also as moat and by path, such as a target/debug/openmoat build), which read no state and change nothing; kernel-self still denies every other person-only command, including the same commands under a pseudo-terminal wrapper. Run openmoat policy upgrade to add the group to an existing policy (#693).
  • Breaking Library crates (API additions; breaking for code that builds HookRequest or Action::McpTool itself): openmoat-hosts adds HookRequest.edits, HookRequest.mcp_arguments and Replacement; openmoat-core adds Action::McpTool.opens; openmoat-sdk and @openmoat/sdk are new (#686, #689, #693).
  • df -h ~ and df /Users/me no longer ask as a read of the home folder (home-sweep): df queries the file system holding a path and opens nothing under it; du still counts as a read (#693).
  • A ~ inside an interpreter’s inline program (perl -0pi -e 's~a~b~s') is read as the delimiter or operator it is, not as the home folder or another user’s home, and the program word is no longer taken for a file operand (#693).
  • pipe-to-shell now matches only a consumer that runs its stdin as its program (| sh, | python3, | python3 -, | node -, | perl, | source /dev/stdin, | xargs sh), reported as the canonical <stages> | <interpreter> pipeline; curl … | python3 -I -c CODE, | node -e CODE, | perl -ne CODE, | jq and | grep read the download as data and are decided as before without the deny (#693).
  • env | cut -d= -f1, env | cut -d = -f 1, printenv | sed 's/=.*//', env | sed -E 's/=.*$//' and env | awk -F= '{print $1}' are no longer denied as an environment dump (env-dump): the filter keeps the names and drops every value; any other consumer (| grep, | sort, | head, | cut -d= -f2, | base64, | tee) leaves the deny (#693).
  • A shell pattern’s * no longer crosses ;, &&, || or &, so git push -u origin b 2>&1 | tail; git for-each-ref --format=… is no longer denied as a force push (destructive) because of the later command’s --format=; a force push anywhere on the line is still denied by its own command (#693).
  • stops-openmoat reads a pkill/killall pattern as the regular expression it is and asks only when it could match the process name openmoat or moat: pkill -f latency-compare.py; bash run.sh and pkill -f my-server.js no longer ask, while pkill -f 'open.*', pkill -f ., pkill -f 'o.*t', pkill -x openmoat, killall moat and pkill -f /usr/local/bin/openmoat do (#693).
  • A test of whether a secret variable is set is no longer a read of it (env-secrets): [ -n "$GITHUB_TOKEN" ], [ -z … ], test -n, [[ -n $X ]], ${#X}, ${X:+set} and ${X+set}; echo $X, ${X:0:4}, y=$X, [ "$X" = … ] and ${X:+$X} stay denied (#693).