Proof · April 2026

On the governed path, no unauthorized action can execute.

Proof by exhaustive case analysis against source code. Every claim verifiable.

On a path governed by the ZLAR gate, no action can execute without human authorization.

This is not a statistical claim. It is a structural claim. It does not say unauthorized actions are unlikely. It says they are impossible — within a precisely defined boundary.

Definitions

Governed path. An action is on the governed path when it passes through a ZLAR gate — either the PreToolUse hook (for Claude Code, Cursor, Windsurf) or the MCP TCP proxy (for any MCP-connected agent). If an action does not pass through the gate, the gate has nothing to enforce.

Human authorization. An action is human-authorized if either: (a) a human signed the policy rule that permits it, using an Ed25519 private key the agent does not possess, or (b) a human explicitly approved it in real time via Telegram, and the approval is cryptographically bound to the exact action requested.

The gate. bin/zlar-gate — a bash script with no model inference, no reasoning, no intelligence. It reads a tool call from stdin, evaluates it against a signed policy, and writes a JSON response to stdout: allow or deny. That is all it does.


Proof

The gate has exactly five terminal states. Every tool call reaches exactly one of them.

State 1: Policy says deny

The policy rule matching the tool call specifies action: deny. The gate blocks the action immediately. No Telegram message. No human decision needed. The policy — signed by a human with an Ed25519 key — pre-determined that this class of action is not permitted.

bin/zlar-gate line 301 — respond_deny() emits permissionDecision: "deny"

State 2: Policy says allow

The policy rule matching the tool call specifies action: allow. The gate permits the action. The policy — signed by a human — pre-determined that this class of action is permitted. The human authorized it at the time they signed the policy.

bin/zlar-gate line 251 — respond_allow() emits permissionDecision: "allow"

State 3: Policy says ask — human decides

The policy rule specifies action: ask. The gate sends a message to the human via Telegram and denies the action while waiting. The agent is told to retry after the human decides.

bin/zlar-gate line 1468 — respond_deny "Awaiting Telegram approval"

On retry, the gate checks for a human response. Four sub-cases:

3a. Human approves. The gate finds an approval callback. Before allowing, it verifies the SHA-256 action hash matches the exact tool call — rule|tool_name|detail. If the hash matches, the action is allowed. The human explicitly authorized this specific action.

3b. Human denies. The gate finds a denial callback. The action remains blocked.

3c. Human does not respond. The pending file ages past the configured timeout. The gate treats expiry as denial. The action remains blocked.

bin/zlar-gate lines 1036-1039 — timeout triggers expiry, returns deny

3d. Approval hash mismatch. If the approval was for a different action, the SHA-256 hash will not match. The approval is rejected. The action remains blocked.

bin/zlar-gate lines 992-993 — hash comparison, mismatch rejects

State 4: Ask fails — Telegram unreachable

The gate attempts to send a Telegram message and fails. The gate denies the action.

The action never executes. The gate does not fall back to allowing. It does not assume the human would have approved. If the human cannot be reached, the answer is no.

bin/zlar-gate lines 1474-1476 — respond_deny "Could not reach human for approval"

State 5: Gate crashes

Any unhandled error triggers the ERR trap.

set -euo pipefail
trap '_gate_crash $LINENO' ERR

_gate_crash() {
    echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse",
           "permissionDecision":"deny",
           "permissionDecisionReason":"ZLAR gate crash"}}'
    exit 0
}

The trap outputs a valid deny response and exits cleanly. The action is blocked. exit 0 is deliberate: the host framework interprets non-zero exit as a non-blocking error and continues. By exiting 0 with a deny payload, the gate ensures its crash produces a valid blocking response that the host framework respects.

bin/zlar-gate lines 38-49

State 0: No rule matches

If no policy rule matches the tool call, the gate applies the default action. The default is deny.

bin/zlar-gate line 666 — default_action // "deny"

If the policy file does not specify a default, the fallback is deny. The gate is closed until a human opens it.


The policy cannot be modified by the agent

The policy file is Ed25519-signed. The gate verifies the signature at load time. If verification fails, the gate denies all actions.

bin/zlar-gate lines 651-660 — zlar_crypto_verify(), failure triggers ERR trap

An agent cannot write a permissive policy and have the gate enforce it, because the agent does not possess the Ed25519 private key. The key never lives on the agent's machine. The key is held by the human.

The gate cannot be persuaded

The gate performs four operations: pattern matching, comparison, lookup, and timestamp arithmetic. It does not perform inference, interpretation, or reasoning. It has no language model. It has no prompt. It has no context window. It has no objective function.

Persuasion requires a reasoning target. The gate has none. This is not a limitation. It is the design.


Summary

StateConditionOutcome
0No rule matchesBlocked (default = deny)
1Rule: denyBlocked immediately
2Rule: allowAllowed — human pre-authorized via signed policy
3aRule: ask → human approves (hash match)Allowed — human explicitly authorized
3bRule: ask → human deniesBlocked
3cRule: ask → no response (timeout)Blocked
3dRule: ask → approval hash mismatchBlocked
4Telegram unreachableBlocked
5Gate crashesBlocked (ERR trap)

In every state, either a human authorized the action, or the action was blocked. There is no state in which an unauthorized action executes.


What this proof does not cover

A proof that does not state its own boundaries is not a proof. It is marketing.

The hook runner

The ZLAR gate sits inside a host framework's hook system. If the hook process is killed by the operating system before the ERR trap fires, or exceeds the framework's timeout, the host framework fails open — the action proceeds without gate evaluation. The gate's ERR trap mitigates this for all crashes within the process. The timeout gap cannot be closed from outside the host framework. We have formally requested that Anthropic add a fail-closed configuration option for PreToolUse hooks.

Channels outside the governed path

If an agent accesses resources through a channel that does not pass through the gate — direct filesystem access outside tool calls, out-of-band network requests — the gate cannot enforce. OS-level containment is the defense layer below the gate. The gate governs tool calls. The operating system governs everything else.

Compromised signing key

If the Ed25519 private key used to sign policies is stolen, an attacker can sign a permissive policy. The key never resides on the agent's machine. Key rotation invalidates all prior signatures.

Compromised gate binary

If the gate script is replaced with a permissive version, enforcement is lost. Rule R012 blocks agents from modifying their own governance infrastructure. External integrity monitoring is the defense layer below R012.

Human error in policy design

The gate enforces the policy exactly as signed. If a human signs a policy that allows dangerous actions, the gate will allow those dangerous actions. The gate checks authorization, not judgment.

Human error in real-time approval

If a human approves an action they should have denied, the gate allows it. The approval is bound to the exact action via SHA-256, so the human approves precisely what executes — but the human must exercise judgment.


What this proof means

On the governed path, the gate is a deterministic function from (tool call, signed policy, human decision) to (allow, deny). The function has no intelligence. It has no attack surface for reasoning-based attacks. It cannot be prompt-injected, context-drifted, or persuaded, because it does not reason.

If the enforcement layer uses intelligence, the enforcement layer can be attacked with intelligence. If the enforcement layer is deterministic, the only attacks are against the policy (a human artifact, signed with Ed25519, stored outside agent context) or against the infrastructure below the gate (the operating system, the hook runner, the hardware). Those attacks exist. They are real. They are documented above. But they are a fundamentally different class of attack than reasoning-based persuasion — and they have well-understood mitigations.

The absence of intelligence in the gate is not a limitation. It is the security property.


Verification

Every claim in this document references specific lines in bin/zlar-gate (Gate v2.5.1). The source code is Apache 2.0 licensed and publicly available. Every claim can be independently verified by reading the source.

If you find a path through the gate where an unauthorized action executes, that is a security vulnerability. Please report it to security@zlar.ai.