Other keys
executables: # programs pinned to their paths git: ["/usr/bin/git", "/opt/homebrew/bin/git"]sandbox: # what the OS sandboxes may read beyond the rules read_roots: ["/usr", "~/.cargo"] project_top: protected # since 0.21.0: `writable` opens the project's top on Linux without bubblewrapsecrets: [] # brokered secrets: openmoat secret addtaint: protected_writes: ["**/deploy/**"]staging: # since 0.17.0: when a session counts as collecting outside the project outside_reads: 25 # default 25; 0 turns this trigger off outside_folders: 2 # default 2; 0 turns this trigger off ignore: ["~/code/**"] # reads that never countrequire_signed_repo_policy: false # trust a repository policy only when signedmcp: trust_first_sight: false flow_trusted: [] # since 0.16.0: servers whose results may reach other servers' acting tools unreviewedcheck_diff: # since 0.16.0: levels of the pull request check's content checks levels: diff-ci-unpinned: offSee OS sandboxes, Token broker, Session taint, Signed policy packs, MCP, MCP data between servers and Check a pull request. An OpenMoat older than the release named rejects a policy that sets staging, flow_trusted or check_diff.
Titles and reasons for the block message
Section titled “Titles and reasons for the block message”Since 0.17.0 a rule can say title: and why:. They change no decision. When a deny or review rule with a title decides a call, the agent and you read OpenMoat blocked: <title> (OpenMoat is holding this for you: <title> for a review), the call, the moat: line, why, one next step and openmoat why --last (What the message says).
deny: - id: secrets-paths reason: secret material title: reading or changing your keys and credential files # at most 80 characters why: a key or token that leaves this machine cannot be taken back # at most 160 characters fs.read: ["~/.ssh/**", "**/.env"]Every deny and review rule of the default policy has both, and openmoat policy upgrade adds them to a policy made from an earlier default. openmoat policy lint names the deny and review rules without a title. A repository policy may write them, but they are dropped when it is merged: only your own policy and your packs head the message an agent reads.
Atoms a shell rule can name
Section titled “Atoms a shell rule can name”Some checks turn what they find into an atom, a word a shell pattern can match like a command. Personal data on its way out is one: a payment card number becomes @pii-egress card <host> (the default rule card-egress denies it), and ten or more distinct mail addresses in one send become @pii-egress emails <host>, which no default rule names, so they change no decision. To act on mail lists, add a rule for them:
review: - id: mail-list-egress reason: sends a list of mail addresses off this machine shell: ["@pii-egress emails *"]Use deny: instead to refuse them. Details: Card numbers sent out.
Data sent after collection (since 0.17.0, ADR-061, proposed). A send after the session read at least staging.outside_reads files or staging.outside_folders folders outside the project, or one that names a file packed from them (tar, zip, base64, …), carries @staging-egress <host>. No default rule names it, so it changes no decision; it is recorded, and openmoat report counts these sends. To act on it:
review: - id: staging-egress reason: sends data after this session collected or packed files from outside the project shell: ["@staging-egress *"]Reserved keys
Section titled “Reserved keys”approval: and scope: (project_roots) are reserved: older policy files that set them stay valid, they have no effect yet, and openmoat policy lint says so. Unknown keys are errors.