02Enforce
Guard. One policy, decided on the machine.
Write the rules once. Guard compiles them into the native settings and hooks of each tool and decides every tool call on the developer's machine, before it runs.
Auto, ask or blocked.
Every tool call an agent makes gets one of three decisions. Each decision names the rule that produced it.
- Auto
- The action runs and is logged. Routine work runs straight through.
- Ask
- A person must confirm. This is for risky actions such as pushing code or sending data to an external host.
- Blocked
- The action is refused, with a reason the agent and the developer can read and act on.
Passwords and keys that appear in a command or a tool argument are redacted from every log and message, and the policy decides whether the action is held or blocked. What the agent sent stays exactly as sent.
Every decision names its rule.
Decisions are made locally by fixed rules, so they also work offline. The same action under the same policy gets the same decision.
- The tool calls Guard through its hook before it runs a command, reads or writes a file, calls an MCP tool or fetches a URL.
- Guard turns the tool's own payload into one common description of the action, the same for all three tools.
- A shell command is split into its segments and each segment is classified by effect: read, local, publish, outbound or unknown. The most severe segment decides. Substitution,
evaland unrecognised programs count as unknown. - The policy is evaluated and the tool gets its answer: run, ask or refuse, with the rule and the reason.
- The decision is appended to a log on the machine.
What a rule can match
- Shell commands
- The class above, the program and subcommand, and tags such as destructive, install and credential access.
- File paths
- Named scopes such as the workspace and the home directory. Credential stores,
.envfiles, agent credential files and Guard's own files are protected by built-in rules. - MCP servers and tools
- A server by name and by identity, a tool by pattern. A server whose identity changes from the pinned one is treated as unknown.
- Network destinations
- Hosts and domains, for fetch tools and for shell commands where the destination is visible in the arguments.
- Session
- Interactive or unattended. For agents that run in CI or on a schedule, only what the policy explicitly allows runs, and an internal error blocks.
One file for three tools.
One YAML file. It starts from a template and carries its own test cases, which the validator runs.
version: 1 name: acme-org mode: observe # log decisions, block nothing rules: - id: protect-secrets when: { kind: [file_read, file_write, shell], path_any_in: secrets } then: blocked reason: "Credential files are off limits to agents." - id: push-protected-branch when: { kind: shell, program: git, subcommand: "push*", args_match: ["main", "release/*"] } then: { ask: { approvers: leads, timeout: 30m } } reason: "Push to a protected branch." tests: - { action: { shell: "git push origin main" }, expect: { ask: { approvers: leads } } }
$ secruna guard explain --shell "git push origin main" action shell · class publish · program git · subcommand push session interactive · repo acme/payments-api matched push-protected-branch ask (approvers: leads) decision ASK → approvers: leads · timeout 30m · deny on timeout reason "Push to a protected branch." (no log entry written)
A policy has system, user and repository layers. A lower layer may tighten the rules above it. It may relax one only where the higher layer permits that for a named rule. A policy that arrives with a cloned repository applies once the developer accepts it.
Observe first. Enforce when ready.
You see what a policy would do before it stops anyone.
- A new policy starts in observe mode. Every action proceeds, and Guard records what it would have done.
- A report lists the most frequent would-ask and would-block actions and the rules that stayed idle, with suggestions for tuning.
- A team can run this way for two weeks, read the report, adjust the rules and then switch enforcement on. Mode is set for the whole policy and can be overridden for a single rule.
What each tool supports
Guard works through the hooks each tool provides, and those hooks differ. Guard reports every part of the policy a tool leaves unenforced.
$ secruna guard status policy acme-org v12 (enforce) · source: Control device enrolled as alice@example.com · mbp-14 client hook gaps claude-code ok none cursor ok ask not enforced on preToolUse (uses shell/MCP events) codex ok no native ask (out-of-band approval); hook errors do not block copilot - not supported by Guard (Scan only) log 1,204 events today · chain intact
- Where a tool lacks a prompt Guard can use, an Ask returns a decision id. The developer approves it in a terminal and the agent retries. The grant is single-use, bound to that action, and expires after five minutes.
- Where a policy rule has an exact native equivalent, Guard also writes the native setting, so the tool's own control still applies if the hook is skipped.
- GitHub Copilot is covered by Scan.
Installation and the local log
One binary. Account-free, and it runs only when a tool calls it.
- Apply and remove
- Applying a policy writes the hooks and native settings of each tool. A dry run prints the changes first. Guard keeps a backup and a record of every key it wrote, and removal restores exactly what was changed.
- Self-protection
- An agent action that would edit the policy, the hook registration or Guard's own state is blocked. The status command reports a manual edit of the registration as tampering.
- Pause and exceptions
- A developer can pause Guard for up to an hour with a reason, from a terminal, and the pause is logged. Exceptions are time-limited and carry a reason.
- Local log
- An append-only, hash-chained log of decisions on each machine, kept for 30 days by default. At the default detail level it records the redacted command line, the paths, the rule and the decision. File contents, prompts and tool output stay out of it.
- Platforms
- macOS and Linux. Windows is supported with documented gaps at first.
Limits
Guard is exactly as strong as the hook interface a tool provides.
- Hooks are best-effort. Guard sees the actions a tool sends to its hook.
- A user with administrator rights can remove Guard. Control's weekly drift report lists the machines where Guard was paused or removed.
- Guard reads the arguments of a command. What a launched program does next is outside its view.
- Process isolation and network filtering at the operating-system level belong to other tools.
- Prompts, model output and prompt injection detection are outside Guard's scope.
Next step
Bring every agent under one policy.
Tell us the agents your developers use and roughly how many people are on the team. We will reply to arrange a short call and, if it fits, send a proposal for an assessment.
Early access is open to a small number of engineering teams in the UK and EU.