> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch44-design-themes/44.4-a-trust-model-written-as-case-law.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 44.4 A Trust Model Honest Enough to Be Case Law

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~195,000 tokens, Output \~11,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

Most open-source projects' `SECURITY.md` has two paragraphs: how to report a vulnerability, and how fast we respond. OpenClaw's runs nearly 300 lines, and its longest section is titled **"Out of Scope"** — *what does not count as a vulnerability*.

Of the seven themes in this chapter, this is the least like "technical design" and possibly the most practically valuable, because it demonstrates something many projects do badly: **write security promises as executable case law rather than adjectives.**

## 44.4.1 First, What the Trust Model Actually Is

`SECURITY.md`'s central assertion is one sentence:

> OpenClaw's security model is "personal assistant" (one trusted operator, potentially many agents), not "shared multi-tenant bus."

The rule chain derived from it is uncompromising:

```
one Gateway = one trust domain
      ↓
a caller past Gateway auth = a trusted operator
      ↓
sessionKey is a routing control, not a user isolation boundary
      ↓
anyone who can modify ~/.openclaw = a trusted operator
      ↓
need multiple users? use multiple machines, one each
```

On the third link the original text is unambiguous:

> Session identifiers (for example `sessionKey`) are routing controls, not per-user authorization boundaries.

That sentence kills an entire class of misconception. Many people see "session" and assume isolation — OpenClaw says plainly there is none. **Explicitly declaring "there is no boundary here" is far safer than vaguely implying "there probably is,"** because it lets deployers make correct decisions.

## 44.4.2 Case Law: Writing "Not a Vulnerability" as Citable Entries

The `Out of Scope` section lists twenty-odd entries, each a citable precedent. A few of the most representative:

**Precedent 1: prompt injection alone is not a vulnerability**

> Prompt-injection-only attacks (without a policy/auth/sandbox boundary bypass)

The matching stance appears in another section:

> The model/agent is **not** a trusted principal. Assume prompt/content injection can manipulate behavior. Security boundaries come from host/config trust, auth, tool policy, sandboxing, and exec approvals.

This is a remarkably clear-eyed position: **admit injection can't be fully solved, and place every defense at the permission boundary.** Model got fooled? Expected. Fooled into invoking a tool it wasn't authorized for? *That's* a vulnerability.

**Precedent 2: installing a malicious plugin is not a vulnerability**

> Reports that only show a malicious plugin executing privileged actions after a trusted operator installs/enables it.

Plugins are explicitly defined as part of the **trusted computing base (TCB)**:

> Plugin behavior such as reading env/files or running host commands is expected inside this trust boundary.

> **Sidebar: TCB (Trusted Computing Base)** The set of components where, if compromised, the system's security guarantees fail entirely. Smaller is better, because it's the part you must trust unconditionally. OpenClaw putting plugins in the TCB means: **installing a plugin grants it the same trust as local code on the host.** So "a malicious plugin does bad things" isn't a vulnerability; "a plugin can be loaded without authentication" is.

**Precedent 3: if you can write workspace files, you already crossed the line**

> If someone can edit workspace memory files, they already crossed the trusted operator boundary. Example report pattern considered out of scope: "attacker writes malicious content into `memory/*.md`, then `memory_search` returns it."

This one is interesting because it names a **scary-sounding attack chain** and declares it invalid: attacker writes malicious content into memory files, then memory retrieval feeds it to the model. Sounds like a vulnerability — but the premise is *the attacker can write your memory files*, at which point they can already change your config and read your keys.

**Precedent 4: break-glass switches are not vulnerabilities**

> Any report whose only claim is that an operator-enabled `dangerous*`/`dangerously*` config option weakens defaults (these are explicit break-glass tradeoffs by design)

Naming convention does real work here: every switch that explicitly weakens security is prefixed `dangerous` / `dangerously` (e.g. `dangerouslyDisableDeviceAuth`). **The name is itself documentation and disclaimer** — you cannot enable it without knowing what you're doing.

## 44.4.3 Why "Enumerating False-Positive Patterns" Matters

`Out of Scope` also contains a batch of entries that read like they're arguing with something specific:

> Reports whose only claim is heuristic/parity drift in command-risk detection (for example obfuscation-pattern checks) across exec surfaces, without a demonstrated trust-boundary bypass. These are hardening-only findings and are not vulnerabilities.

> Reports whose only claim is that exec approvals do not semantically model every interpreter/runtime loader form, subcommand, flag combination, package script, or transitive module/config import.

> ReDoS/DoS claims that require trusted operator configuration input (for example catastrophic regex in `sessionFilter` or `logging.redactPatterns`) without a trust-boundary bypass.

These are far more specific than typical security documentation. What are they arguing with? **Vulnerability reports generated by AI security scanners.**

Large models can now trivially scan an open-source repo and produce dozens of well-formatted, correctly-jargoned "vulnerability reports" that sound thoroughly professional. The overwhelming majority are these few classes: heuristic inconsistencies that cross no trust boundary, DoS requiring trusted config to trigger, by-design behavior presented as a defect.

The maintainer's response isn't replying to each one by hand — it's **freezing each false-positive class into a citable precedent**. When a report arrives, paste a link and close it: consistent wording, traceable decisions.

This is the same instinct as the `r:*` label system in §43.3: **when one class of input exceeds human processing capacity, structure the handling rules.** One handles AI-generated PRs; the other handles AI-generated vulnerability reports.

## 44.4.4 Stance and Defenses Are Self-Consistent

The trust model isn't just documentation attitude — it decides where defenses go in the code. OpenClaw's allocation is very clear:

| Defense                                                                        | Investment                      | Reason                                            |
| ------------------------------------------------------------------------------ | ------------------------------- | ------------------------------------------------- |
| **Admission**: device pairing, challenge signing, allowlists, DM pairing codes | **Very deep**                   | This is an explicitly promised boundary           |
| **Approval**: two-phase exec RPC, TOCTOU re-verification, optimistic locking   | **Very deep**                   | Same                                              |
| **Sandbox**: Docker isolation (optional)                                       | Moderate                        | Off by default; hardening, not a boundary promise |
| **Preventing model deception**: content sanitization, context clamping         | **Mitigation only, no promise** | Explicitly out of scope                           |

An example of what "very deep" means. The device node's `exec-policy.ts` is a **134-line pure function** (no IO, returns a discriminated union) with 143 lines of tests. On top of it sit four runtime gates:

1. shell-wrapper fail-closed a second time (original comment: `Fail closed if policy/runtime drift re-allows unapproved shell wrappers`);
2. snapshot cwd and script operands at approval time, re-verify before execution, reject on drift;
3. reject if the actual argv doesn't match the allowlist-matched argv;
4. two-layer environment sanitization, blocking PATH overrides.

The same decision is verified four times because **there is a time window between approval and execution** (TOCTOU — Time-of-Check to Time-of-Use): what was approved as command A may have been swapped for B by execution time.

> **Sidebar: TOCTOU** A security defect where state changes between "check time" and "use time." Classic example: a program verifies "this file belongs to the current user," then opens it — but between check and open, an attacker replaced the file with a symlink to `/etc/shadow`. The usual defense is **shorten the window + re-verify at use time**; OpenClaw does both.

By contrast, *preventing the model from being fooled by prompt injection* gets only basic mitigation and no promise at all. **That isn't laziness, it's honesty** — nobody can currently deliver provably reliable injection defense, and promising it deceives deployers.

> See Chapter 27, Chapter 32, Appendix F.

## 44.4.5 Three Transferable Lessons

**First, writing down what&#x20;*****isn't*****&#x20;protected is as important as writing what is.** Deployers need that information to make decisions. Vague security documentation leads someone to expose the Gateway to the public internet because the docs never said not to.

**Second, keep security docs, diagnostic tooling, and precedent in agreement.** OpenClaw has `openclaw security audit` (§32.4), which turns every trust assumption in `SECURITY.md` into a checkable item. The docs say "non-loopback binding requires a token"; audit checks exactly that. **A trust assumption that can't be automatically checked is just a wish.**

**Third, naming is a contract.** The `dangerous*` prefix costs almost nothing and pays a lot. Any config option that weakens the default security posture deserves a name you won't casually enable.

***

## Section Summary

1. OpenClaw's trust model is **"personal assistant," not "multi-tenant bus"**: one Gateway = one trust domain, past auth means trusted operator, **`sessionKey` is a routing control not an authorization boundary**, multi-user means multiple machines.
2. `SECURITY.md` turns security promises into **case law** — twenty-plus `Out of Scope` entries: prompt-injection-only doesn't count, malicious plugins don't count (**plugins are TCB**), anyone who can write workspace files already crossed the line, `dangerous*` switches are by-design break-glass.
3. Many highly specific precedents exist to **handle AI-generated vulnerability reports** — the same instinct as §43.3's `r:*` labels: structure the handling rules when volume exceeds human capacity.
4. Stance and defenses are self-consistent: **admission and approval go very deep** (pure-function exec policy core + four runtime re-verifications against TOCTOU), while **model deception gets mitigation without promise**.
5. Three transferable lessons: **document what isn't protected**, **make trust assumptions automatically checkable** (`security audit`), and **treat naming as a contract** (`dangerous*` prefix).
