Skip to content

OpenMoat 0.8.0

Released 2026-10-20. GitHub release v0.8.0.

The command is now openmoat (moat still runs it for a few releases), and a round of review fixes: unquoted variables split as bash splits them, environment reads in interpreter one-liners, project Claude Code settings that turn hooks off, a network namespace for openmoat run on Linux, curl and wget downloads decided like a fetch, openmoat demo, and each guard call decided by the exact policy bytes it checked.

  • moat run on Linux starts the agent in a network namespace of its own, with only loopback, where bubblewrap can run: Landlock restricts TCP by port only, so a command could connect to any host on the proxy’s port and go around the proxy’s host checks, secrets broker, taint and audit. The proxy’s port is relayed into the namespace, as under --isolate; files and the rest of the sandbox are unchanged. Where bubblewrap is missing or cannot create user namespaces, moat run starts as before and says on every start that the network is restricted by port only, and moat doctor warns (#609).
  • build-credentials denies the agent reading or writing ~/.m2/settings.xml, ~/.m2/settings-security.xml and ~/.gradle/gradle.properties, through shell commands, file tools and MCP arguments. A deny group can now say hook_only: true: the host sandboxes and moat run leave its paths out, so mvn and gradle run inside them still read their settings, and mvn package or ./gradlew build keep their verdict. Existing policies get it with moat policy upgrade (#603).
  • Redaction of the audit log, moat audit export and the bug-report bundle also masks credentials whose name holds the credential word as one part (AWS_SECRET_ACCESS_KEY=…, GH_TOKEN=…, DATABASE_PASSWORD=…, access_token=…), flags with the value as the next argument (--token …), and the password of -u/--user user:password; words that only start with one (tokenizer, secretary) are kept (#609).
  • moat init over an existing policy lock refuses when an agent is among its parent processes, and refuses over a drifted lock when there is no terminal, pointing at moat doctor --accept; a person at a terminal is shown what drifted before the re-pin, and a first install is unchanged (#609).
  • A Claude Code ConfigChange for a project’s .claude/settings.json or .claude/settings.local.json (a git pull or checkout mid-session, say) is blocked (project-settings) when the file sets disableAllHooks, which turned OpenMoat’s hooks off, its own hooks, env, a command setting (apiKeyHelper, awsAuthRefresh, awsCredentialExport, otelHeadersHelper, statusLine, subagentStatusLine, fileSuggestion), an enabled plugin or sandbox settings, or cannot be parsed; such files were loaded as unpinned. Permission lists still load. Claude Code loads these files at session start without a ConfigChange, so moat doctor and moat status warn about them in the current project, and INSTALL.md describes managed settings for teams (#609).
  • A shell variable set on the line and used unquoted is split into words where its value holds a space, tab or newline (or a character of an IFS the line set), and a glob in its value is expanded, as the shell does, so each word is checked as its own argument; a quoted use ("$x") stays one word (#609).
  • Inline interpreter code (python -c, node -e, ruby -e, perl -e, php -r and the others OpenMoat scans) that reads an environment variable by name (os.environ['X'], os.getenv('X'), process.env.X, ENV['X'], $ENV{X}, getenv('X')) is checked as a read of that variable, so env-secrets applies; code that prints or converts the whole environment, or reads a variable whose name is chosen at run time, is denied by env-dump (@env-dump). Existing policies get it with moat policy upgrade (#609).
  • moat demo shows, in a few seconds, what OpenMoat decides for a fixed list of example agent calls (everyday work, a private key read, a key sent out, the same read base64-encoded, a misspelled package, a plain download, switching OpenMoat off), with the installed policy or the default one: command, verdict, rule and reason. It decides them with the same engine as moat policy check; nothing runs, and no hook, setting or file is touched (#609).
  • The command is now openmoat (another project also ships a moat binary), and the Homebrew formula is crocodile-labs/tap/openmoat. A moat that runs the openmoat beside it is installed with it for a few releases, so existing hooks and scripts keep working; openmoat doctor says it will be removed. openmoat init rewrites hooks that run moat to run openmoat, backing up and re-pinning as usual, and every message and doc now says openmoat. kernel-self covers both names (bin/openmoat, Scoop’s apps/openmoat, openmoat allow and the other person-only commands); existing policies get it with openmoat policy upgrade, and the recorded binary’s other name is protected either way. State paths stay as they are: ~/.moat, a project’s .moat, refs/moat/anchors, Codex’s moat profile and the moat: reason prefix; renaming them is a separate decision (#611).
  • A curl or wget command that provably sends nothing but its URLs (curl https://docs.rs/serde, curl -sS https://example.com/f.txt -o f.txt, wget --max-redirect=0 https://example.com/a.tar.gz) is decided like a WebFetch of the same URL: it defers under the default policy instead of being denied by default.net, and counts as untrusted content for session taint. Every form that can send data stays denied for unlisted hosts: a body, form or upload, another method, a header, credentials, a config file, --next, following redirects (curl -L, wget without --max-redirect=0), a word the shell expands, an IP address or single-label host, and any option OpenMoat does not know. cloud-metadata, token-egress and pipe-to-shell still deny (ADR-035) (#609).
  • A change of terminalProgressBarEnabled in a pinned Claude Code settings.json no longer stops every call: like the other display settings it is reported as drift while the guard keeps deciding (#609).
  • README and INSTALL: the README opens with what OpenMoat decides and how it differs from built-in agent controls and pattern-list hooks, the quick start shows a verdict as step 2, installing shows how to check a release with gh attestation verify, the self-protection line says what the policy lock does not stop (with a new “What the lock is not” paragraph in POLICY.md), Windows is described as hook-only for Claude Code and Cursor, INSTALL notes the unrelated majorcontext/moat command, and the status reads “Usable daily” (#605).
  • Breaking openmoat-core (library API, breaking): RuleGroup has a hook_only field (ADR-034) (#603).
  • openmoat-hosts (library API): HostSpec::project_settings (ProjectSettingsSpec) names a host’s project settings files; moat doctor, moat status and the ConfigChange check read Claude Code’s from it (#610).
  • Breaking openmoat-hosts (library API, breaking): InstallSpec also lists the hook entries moat init writes (hooks, each a #[non_exhaustive] HookSpec with event, matcher, timeout and onFailure) and the hook file’s layout (hook_format, a HookFormat), and GUARD_BUDGET_S moves here; a test checks every host’s timeouts outlast it. The configuration directory table in INSTALL.md and the known gaps list in THREAT_MODEL.md are generated from the specs and checked by a test. Every hook entry moat init writes is unchanged (#602).
  • A directory named by git’s -C, --git-dir or --work-tree is read as a path, not taken for a host: git -C site.dev fetch origin was denied by default.net because site.dev reads like a domain. The remote a fetch, pull or push names is still checked as a host (#613).
  • moat guard and moat policy check read the policy lock and the policy file once per call: the policy is parsed from the same bytes whose digest was checked against the lock, so a file changed between the check and the load can no longer be the one decided by (#610).
  • moat run --isolate on Linux passes bubblewrap --disable-userns where bubblewrap accepts it (0.8 and later), so the agent cannot create user namespaces of its own inside the sandbox (#609).
  • moat run on macOS 12 and earlier refuses with a plain message (moat run needs macOS 13 or later; the agent hooks still apply the policy) instead of sandbox-exec’s unbound variable: TIOCSTI, and moat doctor warns there. The profile’s TIOCSTI deny is unchanged, and where the macOS version cannot be read moat run starts as before (#601).