Skip to content

OpenMoat 0.21.0

Released 2026-11-13. GitHub release v0.21.0.

New in this release, with setup and limits:

All of this release’s changes are security changes. They are grouped below by what they touch; each links its pull request.

  • openmoat run no longer passes files, sockets or directories its launcher left open to the agent: before the sandboxed program starts (each tier, and inside bubblewrap again), every descriptor from 3 up is marked close-on-exec, and the run refuses to start where that cannot be done; Landlock and Seatbelt do not check a descriptor opened before they apply (#803).

Injected input for more agents and PowerShell

Section titled “Injected input for more agents and PowerShell”
  • Injected input (ADR-057) is now linked for Codex, Gemini CLI and GitHub Copilot CLI too: openmoat init adds each one’s after-call hook (PostToolUse, AfterTool, postToolUse) beside the pre-call one, so a host, path or command that a fetched page, an issue or an MCP result named makes a later call that uses it need review (injected-input). The payloads follow what the weekly latest-agents run recorded from each real agent. GitHub Copilot CLI’s entries now name their event (openmoat guard --event), since its payloads name none: a payload is a report of what a call returned only when the postToolUse entry sent it. After upgrading, run openmoat init once; in Codex, trust OpenMoat’s new hook in /hooks (#804).
  • Injected input now covers PowerShell commands (Gemini CLI’s shell on Windows, the PowerShell tools of Claude Code and the Cline CLI). OpenMoat does not parse them, so it reads their text for the hosts and paths they name: a host or a path outside the project that untrusted output named makes the command need review (injected-input), and a PowerShell command that reads from a host the policy does not allow (a URL, a web client’s target, -Uri, -ComputerName, …), or runs gh, glab or tea anywhere in its line, has its output kept like a curl of it. Windows paths are read in untrusted output and in PowerShell alike (C:\…, ~\…, $env:USERPROFILE\…, %USERPROFILE%\…); a UNC path, another variable, or a host or path built at run time is not seen (#806).
  • The audit store now redacts an injected-input source before it shortens it, so a credential in a long command is never cut where no pattern finds it (#806).
  • Gemini CLI’s hook-failure facts now say what its source does: a hook that cannot start (openmoat missing) blocks the call, a hook that crashes or exits 1 lets it run; docs/LIMITS.md, docs/PROTECTION.md and openmoat status --format json (new cannot_start) agree with docs/INSTALL.md. openmoat status no longer says goose’s builtin and platform extensions run nothing on this machine: they run inside goose’s own process (#806).
  • The new wsl-crossing deny rule stops an agent from handing work to the Windows Subsystem for Linux, where no Windows path rule reaches: wsl, wslg, wslconfig, bash.exe in the system folders and the listed Store distribution launchers, read as Windows reads a path, also as the program of a cmd or PowerShell line or in a start line; any word or path naming the \\wsl$ or \\wsl.localhost share, the \\?\UNC\ and GLOBALROOT forms included; and copying the launchers. A cmd or PowerShell line beyond simple commands (a variable, a bracket, a block, a call operator in PowerShell; ^, %, !, for, call in cmd), or one naming wsl or bash anywhere, needs review (#805).
  • openmoat init gives the state directory an access list of your account and SYSTEM only (inheritance off, every other entry removed, set and checked through Win32 calls, no program started) and refuses a state directory another account owns; openmoat doctor reads back which account owns it and its access list and names any other account that may change or read it. It keeps other accounts out, not the agent, which runs as you; doctor says so (#805).
  • openmoat doctor shows which Windows sandbox mode Codex’s config.toml selects, and warns under unelevated, which does not enforce OpenMoat’s read denies; it names WSL2 as the way to OS confinement where WSL is installed, and says under WSL1 that openmoat run needs WSL2 (#805).

A record of every run’s boundary, checked on Linux

Section titled “A record of every run’s boundary, checked on Linux”
  • Every openmoat run writes one run-boundary audit row with the sandbox it really started with: the tier asked for and the one that started, each downgrade and why (a project top opened by sandbox.project_top: writable included), the network mode, the Landlock ABI as restrict_self reported it, whether tool commands get the relay token, and each restriction’s available / configured / applied / tested; openmoat run --print-boundary [--format json] prints the same without starting the agent. The run-landlock-abi row is replaced by this one (#807).
  • On Linux the run reads the agent’s /proc/<pid>/status right after it starts and stops it, with every process it started, when NoNewPrivs: 1, Seccomp: 2 with this run’s filters, or an enforced Landlock ruleset is missing, or when the row cannot be written, inside bubblewrap too (#807). How to read it: The boundary record.
  • On Linux, what the policy denies inside the project now holds in every openmoat run tier (ADR-090). Without bubblewrap the project is granted entry by entry, so commands can no longer read .env, write .git or .moat, or create .envrc or a git hook there; the cost is that nothing new can be created directly at the project’s top in that case, unless your own policy sets sandbox.project_top: writable, which opens .env and git hooks at the top again and records every such run in the audit log (run-project-top-open) (#808).
  • With bubblewrap, --no-isolate covers the project as --isolate does, so .git is read-only there too: commit outside the run (#808).
  • In both bubblewrap tiers a missing .claude/hooks/, .github/hooks/ or other agent configuration folder whose holder exists (or is made for hook settings, as .claude and .github are) is a read-only folder for the session, so a hook written there after the start is refused; below a missing .pi or .opencode one can still be created. openmoat run and openmoat doctor name each denied path that stays open (#808). Details: Project files in every Linux tier.

Agent configuration files under openmoat run

Section titled “Agent configuration files under openmoat run”
  • openmoat run now keeps commands from writing every agent’s configuration in the project. Cline’s workspace hooks (.cline/hooks/, .clinerules/hooks/), Gemini CLI’s project policy files, custom commands and subagents (.gemini/policies/, .gemini/commands/, .gemini/agents/), Claude Code’s subagents, skills and slash commands, GitHub Copilot CLI’s custom agents (.github/agents/) and OpenCode’s commands were held for review only when the agent wrote them with its own tools, and a command it ran could write them. On macOS Seatbelt denies them wherever they are; on Linux, within the limits of each tier (ADR-090), existing ones are read-only, and a missing folder of them is made read-only for the session where the folder holding it exists directly in the project (#810).
  • Writing OpenCode’s project agents (.opencode/agents/, .opencode/agent/) and skills (.opencode/skills/) now needs review, and commands under openmoat run cannot write them (#810).
  • Repositories often commit some of these folders: under openmoat run a git pull, git checkout or package install that changes them fails partway, and so does the agent’s own tool when the agent runs inside openmoat run; do those outside openmoat run. Each agent’s files that run later now come from its spec, and the default policy’s agent lines in runs-later and project-fs are generated from it (ADR-091) (#810).