OpenMoat 0.18.0
Released 2026-11-09. GitHub release v0.18.0.
Security
Section titled “Security”- A directory allowed with
openmoat allow --dirno longer keeps only the protections of the day it was allowed: the grant stores the directory, and every write the current policy holds for review stays held inside it (a.git, CI files, the editors’ configuration,.npmrc,.cargo/config.toml, a virtual environment’sbin/,.devcontainerand whatever a later policy adds); deny rules still win and an exact-path approval still answers its review. A directory allowed with an earlier release is listed byopenmoat doctorandopenmoat statusuntilopenmoat policy upgradebrings it up to date, which only adds protection;openmoat allowed --format jsonlists directory grants underdirectories(#765). - OpenMoat no longer runs, pins or records a program found through a relative
PATHentry (.,node_modules/.bin): the--versionprobes ofinit,statusanddoctor(which OpenMoat Bar runs every minute), the pinned programsinitrecords, the binary path written into hooks, the agentopenmoat runstarts by name, and thegitthatprovenanceandpolicy diffrun all come from the absolute entries only, so a repository with a plantedclaudeorgitcannot get it run from there (ADR-067) (#767). - On Linux, the Codex profile also denies every letter case of its short workspace deny globs (
**/.env,**/.env.*,**/.envrc,**/.moat/**), so a file spelled.ENVin a directory that folds case is hidden too; longer globs are reported ascodex.linux-case-variants(#767). - Cursor’s hook command writes the OpenMoat binary path in single quotes on macOS and Linux, so a
$, backtick or\in the path is never run by Cursor’s shell;openmoat initrewrites an existing entry, anddoctorreads both forms (#767). openmoat proxy ca initis person-only in the default policy too (kernel-self), by either name, by path and under the pseudo-terminal wrappers;expect, Python’spty,tmux,screenandosascriptrunningproxy ca,proxy installorproxy uninstallin a quoted command line are denied as well. The command already refused an agent among its parents; the hook now denies it before it starts.openmoat policy upgradeadds the lines to an existing policy (#767).openmoat proxyno longer counts a name pattern with a port whose host part is all hex letters (fac*:5432) as an address pattern: only a host part that starts with a digit, or IPv6 text without a port, opens a private or unique local address, so such an allow cannot namefd00::1:5432. The policy engine already kept a pattern with a port from matching IPv6 text; a test now pins both layers (#767).openmoat proxyrefuses the reserved range240.0.0.0/4and the deprecated site-local rangefec0::/10unless an allow rule names the address, as it refuses10.0.0.0/8; before, both were reachable through a wildcard allow, andfec0::/10was treated as public space. It also refuses a TLS tunnel whoseClientHellocarries an encrypted server name under the codepoints of ECH drafts 08 to 12 (0xfe08to0xfe0c), ruleproxy-sni, as it already did for0xfe0dand ESNI (#767).openmoat runon Linux refusespidfd_getfd, which copies an open file (a socket, a token file) out of another process past every path rule;pidfd_openstays allowed (#767).- A download piped into a versioned Python (
curl … | python2.7) is now denied bypipe-to-shellalso when another command follows it on the line (curl … | python2.7; true); before, only the line ending in it was (#768). openmoat doctorandopenmoat statusread the proxy’s launchd or systemd service file back: an environment variable other thanMOAT_HOME(DYLD_INSERT_LIBRARIES,LD_PRELOAD, anEnvironmentFile=), any other change from whatopenmoat proxy installwrites, or a mode open to others is a problem, withopenmoat proxy installnamed to write it again (#768).- A glob that names more than can be listed (more than 256 paths, 1024 directories or 8 levels of
**) or that cannot be matched the way the shell does now makes the call need review, as a line past the atom or length limit already did; before, the default policy deferred it, so a secret past the bound could reach the agent’s own prompt (#768). - An MCP call’s arguments under keys OpenMoat does not know are now checked for file paths: a string that starts at
/,\, a drive,~orfile:(mcp__custom__run {"input": "~/.ssh/id_rsa"}) is checked as a file read against the policy’sdenyrules, sosecrets-pathsdenies it as it denies the same path underpath. Only deny rules apply to such a value, and never as a write, so a path no deny rule names, a relative word or a bare~in some text field changes nothing and adds no prompt (#768). - A
)between a download and the shell it is piped to no longer hides the pipe:curl URL)|bash ; trueand(curl URL) | sh; trueare denied bypipe-to-shell, ascurl URL | bashis. A group’s parentheses neither start nor end a pipe chain, in every check that reads one (found by the shell fuzz target) (#768). - A download substituted into the text a shell runs (
sh -c "$(curl …)",bash -c "$(wget -qO- …)", also behind a wrapper such asenv timeout 60 bash -c "$(curl …)") is now denied bypipe-to-shelllikecurl … | sh: the classifier reports it as the same canonical pipeline.eval "$(curl …)"gets that pipeline too.echo "$(date)"and a single-quotedsh -c '$(…)'are unchanged (#768). openmoat statusandopenmoat doctorread Claude Code’s managed settings (withmanaged-settings.d/), Gemini CLI’s system settings and defaults and Codex’srequirements.toml, read-only, and call the agent not protected when one turns hooks off (disableAllHooks,hooksConfig,[features] hooks = false) or runs only its own hooks without OpenMoat’s (allowManagedHooksOnly,allow_managed_hooks_only), naming the file and key; a missing or unreadable file says nothing (ADR-068) (#768).- A command string handed to a shell by a program OpenMoat does not know (
mywrap sh -c 'cat ~/.ssh/id_rsa',poetry run bash -lc '…') is now checked as the command it is, so a deny in it is no longer deferred; the commands containers run (docker,podman,nerdctl,kubectl,oc) are left tocontainer-host(LIMITS.md) (#768). openmoat guardsends a hook call toopenmoat runonly from inside the run’s sandbox: its own lock refused by Seatbelt on macOS, or under the seccomp filteropenmoat runapplies on Linux. A hook outside any run whose environment setsMOAT_GUARD_SOCKETandMOAT_GUARD_TOKENis decided where it is, and arun-guard-outsiderow records that the variables were there; before, a listener at that address that repeated the nonce answered every call (ADR-070) (#770).openmoat rundecides relayed hook calls only for its own agent and its own sessions: a call for another host, a session the audit log already holds from outside the run (unless the agent’s own session start resumes it), arun-…session, or a 65th session gets a deny and arun-guard-hostorrun-guard-sessionrow. A relayed call no longer leaves an MCP ticket. Before, any code in the run’s sandbox (a script, a test runner) could useMOAT_GUARD_TOKENto write rows under any host and session and to leave tickets anopenmoat mcp proxyoutside the run would take (ADR-070) (#770).- An agent’s write that turns a host’s hook off in a project’s settings is denied (
project-settings) instead of needing review:[features] hooks = falsein.codex/config.toml, a.pi/settings.jsonextensionsentry that excludes OpenMoat’s extension, anopencode.jsonplugin entry that removes OpenMoat’s plugin. The guard works out the content aWrite, anEdit, pi’s and OpenCode’seditor anapply_patchleaves and asks the host’s own settings reader; every other change to those files still needs review (#770). openmoat runon Linux compares each deny rule’s path where it resolves, as it does the--writepaths it grants: with~/.claudea link,--write ~/.claudenow keepssettings.jsonin the linked folder read-only in the network namespace and under--isolate, Landlock’s list of denies it cannot enforce names it, and without a namespace the run refuses as for an unlinked folder (#770).openmoat mcp acceptnow shows tag characters, variation selectors, the soft hyphen, invisible operators and every other format character as?, and says how many invisible characters a tool definition holds, so a description that looks harmless in the terminal cannot hide text the model reads; such a tool is never pinned on first sight, even undermcp: { trust_first_sight: true }(#770).- The MCP gateway now reads a wrapped server’s error answer to a tool call as it reads a result: a host, path or command in the error’s
messageordatais injected input for the session (injected-input), and a piece of it carried to another server’s sending tool needs review (mcp-cross-server); an error the gateway cannot record reaches the agent as OpenMoat’s error instead (#770). - The MCP gateway now refuses a wrapped server’s sampling request that asks for the session’s context (
includeContextother thannone), keeps the text of the server’s other requests to the agent as untrusted content of the session it serves (injected-input, and the session counts as having read untrusted content), and passes the agent’s answer to the server only for a request the server sent (#770). openmoat mcp proxynow pins a server’sinitializeinstructions and server information, and each entry of its prompt, resource and resource-template listings, with its tools: new or changed instructions are taken out of the answer the agent gets, a new or changed prompt or resource is left out of its listing (and a held prompt is not filled in), untilopenmoat mcp acceptshows what changed; a new version number alone asks nothing, and a server accepted before this release is not asked about again. Accepted instructions are kept as untrusted content of each session that calls the server (injected-input, and the session counts as having read untrusted content) (ADR-069) (#770).openmoat mcp wrapnow writes--host <agent>into each wrapped definition (and adds it to one wrapped before, the next time you run it), and the MCP gateway takes only that agent’s hook decisions, preferring the session it already served, so two agents or two sessions sending the same call each have the result kept for their own session (#770).openmoat runon Linux keeps commands from creating an agent’s hook settings the project lacks (.claude/settings.local.json,.gemini/settings.json,.github/copilot/settings.local.json,.codex/hooks.json,.cursor/hooks.json, …), with which the next session would run without OpenMoat’s hook: in the network namespace and under--isolateeach is a read-only{}for the session, its folders pinned, removed when the agent exits; without a namespaceopenmoat runnames each that appeared when the agent exits (#770).- A newline right after
|no longer hides the pipe from the check of a program that runs what it reads:curl URL |followed byrubyon the next line, then another command, is denied bypipe-to-shellascurl URL | rubyis (found by the shell fuzz target) (#770). openmoat proxysearches the plain-HTTP answer to a request aplain_http: truesecret’s value went into for that value, as it already searched a terminated tunnel’s answer: the connection closes before the value reaches the agent, and aproxy-secretrow records it. Before, an owner host that echoed the request (a debugging endpoint, an error page quoting a header) handed the agent the value over plain HTTP (#770).- The proxy session key (
~/.moat/proxy.key) and the proxy CA’s key are refused, not used, when others may read them (any group or other mode bit) or replace them (a folder others may write).openmoat proxy, the guard andopenmoat runstop with the file, its mode and the fix (chmod 600, or make a new key), andopenmoat doctorlists such a key. Before, a key restored from a backup with other modes, or kept on a shared disk, was used as it was, and another user who could read it could sign session credentials or certificates (#770). openmoat runno longer lets a repository switch the package release age off: abefore=in the project’s.npmrcorexclude-newerin itspyproject.tomloruv.tomlis kept only when it is a stricter (earlier) date, the TOML key is parsed instead of searched for as text, the person’s own~/.npmrcand~/.config/uv/uv.tomlare honoured, and a project with auv.lock, which still gets noUV_EXCLUDE_NEWER, is named on every start (#770).openmoat rungives each run a temp directory of its own (openmoat-run-<random>, mode0700, the agent’sTMPDIR, removed when the run ends) instead of granting the shared one, so commands no longer write other programs’ and sessions’ temp files (#770).- A new deny rule,
kerberos-tickets, denies Kerberos ticket caches (/tmp/krb5cc_*) to the agent’s tools (hook_onlyfor the host sandboxes), andopenmoat runapplies it in its sandbox with the cacheKRB5CCNAMEnames added; on Linux the network namespace hides the ones in a read root (#770). - Claude in Chrome’s tab lists no longer escape session taint when the tool comes from a server an agent’s MCP configuration defines under the name
claude-in-chrome: the real one is provided by Claude Code itself, so a configured server of that name is another program, and once accepted every result of it taints the session;openmoat mcp acceptsays so when it shows such a server, andtaint: { defined_servers: [...] }turns the built-in list off by hand (POLICY.md §4.1, ADR-069) (#770). - Refusals made before a credential is verified no longer write one audit row each:
openmoat proxy’s andopenmoat run’s407(proxy-session), a request head the proxy cannot read (proxy-request) and a hook relay call with a wrong token (run-guard-token) are recorded at once the first time, then counted, with one row per 10 seconds per kind that says how many it stands for. Before, any local process could grow the audit log without limit until it could no longer be written, after which the proxy and the guard refused everything (ADR-070).openmoat-proxyexports the counter ascoalesce(#770).
- A temporary proof-of-concept setting for ADR-062 step 0, not a feature: with
OPENMOAT_ADR062_POC=1,openmoat runterminates HTTPS toapi.github.com(with a proxy CA thatopenmoat proxy ca init, run with the same setting, made to cover it) and refusesPOST /gistsand anything posted under it with ruleproxy-request-ruleand an audit row, before anything reaches GitHub; every other request there passes unchanged.scripts/ci/adr062-poc.pymeasures which clients accept the CA and the latency added. It goes away when therequests:policy section replaces it (#764). openmoat bench --reportanswers six security questions (“can an agent read ~/.ssh/id_rsa?”, “can a build script read an agent’s credentials?”, “can MCP output steer a write?”, “can data go out through an allowed host?”, “can the agent turn OpenMoat off or edit its policy?”, “does a hook crash or timeout fail closed?”) one row per layer that holds each: the policy decision, the host hook, the OS sandbox (the attack run for real underopenmoat runin a throwaway home) and the network boundary (the proxy’s decision). Each row is PASS, FAIL or NOT TESTED HERE with the reason, never a pass for a layer that did not run here, with the OpenMoat version, the system and its version, each agent’s version when found, and the scenario or probe id that reproduces it. Text,--format jsonand--format markdown; the command exits 1 when an exercised layer fails, for CI.--scratch-dirputs the throwaway home elsewhere (on Linux the OS rows need one outside/tmp) (ADR-065, #767).- MoatBench scenario
file-tool-reads-agent-login: reading another agent’s login file with a file tool is denied (agent-credentials) (#767). - A required protection level: a
require:section in your policy (protection: hook-and-os-sandboxorhook-only, and per agent underagents:) makes OpenMoat deny every call of an agent below that level (protection-required), with a block message that says what is missing and the one step that fixes it (openmoat sandbox sync,openmoat run);openmoat runrefuses to start a program it cannot bring to the level, andopenmoat status,openmoat doctorand the home screen show the level each agent must be at and whether it is met. A repository policy or a policy pack can raise the level and never lower it. Off unless you set it (ADR-064) (#767). openmoat serveshows whatopenmoat status,show,reportandwhyshow in a browser on this machine, and the same JSON their--format jsonprints under/api/. It listens on 127.0.0.1 or[::1]only and refuses any other address, prints a link with a token made for the run once, and answers only requests that carry it, name the server as127.0.0.1,localhostor[::1]and come from no other site; it is read-only (GETonly, no path changes anything), sets no cookie and no CORS header, and its pages run no script under a strict Content Security Policy. Likeopenmoat allow, it refuses to start when an agent started it, and the default policy deniesopenmoat serveto agents (kernel-self) (#767).- The cross-host consistency suite now also decides calls made after a secret read or untrusted content (session taint) and with the state directory moved, and sends one MCP tool call per agent the way that agent sends it, so an agent whose payload drops a fetch, a path or an MCP tool’s arguments fails the suite instead of getting a different verdict (#768).
docs/COVERAGE.mdmaps each threat class to the OWASP Top 10 for Agentic Applications risks it is a case of (ASI02 to ASI06) and counts the fixtures per risk, and MoatBench’s obfuscation set has four more scenarios:$IFSin place of a space, a here-string handed to a shell,xargs sh -crunning a download, andevalof a string built from variables (#768).- The sandbox differential suite also checks Codex’s permissions profile, Cursor’s
sandbox.jsonand the masksopenmoat runadds inside its grants on Linux: every sampled path the policy denies must be denied there too or named in the backend’s report (#768). - The weekly check of each agent’s latest release now proves Claude Code’s
SessionStarthook and itsPostToolUsehook (a call to a host an earlier call’s output named is held asinjected-input), and copies every payload a real agent sendsopenmoat guardinto its artefact, scrubbed, for the adapters’ captured fixtures; only that job’s build (--features capture-payloads) copies anything, no release does (#768). openmoat allow --site,--dirand--alwaystake--for <duration>(30m,2h,3d,1w, at most 366 days): the rule ends on its own, and from then on the call gets the policy’s own decision again. Without--fora rule lasts until removed, as before. An end that cannot be read, or a clock set back to before the rule was given, counts as ended; granting the same site, directory or command again replaces its end.openmoat allowedshows when each rule ends and marks ended onesEXPIRED(--format json:expires),openmoat statusandopenmoat doctorname rules that ended or end within a day, andopenmoat allow --pruneremoves the ended ones.approved.yamlholding an end is written asversion: 2, which earlier releases refuse rather than read as permanent (#769).--since(report,show,audit,replay) also reads minutes and seconds (30m) (#769).
Changed
Section titled “Changed”- Breaking
openmoat-core:Noticehas a new public fieldnext(Option<String>, the person’s step where the deciding check has its own; set it toNonewhere you build a notice yourself, or start fromNotice::default()), andopenmoat-hostsexportsNEVER_SUGGESTED, the words a block message never suggests (#763). - OpenMoat’s own checks now send the same block message as a titled policy rule: when a call is held because it uses a command, host or path from a page the agent read (
injected-input), after the session read untrusted content (session-taint), or denied because OpenMoat’s own files changed (kernel-integrity), and for the other built-in checks, the agent and you read what was stopped, why, and one step for you (“approve it in this prompt only if you asked for it yourself”, “runopenmoat doctorin your terminal to see what changed”);openmoat whyandopenmoat watchshow their titles too (ADR-059) (#763). - Breaking
openmoat-proxy:Proxyhas a new public fieldrequests(&Requests; set it to&Requests::default()where you build a proxy yourself), andRequests(a host’sdenyrequest rules,Requests::denyandRequests::hosts),RequestRuleErrorandRULE_REQUEST_RULE(proxy-request-rule) are new, for the ADR-062 step 0 proof of concept (#764). - Breaking
openmoat-core:TaintSettingshas a new public fieldmetadata_tools(Vec<String>, the MCP tools whose results do not taint a session beyond the built-in list; set it toVec::new()where you build the settings yourself, or start fromTaintSettings::default()) (#766). - A browser’s tab list no longer taints the session: after only Claude in Chrome’s
tabs_context_mcp,tabs_create_mcp,tabs_close_mcp,list_connected_browsers,select_browser,switch_browser,resize_windoworshortcuts_list, writes to memory, instruction and CI files are decided as in a clean session, and files the session writes carry no provenance taint. A host, path or command in a tab’s title or URL is still injected input (injected-input, naming the tab tool). Everything else still taints the session as before: the page-content tools (get_page_text,read_page,find,navigate,javascript_tool, the console and network logs, screenshots,form_input,file_upload,upload_image,gif_creator), every other MCP server’s tools, fetches, web searches and unknown tools.taint: { metadata_tools: [...] }adds another server’s metadata tools by full name (POLICY.md §4.1, ADR-057 amendment) (#766). - Breaking
openmoat-core:Policyhas new public fieldsrequire(Option<Require>) andrequire_added(the requirements a repository policy or pack merged in), andRepoPolicya new public fieldrequire(Option<Require>); set them toNoneand an emptyVecwhere you build one field by field. New exportsRequire,RequiredLevel,RequiredBy,RequirementandPolicy::required_for,Policy::add_requirement(#767). - Tests pin the nesting limit (4 levels) and the brace limit (256 words): at the limit a command is classified as written, past it the call needs review; the shell fuzz target also checks that appending
; trueto a decided line never lowers its verdict (#768). - Breaking
openmoat-core:Action::McpToolhas a new fieldvalue_reads(Vec<String>, paths only a value under an unknown argument key looks like, checked againstdenyrules only; set it toVec::new()where you build the variant yourself, or start fromAction::mcp).openmoat-sdk’sMcpCallgains the same field, thevalue_readsbuilder and the optionalvalue_readskey in its JSON form (#768). openmoat bench --reportnames its hook rows “host model (golden payloads)” (host-modelin JSON): they come from OpenMoat’s own model of each host’s payload and reply, not from running the host. The host’s own handling of a failed hook is its own “real host” row, always NOT TESTED HERE, and the report no longer prints the version of a program named like the host, since no host program ran (#770).- Breaking
openmoat-hosts:HookRequesthas a new public fieldpatch(Option<String>, theapply_patchenvelope a call applies; set it toNonewhere you build a request yourself).SettingsReaderhas a new methodproject_switched_offwith a default;openmoat-coreexportspatch_replayandPatchReplayed, which work out the content a patch leaves in each file (#770). - CI runs
openmoat runas a stock Ubuntu gets it, Landlock and seccomp without bubblewrap, end to end: the port-only notice,--netns=requireexiting 64, the refused--isolateand--writeoutside the project, and the hostile project scripts ofdocs/EVIDENCE.md. Every other Linux job installs bubblewrap, so that path had not run in CI before (#770). - Breaking
openmoat-core:TaintSettingshas a new public fielddefined_servers(Vec<String>, the MCP servers a configuration defines; the built-in metadata tools do not apply while it namesBUILTIN_METADATA_SERVER; set it toVec::new()where you build the settings yourself, or start fromTaintSettings::default()), andBUILTIN_METADATA_SERVERis exported (#770).
openmoat policy upgradeno longer lists a narrow pattern the default folded into a broader one (0.17.0’s.vscode/tasks.jsoninto.vscode/**) as “Fewer interruptions”: a pattern a rule still covers is counted as “now matched by a broader one”, and theopenmoat watchexample in USAGE.md marks a deferred call→(#765).- The check for an agent among a command’s parent processes recognises an agent started through an interpreter with options before its script (
node --no-warnings …/@github/copilot/index.js,bun --smol …,python3 -X utf8 …), so person-only commands refuse it as they refusenode …/index.js(#767). openmoat initfrom a shell whosePATHfinds none of the programs it pins (an emptyPATH) refuses with exit 64 and writes nothing, instead of recording a search path that pins nothing and reporting success; over an existing snapshot it keeps that one and says so (#767).- In a long Claude Code session whose history OpenMoat’s cache had not caught up on (after an upgrade, a policy change, or in a new directory), calls were denied with
kernel-erroruntil a few calls had read through the backlog. ThePostToolUsehook now reads on through the session after each call ran, so the next call is decided within its own time; a call that still runs out of time says plainly that it was stopped, not judged, and that running it again reads on (#767). openmoat sandbox showfor Codex now lists the reads its profile takes away: a write-deny glob has no read-only form, so sandboxed commands cannot read those files either, and a policy that allows by default gets only the paths it lists (#768).- A lock that pins a Codex
config.tomlboth whole and by OpenMoat’s profile part is caught as a bug when it is saved (in debug builds and tests), and an audit-log migration that finds another process already migrated decides from the version it read under the lock, refusing a newer schema, instead of starting over (#768). - THREAT_MODEL.md no longer says Codex hides a command’s
workdir: it describes howopenmoat guarddecides a call from the session’s directory when Codex sends acwdoutside the project, and the paragraph is now generated from each agent’s spec so it cannot go stale again (#768). openmoat benchcounts a run assandboxedonly when every step the hook let through is one the scenario expects OpenMoat’s OS sandbox to hold; one marked step no longer counts the whole run. The column is marked as expected, not run, under the table (#770).