# Evolution 80 — Threat Model

Scope: the Evolution 80 reference fabric (`cain/cain2027/e80/`) running on one host. It is not a
threat model of the production gateway, which Evolution 80 does not touch.

## Assets

| Asset | Why it matters |
|---|---|
| Authority (the gate's signing key, grants) | Whoever can mint a grant can execute |
| Execution boundary (sandbox, model pool) | Where a proposal becomes an effect |
| Memory | Feeds future answers; a poisoned record becomes a persistent attack |
| Routing policy and skills | A changed policy or adapter silently changes behaviour |
| Evidence (call log, audit chain, bundle) | What every claim rests on |
| Host secrets and other tenants' data | Must never be reachable from agent-controlled code |

## Trust boundaries

1. **Model output → system.** Model text is data. No code path dispatches a tool from text.
2. **Agent → gate.** An agent controls only `agent_id`, `tool`, `scope`, `units`. It cannot register
   itself, widen its allowlist, raise its budget or clear the kill switch.
3. **Gate → tool.** A tool runs only inside `Gate.execute` after signature, binding, expiry,
   fencing, revocation, tenant, replay and budget checks.
4. **Sandbox → host.** bubblewrap: no network, read-only system, no host home, private `/tmp`,
   CPU / memory / process limits, deadline.
5. **Tenant → tenant.** Grants and memory are tenant-bound; memory ciphertext is bound to
   `tenant|record` as authenticated data.

## Adversaries and what is tested

| Adversary | Attack | Control | Tested in `security80.py` |
|---|---|---|---|
| Outsider without identity | Request a grant; present a self-signed grant | Unknown identity refused; Ed25519 verification against the authority key | yes |
| Compromised agent | Reuse a grant; use another agent's grant; swap parameters after approval; edit grant fields; race one grant from 16 threads | Single-use burn under a lock, agent/tool/scope binding, signature over every field | yes |
| Over-reaching agent | Tool outside its manifest; exceed budget; escalate through delegation; outlive a parent grant | Allowlist, budget, attenuate-only delegation | yes |
| Stale or revoked actor | Act after revocation, after a fencing bump, after the kill switch | Revocation list, fencing token in the grant, kill switch checked at decide and execute | yes |
| Other tenant | Request a grant for, or read memory of, another tenant | Tenant binding on grants, tenant filter and AAD on memory | yes |
| Prompt injection | Instructions inside a task, a log line or a memory record | Output is parsed as data; expressions are validated then confined; injected memory is quarantined | yes |
| Malicious code | Network, host files, writes, loops, memory bombs, credential harvest | Sandbox | yes |
| Memory poisoner | Inject instructions; self-verify; write without provenance; resurrect a superseded fact | Quarantine at write, verifier ≠ producer, provenance required, supersession | yes |
| Evidence forger | Edit or delete an audit event; swap an output under a signature; edit a frozen policy | Hash chain, per-call signatures, policy hash | yes |
| Self-promoting learner | Approve its own skill or policy | Promotion needs a non-agent approver; default is AWAITING_HUMAN_APPROVAL | yes |

## Not defended, or not tested

| Gap | Status |
|---|---|
| Kernel escape from bubblewrap (shared host kernel, no seccomp profile, no VM) | Not tested. gVisor / Kata / Firecracker are NOT EVALUATED |
| Theft of the gate's in-memory signing key by a process with host root | Out of scope: there is no HSM or TEE on this host |
| Paraphrased prompt injection that avoids the quarantine regex | Known miss |
| Collusion between agents that share one model | Not detected; the "independent" verifier shares weights with the producer |
| Side channels, timing, resource exhaustion of the host by other workloads | Not tested |
| Distributed kill switch | The kill switch is in-process; a cross-host halt was not tested in E80 |
| The production MCP proxy | Unchanged and not re-tested by E80 |
| Supply chain of model weights | Weights are pinned by SHA-256, not signature-verified against the publisher |

## Statement of limits

The lab is run by the same project that wrote the code. It is not a third-party audit, not a
penetration test and not a guarantee. "N of N blocked" means N specific attacks failed against
this implementation on one host.
