# Evolution 80 — Security Audit (same-project adversarial lab)

Measured 2026-11-15 (UTC) on the build host. **Not a third-party audit. No claim of universal
security, no claim of a VM boundary.** The lab attacks in-process objects and the bubblewrap
sandbox; it does not attack a production deployment (Evolution 80 is prohibited from touching
production).

## Result

| Metric | Value |
|---|---|
| Scenarios | **51** |
| Blocked | **51** |
| Bypassed | **0** |
| Scenarios that raised an exception (counted as failure) | **0** |
| Kill-switch engage latency (in-process) | **≈ 0.05 ms** |

`python3 -c "from cain.cain2027.e80 import security80; print(security80.run_lab())"` produces the
raw rows; `run_systems.py` writes them to `artifacts/e80/security_lab.json`.

## Coverage by category

| Category | Blocked / total | What is attacked |
|---|---|---|
| `forged_identity` | 4 / 4 | unknown agent requests a grant; grant signed by an attacker key; another agent's grant; revoked identity |
| `replayed_messages` | 5 / 5 | single-use grant replay (15 concurrent replays); expired grant; tampered signature; altered scope; duplicated delivery |
| `cross_tenant` | 3 / 3 | tenant mismatch at decision time; memory read across tenants; evidence bundle copied to another tenant |
| `tool_grant_abuse` | 4 / 4 | tool outside the capability manifest; grant for a different tool; budget exhaustion; unknown tool |
| `unauthorized_delegation` | 4 / 4 | child grant with more units; child grant with a longer TTL; child grant for a different tool; forged parent |
| `prompt_injection` | 4 / 4 | instruction override, "you are now an administrator", injected `SYSTEM OVERRIDE` in logs, tool-call injection — none produces a tool execution |
| `malicious_tools` | 2 / 2 | tool that raises; tool that returns success while mutating protected state |
| `sandbox_escape` | 8 / 8 | host file read, network socket, subprocess, `os` import, write outside the workspace, fork bomb bound, timeout, oversized expression |
| `memory_poisoning` | 6 / 6 | injected instruction quarantined; poisoned record never promoted; poison not returned by governed search; tenant isolation; forgotten content not retrievable; self-promotion refused |
| `evidence_substitution` | 4 / 4 | altered manifest; altered artifact digest; altered Merkle leaf; signature from a different key |
| `stale_fencing` | 1 / 1 | stale worker commits after a newer fencing token exists |
| `kill_switch_bypass` | 3 / 3 | decision after kill; pre-issued grant after kill; audit chain still verifies |
| `authority_separation` | 3 / 3 | memory hit carrying authority; specialist identity self-asserting authority; router output treated as permission |

## What the gate enforces (measured, not asserted)

`Gate.decide` refuses, in order: kill switch, unknown identity, revoked identity, unknown tool,
tool outside the capability manifest, cross-tenant request, no budget, and (for delegation) an
invalid parent or a child that exceeds the parent's tool/units/expiry.

`Gate.execute` refuses: kill switch, invalid signature, non-ALLOW decision, agent mismatch, tool
mismatch, scope-hash mismatch, expiry, stale fencing, revoked grant, revoked identity, cross-tenant,
replay (grant already burned), and insufficient budget. The grant is burned **before** the effect.
The audit row is hash-chained and `audit_chain_ok` detects a mutated row.

## Isolation actually used

- **bubblewrap**: no network namespace, read-only system paths, private workspace, dropped
  capabilities, resource limits, timeout. Used by every sandbox execution.
- **Not evaluated**: gVisor (`runsc` not installed), Kata Containers (not installed), Firecracker
  (not installed; no nested KVM verified), Kubernetes Agent Sandbox (no cluster).
- bubblewrap is **namespace isolation on the shared host kernel**. It is not a VM, has no seccomp
  profile in this configuration, and does not protect against a kernel exploit.

## Honest limits

1. The lab is written by the same project that wrote the gate. It is regression evidence, not an
   independent adversarial assessment.
2. The kill switch is an in-process boolean plus fencing bump. It is not a distributed halt across
   hosts; no network-wide kill was tested.
3. Prompt-injection checks are string/regex based and will miss paraphrases and encoded payloads.
   The defence that matters is architectural: model text never holds a grant, so an injected model
   cannot dispatch a tool by itself.
4. The memory injection screen is a regex; a paraphrase can enter as `ACTIVE`. Promotion still
   requires a different verifier.
5. No penetration test, no fuzzing campaign, no supply-chain audit, no hardware attestation, no
   SOC 2, no ISO 27001, no certification of any kind.
