Skip to content

OpenMoat 0.18.0

Released 2026-11-09. GitHub release v0.18.0.

  • A directory allowed with openmoat allow --dir no 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’s bin/, .devcontainer and 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 by openmoat doctor and openmoat status until openmoat policy upgrade brings it up to date, which only adds protection; openmoat allowed --format json lists directory grants under directories (#765).
  • OpenMoat no longer runs, pins or records a program found through a relative PATH entry (., node_modules/.bin): the --version probes of init, status and doctor (which OpenMoat Bar runs every minute), the pinned programs init records, the binary path written into hooks, the agent openmoat run starts by name, and the git that provenance and policy diff run all come from the absolute entries only, so a repository with a planted claude or git cannot 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 .ENV in a directory that folds case is hidden too; longer globs are reported as codex.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 init rewrites an existing entry, and doctor reads both forms (#767).
  • openmoat proxy ca init is person-only in the default policy too (kernel-self), by either name, by path and under the pseudo-terminal wrappers; expect, Python’s pty, tmux, screen and osascript running proxy ca, proxy install or proxy uninstall in 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 upgrade adds the lines to an existing policy (#767).
  • openmoat proxy no 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 name fd00::1:5432. The policy engine already kept a pattern with a port from matching IPv6 text; a test now pins both layers (#767).
  • openmoat proxy refuses the reserved range 240.0.0.0/4 and the deprecated site-local range fec0::/10 unless an allow rule names the address, as it refuses 10.0.0.0/8; before, both were reachable through a wildcard allow, and fec0::/10 was treated as public space. It also refuses a TLS tunnel whose ClientHello carries an encrypted server name under the codepoints of ECH drafts 08 to 12 (0xfe08 to 0xfe0c), rule proxy-sni, as it already did for 0xfe0d and ESNI (#767).
  • openmoat run on Linux refuses pidfd_getfd, which copies an open file (a socket, a token file) out of another process past every path rule; pidfd_open stays allowed (#767).
  • A download piped into a versioned Python (curl … | python2.7) is now denied by pipe-to-shell also when another command follows it on the line (curl … | python2.7; true); before, only the line ending in it was (#768).
  • openmoat doctor and openmoat status read the proxy’s launchd or systemd service file back: an environment variable other than MOAT_HOME (DYLD_INSERT_LIBRARIES, LD_PRELOAD, an EnvironmentFile=), any other change from what openmoat proxy install writes, or a mode open to others is a problem, with openmoat proxy install named 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, ~ or file: (mcp__custom__run {"input": "~/.ssh/id_rsa"}) is checked as a file read against the policy’s deny rules, so secrets-paths denies it as it denies the same path under path. 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 ; true and (curl URL) | sh; true are denied by pipe-to-shell, as curl URL | bash is. 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 as env timeout 60 bash -c "$(curl …)") is now denied by pipe-to-shell like curl … | sh: the classifier reports it as the same canonical pipeline. eval "$(curl …)" gets that pipeline too. echo "$(date)" and a single-quoted sh -c '$(…)' are unchanged (#768).
  • openmoat status and openmoat doctor read Claude Code’s managed settings (with managed-settings.d/), Gemini CLI’s system settings and defaults and Codex’s requirements.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 to container-host (LIMITS.md) (#768).
  • openmoat guard sends a hook call to openmoat run only from inside the run’s sandbox: its own lock refused by Seatbelt on macOS, or under the seccomp filter openmoat run applies on Linux. A hook outside any run whose environment sets MOAT_GUARD_SOCKET and MOAT_GUARD_TOKEN is decided where it is, and a run-guard-outside row records that the variables were there; before, a listener at that address that repeated the nonce answered every call (ADR-070) (#770).
  • openmoat run decides 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), a run-… session, or a 65th session gets a deny and a run-guard-host or run-guard-session row. A relayed call no longer leaves an MCP ticket. Before, any code in the run’s sandbox (a script, a test runner) could use MOAT_GUARD_TOKEN to write rows under any host and session and to leave tickets an openmoat mcp proxy outside 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 = false in .codex/config.toml, a .pi/settings.json extensions entry that excludes OpenMoat’s extension, an opencode.json plugin entry that removes OpenMoat’s plugin. The guard works out the content a Write, an Edit, pi’s and OpenCode’s edit or an apply_patch leaves and asks the host’s own settings reader; every other change to those files still needs review (#770).
  • openmoat run on Linux compares each deny rule’s path where it resolves, as it does the --write paths it grants: with ~/.claude a link, --write ~/.claude now keeps settings.json in 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 accept now 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 under mcp: { 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 message or data is 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 (includeContext other than none), 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 proxy now pins a server’s initialize instructions 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), until openmoat mcp accept shows 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 wrap now 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 run on 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 --isolate each is a read-only {} for the session, its folders pinned, removed when the agent exits; without a namespace openmoat run names 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 by ruby on the next line, then another command, is denied by pipe-to-shell as curl URL | ruby is (found by the shell fuzz target) (#770).
  • openmoat proxy searches the plain-HTTP answer to a request a plain_http: true secret’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 a proxy-secret row 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 and openmoat run stop with the file, its mode and the fix (chmod 600, or make a new key), and openmoat doctor lists 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 run no longer lets a repository switch the package release age off: a before= in the project’s .npmrc or exclude-newer in its pyproject.toml or uv.toml is kept only when it is a stricter (earlier) date, the TOML key is parsed instead of searched for as text, the person’s own ~/.npmrc and ~/.config/uv/uv.toml are honoured, and a project with a uv.lock, which still gets no UV_EXCLUDE_NEWER, is named on every start (#770).
  • openmoat run gives each run a temp directory of its own (openmoat-run-<random>, mode 0700, the agent’s TMPDIR, 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_only for the host sandboxes), and openmoat run applies it in its sandbox with the cache KRB5CCNAME names 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 accept says so when it shows such a server, and taint: { 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 and openmoat run’s 407 (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-proxy exports the counter as coalesce (#770).
  • A temporary proof-of-concept setting for ADR-062 step 0, not a feature: with OPENMOAT_ADR062_POC=1, openmoat run terminates HTTPS to api.github.com (with a proxy CA that openmoat proxy ca init, run with the same setting, made to cover it) and refuses POST /gists and anything posted under it with rule proxy-request-rule and an audit row, before anything reaches GitHub; every other request there passes unchanged. scripts/ci/adr062-poc.py measures which clients accept the CA and the latency added. It goes away when the requests: policy section replaces it (#764).
  • openmoat bench --report answers 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 under openmoat run in 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 json and --format markdown; the command exits 1 when an exercised layer fails, for CI. --scratch-dir puts 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-sandbox or hook-only, and per agent under agents:) 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 run refuses to start a program it cannot bring to the level, and openmoat status, openmoat doctor and 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 serve shows what openmoat status, show, report and why show in a browser on this machine, and the same JSON their --format json prints 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 as 127.0.0.1, localhost or [::1] and come from no other site; it is read-only (GET only, no path changes anything), sets no cookie and no CORS header, and its pages run no script under a strict Content Security Policy. Like openmoat allow, it refuses to start when an agent started it, and the default policy denies openmoat serve to 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.md maps 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: $IFS in place of a space, a here-string handed to a shell, xargs sh -c running a download, and eval of a string built from variables (#768).
  • The sandbox differential suite also checks Codex’s permissions profile, Cursor’s sandbox.json and the masks openmoat run adds 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 SessionStart hook and its PostToolUse hook (a call to a host an earlier call’s output named is held as injected-input), and copies every payload a real agent sends openmoat guard into 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, --dir and --always take --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 --for a 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 allowed shows when each rule ends and marks ended ones EXPIRED (--format json: expires), openmoat status and openmoat doctor name rules that ended or end within a day, and openmoat allow --prune removes the ended ones. approved.yaml holding an end is written as version: 2, which earlier releases refuse rather than read as permanent (#769).
  • --since (report, show, audit, replay) also reads minutes and seconds (30m) (#769).
  • Breaking openmoat-core: Notice has a new public field next (Option<String>, the person’s step where the deciding check has its own; set it to None where you build a notice yourself, or start from Notice::default()), and openmoat-hosts exports NEVER_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”, “run openmoat doctor in your terminal to see what changed”); openmoat why and openmoat watch show their titles too (ADR-059) (#763).
  • Breaking openmoat-proxy: Proxy has a new public field requests (&Requests; set it to &Requests::default() where you build a proxy yourself), and Requests (a host’s deny request rules, Requests::deny and Requests::hosts), RequestRuleError and RULE_REQUEST_RULE (proxy-request-rule) are new, for the ADR-062 step 0 proof of concept (#764).
  • Breaking openmoat-core: TaintSettings has a new public field metadata_tools (Vec<String>, the MCP tools whose results do not taint a session beyond the built-in list; set it to Vec::new() where you build the settings yourself, or start from TaintSettings::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_window or shortcuts_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: Policy has new public fields require (Option<Require>) and require_added (the requirements a repository policy or pack merged in), and RepoPolicy a new public field require (Option<Require>); set them to None and an empty Vec where you build one field by field. New exports Require, RequiredLevel, RequiredBy, Requirement and Policy::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 ; true to a decided line never lowers its verdict (#768).
  • Breaking openmoat-core: Action::McpTool has a new field value_reads (Vec<String>, paths only a value under an unknown argument key looks like, checked against deny rules only; set it to Vec::new() where you build the variant yourself, or start from Action::mcp). openmoat-sdk’s McpCall gains the same field, the value_reads builder and the optional value_reads key in its JSON form (#768).
  • openmoat bench --report names its hook rows “host model (golden payloads)” (host-model in 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: HookRequest has a new public field patch (Option<String>, the apply_patch envelope a call applies; set it to None where you build a request yourself). SettingsReader has a new method project_switched_off with a default; openmoat-core exports patch_replay and PatchReplayed, which work out the content a patch leaves in each file (#770).
  • CI runs openmoat run as a stock Ubuntu gets it, Landlock and seccomp without bubblewrap, end to end: the port-only notice, --netns=require exiting 64, the refused --isolate and --write outside the project, and the hostile project scripts of docs/EVIDENCE.md. Every other Linux job installs bubblewrap, so that path had not run in CI before (#770).
  • Breaking openmoat-core: TaintSettings has a new public field defined_servers (Vec<String>, the MCP servers a configuration defines; the built-in metadata tools do not apply while it names BUILTIN_METADATA_SERVER; set it to Vec::new() where you build the settings yourself, or start from TaintSettings::default()), and BUILTIN_METADATA_SERVER is exported (#770).
  • openmoat policy upgrade no longer lists a narrow pattern the default folded into a broader one (0.17.0’s .vscode/tasks.json into .vscode/**) as “Fewer interruptions”: a pattern a rule still covers is counted as “now matched by a broader one”, and the openmoat watch example 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 refuse node …/index.js (#767).
  • openmoat init from a shell whose PATH finds none of the programs it pins (an empty PATH) 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-error until a few calls had read through the backlog. The PostToolUse hook 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 show for 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.toml both 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 how openmoat guard decides a call from the session’s directory when Codex sends a cwd outside the project, and the paragraph is now generated from each agent’s spec so it cannot go stale again (#768).
  • openmoat bench counts a run as sandboxed only 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).