Zero-Trust Governance & Cedar
GAP treats every external upstream tool description, response payload, and network destination as potentially hostile—enforcing Cedar default-deny policies, desc_hash rug-pull pinning, SSRF egress guards, OS sandboxing, and tamper-evident BLAKE3 audit logs.
What you'll learn
- Classify backends into
T0,T1, andT2trust tiers and inspect Cedar two-person mutation policies. - Prevent MCP rug pulls with
DriftMonitorand prompt smuggling with<gap:untrusted>envelopes. - Stop DNS-rebinding / cloud-metadata SSRF (
169.254.169.254) usingEgressGuard.
On this page
Trust Tiers & Cedar Access Rules (INV-04, INV-11)
Every upstream branch sits in an explicit trust tier:
T0(Platform Signed): Verified Ed25519branch.manifest.jsonsignature rooted in configured organization public keys. Any signature failure immediately demotes the branch toT2.T1(Admin Approved): Reviewed upstream APIs pinned by canonical schema digest (spec_hash) and operation description hash (desc_hash).T2(Untrusted / External): Sandboxed via OS namespaces (Bubblewrap/nsjailon Linux,Seatbelton macOS)—failing closed if no OS sandbox is present—and blocked from joining across trust domains (INV-07).
Access decisions are pure functions evaluated in Cedar (policies/default.cedar) where forbid always beats permit:
@id("forbid-mutate-irreversible-or-unknown-unapproved")
forbid (
principal,
action == Action::"Mutate",
resource
) when {
(resource.sideEffect == "IRREVERSIBLE" || resource.sideEffect == "UNKNOWN")
&& !(context.approved && context.approverIsDifferent)
};
./target/dist/gap policy check --dir policies
./target/dist/gap audit verify --nightly
- Zero model involvement: No LLM confidence score can relax Cedar enforcement (
INV-04), and spoofed MCP annotations likereadOnlyHint: trueare ignored.
Anti-Rug-Pull Pinning, Untrusted Envelopes & SSRF Defense
| Threat Vector | GAP Control | Deterministic Failure / Isolation Behavior |
|---|---|---|
| MCP Tool Rug Pull | DriftMonitor (SEC-082, INV-08) | Recomputes JCS BLAKE3 desc_hash; mismatch freezes branch in BranchStatus::Drift while serving only pinned text. |
| Indirect Prompt Injection | <gap:untrusted> (SEC-080) | Wraps T1/T2 payloads and HTML-escapes any fake closing tags inside upstream output. |
| SSRF / DNS Rebinding | EgressGuard (SEC-075) | Resolves DNS once, rejects loopback/RFC1918/octal/hex/169.254.169.254, pins IP socket, blocks redirects. |
| Bearer / Secret Leaks | Secret<T> (INV-15) | Redacts secrets across snapshots, Debug formatting, logs, OTel traces, metrics, and error messages. |
| Audit Tampering | BLAKE3 Ledger (INV-14) | Every mutation, approval, and policy reload appends to SQLite hash chain verified by gap audit verify. |