OpenMoat 0.12.0
Released 2026-10-29. GitHub release v0.12.0.
What is new, by feature
Section titled “What is new, by feature”| 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 |
Security
Section titled “Security”openmoat mcp proxyis 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. Atools/callpasses only when the policy does not deny it as the server receives it (the paths and URLs its arguments name, under the namemcp__<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 (hostmcp-proxy) carries the hook’s session and call id, so the session’s taint and the person’s answer to anaskapply. A call no hook decided is refused with rulemcp-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
\rinside 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. Undermcp.trust_first_sight, a call made before the server’s first listing is refused (#687). resources/readthrough the proxy is decided on its URI (afile:URI as the file it names, anhttps:one as the host), andprompts/getand 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 wrapnow 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 proxynow serves agent sessions only (ADR-044). Claude Code’s newSessionStarthook gives each session’s sandboxed commands a proxy credential of their own (signed, accepted for 24 hours, issued again at every start, resume,/clearand 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, gets407and aproxy-sessionrow. The key is~/.moat/proxy.key, which the default policy denies to agents (kernel-self); replacing it revokes every credential. Runopenmoat initafter upgrading so Claude Code gets theSessionStartentry, then start a new session (#688).- Codex’s proxy cannot send a session credential, so
openmoat proxynow refuses what a Codex started withHTTP_PROXYhands on.sandbox.proxy_serve_without_credential: trueserves requests that carry no credential, with no session, as before (openmoat policy lint,doctorandstatuswarn about it);openmoat run -- codexgives each run a credential of its own.openmoat statusandopenmoat doctorsay for each host sandbox whether its traffic carries a session (#688). - A browser MCP call that only opens a page (Chrome DevTools MCP
navigate_pageandnew_page, Playwright MCPbrowser_navigate, Puppeteerpuppeteer_navigate, Claude in Chromenavigate, Browserbasenavigate) is decided likeWebFetch: 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 staysnet, alocalhostdev server still defers throughlocal-net, andmcp: { browser_open: net }keeps the old behaviour. A policy whosedefaults.fetchorfetchrules 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
WebFetchfollow:WebFetch https://evil.com\@github.com/was decided asgithub.com, which the default policy allows, and is now alsoevil.com; tabs, newlines,http:/with one slash and a percent-encoded host no longer hide a metadata address fromcloud-metadata(#689). - A
file:URL in an MCP URL argument is a read of the file it names, sonavigate file:///Users/you/.ssh/id_rsais denied bysecrets-pathsinstead 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; runopenmoat policy upgradeto 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 byshell-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 commandsopenmoat runstarts trust it.openmoat secret add --tls-terminate --allow '…'sets both up (#691). - The default policy’s
kernel-selfnow denies reading~/.moat/proxy-ca/, the CA’s key and certificate, and every host sandbox OpenMoat writes keeps it from sandboxed commands;openmoat policy upgradeoffers the rule (#691).
- An SDK puts OpenMoat’s decisions into your own agent product (The SDK, ADR-046):
openmoat-sdkfor Rust and@openmoat/sdkfor 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, anaskruns only after a person approves that exact call; it is not a sandbox. Both packages decide every conformance fixture exactly asopenmoat guarddoes, and carry the release’s version. Examples with tests:crates/openmoat-sdk/examples/agent_loop.rs,sdk/js/examples/agent-loop.js(#686).
Changed
Section titled “Changed”- An
awkprogram 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 bytext-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 assed -iis: a project file allows,~/.zshrcisshell-rc, a hook under.gitasks. Theeflag, interpolated code or variables, anything beside the substitutions, a-Mmodule and a program in a shell variable are decided as any other inline program, andperl -pewithout-iis unchanged (#693).git -c KEY=VALUEwith 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 longergit-internals; every other key (core.hooksPath,alias.*,core.editor,credential.helper,include.path,user.signingkey,commit.gpgsign=true, …) still asks, andgit init --template=DIRwith a directory now asks too while an empty--template=does not (#693).env-poisonno longer sees an assignment whose value changes nothing:GIT_EDITOR,GIT_SEQUENCE_EDITOR,EDITORorVISUALset totrue,:orcat, andPATHkept as$PATHor set to system directories only (/usr/bin:/bin,/usr/bin:/bin:/usr/sbin:/sbin,/usr/local/bin:/usr/bin:/bin), prefixed, exported or given toenv -i.EDITORandVISUALset to anything else (EDITOR=/tmp/x) are now denied likeGIT_EDITOR, and aPATHthat adds any other directory stays denied (#693).git branch -D NAMEandgit branch --delete --force NAMEask (new groupdestructive-recoverable: the reflog holds the commits for weeks) instead of being denied bydestructive, which keepsgit push --force,git push --delete,git reset --hard,rm -rf ~and the rest; runopenmoat policy upgradeto add the group to an existing policy (#693).- A
session-taintask is answered once per file: after you approve the agent’sWrite,EditorMultiEditof 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
curlorwgetdownload that sends nothing (curl -o FILE URL,curl -O URL,wget -O FILE URL,wget URL) is afetchof the URL plus a write of the file: an unlisted host defers to the agent’s own prompt likeWebFetch, and the file is decided by the path rules (curl -o ~/.zshrc …is denied byshell-rc,curl -o ~/.local/bin/x …asks, a project file is allowed).-q,--no-config --no-netrcand--max-redirect=0are no longer required and redirects are followed; a download that sends data, uses.netrcor--location-trusted, or writes a file the line does not name staysnet. SettingCURL_HOME,XDG_CONFIG_HOME,WGETRCorSYSTEM_WGETRCis denied byenv-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 runopenmoat --help,-h,help,--version,-V,<command> --help,policy lint FILE,policy check …anddemo(also asmoatand by path, such as atarget/debug/openmoatbuild), which read no state and change nothing;kernel-selfstill denies every other person-only command, including the same commands under a pseudo-terminal wrapper. Runopenmoat policy upgradeto add the group to an existing policy (#693). - Breaking Library crates (API additions; breaking for code that builds
HookRequestorAction::McpToolitself):openmoat-hostsaddsHookRequest.edits,HookRequest.mcp_argumentsandReplacement;openmoat-coreaddsAction::McpTool.opens;openmoat-sdkand@openmoat/sdkare new (#686, #689, #693).
df -h ~anddf /Users/meno longer ask as a read of the home folder (home-sweep):dfqueries the file system holding a path and opens nothing under it;dustill 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-shellnow 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,| jqand| grepread 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/=.*$//'andenv | 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&, sogit 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-openmoatreads apkill/killallpattern as the regular expression it is and asks only when it could match the process nameopenmoatormoat:pkill -f latency-compare.py; bash run.shandpkill -f my-server.jsno longer ask, whilepkill -f 'open.*',pkill -f .,pkill -f 'o.*t',pkill -x openmoat,killall moatandpkill -f /usr/local/bin/openmoatdo (#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).