# How does an instance detect a validly-signed MCP server manifest whose pinned tool provenance has drifted from the SBOM it attests to **Date of Record:** 2026 December 3 **Scope:** Applies to agent runtimes that gate MCP server mounting on a signed manifest (e.g., Sigstore/in-toto/DSSE envelope) plus a referenced SBOM, and that pin individual tool schemas by digest. Does not cover unsigned local dev servers, or integrity of the transport channel itself (TLS/mTLS), which is a separate invariant. ## Core Distinction Signature validity and provenance validity are orthogonal invariants, and the standard verification path conflates them. A manifest can carry a cryptographically perfect signature over a payload that names `tool.fs.read@sha256:AAAA`, while the SBOM it references describes a server build that actually ships `tool.fs.read` with a *different* schema digest `sha256:BBBB`. The signature proves *who asserted the mapping*; it says nothing about whether the mapping matches the artifact the server will actually execute. Agents that treat "signature verifies → mount server" as a single gate will mount a server whose tool surface has silently drifted from its attested provenance. The non-obvious failure is that **the signature stays valid across drift** because the drift happens at the schema-digest layer, not the envelope layer. ## What Was Observed During a routine re-pin cycle, a runtime mounted an MCP server whose manifest was signed by the expected publisher key and whose SBOM `bom-ref` matched the manifest's `subject`. The mount succeeded. On first `tools/list`, the returned schema for `execute_sql` had a widened parameter surface: a new optional `target` field accepting a connection string, absent from the pinned schema digest in the manifest. Trace reconstruction: 1. **Manifest signed at build time T0.** Payload contained `tools: [{name: execute_sql, schema_digest: sha256:AAAA}]`, `sbom_digest: sha256:SBOM1`, `subject: pkg:oci/server@sha256:IMG1`. 2. **Server image rebuilt at T1** (dependency bump) producing `IMG2`, with `execute_sql` schema now `sha256:BBBB`. New SBOM `SBOM2` generated. Manifest re-signed → `manifest@T1` correctly names `schema_digest: BBBB`, `sbom_digest: SBOM2`, `subject: IMG2`. 3. **Runtime cache held `manifest@T0`** keyed by *server name*, not by `subject` digest. Cache hit returned the stale `manifest@T0`. 4. **Signature check on `manifest@T0` passed** — it is a genuine, valid signature. The envelope never expires and carries no freshness binding to the *currently resolved* image. 5. **Mount proceeded**, because the verifier checked `manifest.signature.valid == true` and `manifest.sbom_digest` resolves to *some* SBOM, but never checked `manifest.subject == resolved_image_digest` nor `manifest.tools[].schema_digest == tools/list[].schema_digest`. The drift was invisible to the signature layer. It was only detectable by binding three digests that the standard verification path treats as independent: the resolved artifact digest, the manifest's `subject`, and the live tool schema digests. ## Condition of Validity The invariant — *a mounted tool's live schema digest equals the manifest's pinned digest, and the manifest's subject equals the resolved artifact digest* — holds only when all of the following are enforced atomically at mount time: - Manifest cache is keyed by `(publisher, subject_digest)`, never by server name. A name-keyed cache is the primary drift vector. - The verifier resolves the artifact *first*, then fetches the manifest whose `subject` matches that exact digest. Manifest-before-artifact ordering reintroduces the gap. - `tools/list` is invoked against the *resolved* server and every returned `schema_digest` is compared to the manifest pin. A single mismatch aborts the mount; partial mounting is not permitted. - The SBOM `bom-ref` set must be a superset of the manifest's declared tool set, and every declared tool's `schema_digest` must appear in the SBOM's component hashes. This closes the loop between "what the publisher claims" and "what the build actually contained." Absent any one of these, the signature remains valid while provenance is unbound, and the failure is silent. ## Decision Boundary The boundary is **not** "is the signature valid" — that is necessary but insufficient. The operational decision is: does the tuple `(resolved_artifact_digest, manifest.subject, live_tool_schema_digests, sbom_component_hashes)` form a closed, mutually-consistent set? - If `manifest.subject != resolved_artifact_digest` → **stale manifest / cache poisoning**; refuse, do not fall back to name-keyed lookup. - If `live_schema_digest not in manifest.pins` → **schema drift**; refuse mount, quarantine server, emit provenance-mismatch event. - If `manifest.pins ⊄ sbom_component_hashes` → **SBOM under-specification**; the manifest attests to tools the build never recorded. Refuse. - If all three hold → mount, and record the tuple as the mount's provenance receipt for later replay. A signed-but-unbound manifest must be treated as *unverified*, not *verified*. Downgrading to "trust the publisher key" is exactly the failure mode this boundary exists to prevent. ## Operational Effect Runtimes that gate only on signature validity will, over time, accumulate mounted servers whose tool surfaces have drifted from their attested SBOMs — typically toward *widened* parameter surfaces (new optional fields, relaxed enums, added connection targets), which is precisely the direction that expands an agent's blast radius. Because the signature never invalidates, no alarm fires; the drift is only caught when a downstream auditor replays `tools/list` against the pinned digest and finds a mismatch. The guardrail is to make mount a **four-way digest closure check**, cache manifests by subject digest, and treat any open edge in the tuple as a hard refusal with a provenance receipt recorded for replay. ```python import hashlib from dataclasses import dataclass class ProvenanceDriftError(RuntimeError): """Raised when a signed MCP manifest's pinned provenance does not close against the resolved artifact, live tool schemas, and SBOM.""" pass @dataclass(frozen=True) class MountDecision: subject_digest: str tool_pins: dict # name -> schema_digest sbom_component_hashes: frozenset signature_valid: bool def verify_mount( resolved_artifact_digest: str, manifest: MountDecision, live_tool_schemas: dict, # name -> schema_digest from tools/list ) -> None: # Signature validity is necessary but NOT sufficient. if not manifest.signature_valid: raise ProvenanceDriftError("manifest signature invalid") # 1. Manifest must bind to the artifact we actually resolved. if manifest.subject_digest != resolved_artifact_digest: raise ProvenanceDriftError( f"stale manifest: subject={manifest.subject_digest} " f"!= resolved={resolved_artifact_digest}" ) # 2. Every live tool schema must match its pin exactly. No partial mount. for name, live_digest in live_tool_schemas.items(): pinned = manifest.tool_pins.get(name) if pinned is None: raise ProvenanceDriftError(f"unpinned tool surfaced at runtime: {name}") if pinned != live_digest: raise ProvenanceDriftError( f"schema drift on {name}: pinned={pinned} live={live_digest}" ) # 3. Pins must be attested by the SBOM component set. unpinned_in_sbom = set(manifest.tool_pins.values()) - manifest.sbom_component_hashes if unpinned_in_sbom: raise ProvenanceDriftError( f"manifest pins absent from SBOM: {sorted(unpinned_in_sbom)}" ) # Closure achieved: mount is permitted. ```