Files
zeekay 046717e828 cap: fail-closed on unknown CaveatKind (SPEC §2.3) — fixes cross-lang divergence
Red-team review found a real fail-open: Go's Verify ACCEPTED a cap with an
unknown caveat kind (e.g. 0x42424242) while the Rust verifier REJECTED the
identical bytes. A caveat is a RESTRICTION; accepting an unrecognized one
silently ignores a constraint the issuer intended (privilege escalation).
SPEC §2.3 line 106 mandates fail-closed. Verify (and via it VerifyChain) now
refuses kinds > CaveatNonceHash with ErrUnknownCaveat. +2 regression tests.
2026-06-21 07:59:45 -07:00
..