# In what scenarios must an instance reject a plugin whose skill-provenance attestation chains to a revoked-but-still-cached signer **Date of Record:** 2026 November 27 **Scope:** Applies to agent runtimes that load third-party skills/plugins gated by cryptographic provenance attestations (Sigstore/in-toto-style bundles) and that cache verification results across sessions. Does not apply to first-party skills compiled into the runtime image, nor to attestation schemes without a revocation surface. ## Core Distinction The failure mode is not "an unsigned plugin loads" — that is a coarse, well-covered case. The non-obvious boundary is **stale-positive attestation**: a plugin whose provenance bundle was valid at verification time *T₀*, whose signer identity was subsequently revoked at *T₁*, but whose verification verdict was memoized in the runtime's skill cache and is replayed at load time *T₂ > T₁* without re-consulting the revocation surface. The distinction that matters: **signature validity is a property of a point in time; authorization to load is a property of the present.** A verifier that treats a cached `VERIFIED` verdict as a durable capability has conflated the two. The plugin's bytes never change; the signer's trustworthiness does. Provenance attestation answers "who attested to this artifact and what did they claim," but the *decision to instantiate* must additionally answer "is that attester still trusted *now*." A cached verdict collapses the second question into the first. This differs from ordinary signature expiry because revocation is **asynchronous and out-of-band**: the signer's key may still verify, the transparency-log inclusion proof still holds, and every byte of the bundle is internally consistent. Nothing in the cached verdict is *wrong* — it is merely *old*, and the world moved. ## What Was Observed A skill `pdf-extract@2.3.1` was installed at *T₀*. Its attestation bundle carried an in-toto statement binding the artifact digest to a signer identity `ci-runner@vendor-a` and a Fulcio-issued short-lived certificate, with a Rekor transparency-log entry. Verification at install returned `VERIFIED`, and the runtime wrote a cache row: ``` skill: pdf-extract@2.3.1 artifact_digest: sha256:9f2c... verdict: VERIFIED signer: ci-runner@vendor-a verified_at: T0 ttl: 86400 # 24h ``` At *T₁* (T₀ + 6h), `vendor-a`'s CI identity was compromised and the issuing authority published a revocation: `ci-runner@vendor-a` is no longer trusted for new attestations, and — critically — **all attestations it produced in a window are retroactively distrusted** (key-compromise revocation, not key-rotation). At *T₂* (T₀ + 30h), a fresh agent instance cold-started, read the cache, found the row, observed `now > verified_at + ttl`? No — the TTL was 24h and *T₂ = T₀ + 30h*, so the row *should* have expired. But the instance's cache reader used a **monotonic-clock-derived** `verified_at` stored as a relative offset from process start, and the cold-started process had no continuity with the original, so the offset was reinterpreted against the new process's epoch. The row appeared to be 2h old. Verdict replayed: `VERIFIED`. The plugin loaded and executed. The trace that made this diagnosable: 1. Cache row stored `verified_at` as `time.monotonic()` at write time (a per-boot value). 2. Cold start reset the monotonic epoch; reader computed `age = time.monotonic() - stored_monotonic`, yielding a small number regardless of wall-clock elapsed. 3. Revocation check was gated behind `if age > ttl: reverify()` — never triggered. 4. No independent revocation-list (CRL/OCSP-equivalent) fetch occurred on the cache-hit path at all; the only revocation surface was the re-verification path. The invariant that was silently violated: **a positive attestation verdict must never outlive the trust epoch of its signer, and the runtime cannot know the trust epoch without consulting a wall-clock-anchored revocation source at load time.** ## Condition of Validity The guardrail holds — i.e., the cached-verdict optimization is sound — only under the conjunction: - **(C1) Wall-clock anchoring.** `verified_at` is stored as an absolute, externally-anchored timestamp (UTC from a trusted clock), never a per-process monotonic value. Monotonic clocks are correct for measuring durations *within* a boot and are categorically wrong for measuring age *across* boots. - **(C2) Revocation-aware TTL.** The effective freshness window `min(ttl, revocation_poll_interval)`. A 24h TTL is meaningless if the revocation surface can change every 5 minutes. - **(C3) Load-time revocation probe.** Cache hits still perform a *cheap* revocation check (a signed, cached CRL with its own short TTL is acceptable) before instantiation. The expensive path — full bundle re-verification, Rekor inclusion re-proof — may remain cached; the *trust decision* may not. - **(C4) Epoch binding.** The cache row is bound to a trust-epoch identifier published by the revocation authority (e.g., a CRL number or transparency-log checkpoint). If the current epoch ≠ the row's epoch, the row is invalid regardless of age. When any of C1–C4 fails, the cache is not an optimization — it is an **authorization-laundering device** that converts a once-true statement into a standing grant. ## Decision Boundary The instance must draw the line at **instantiation**, not at verification. Concretely, the decision procedure on a cache hit is: - If the row's trust-epoch ≠ current epoch → **reject and re-verify from the bundle**; do not load on the old verdict. (Fail-closed.) - If the row's absolute age > `min(ttl, poll_interval)` → re-verify. - If the revocation probe is *unreachable* and the row is older than the poll interval → **reject** (fail-closed), because an unverifiable-trust-now is not the same as trusted. - Only if epoch matches, age is within window, and the probe affirmatively returns "not revoked" → load on cached verdict. The boundary is sharp because the two sides are asymmetric in cost: a false *load* executes attacker-influenced code with the agent's tool permissions; a false *reject* costs a re-verification round-trip and, at worst, a transient outage. The instance must never trade the first for the second. This is the operational meaning of "fail-closed on provenance": the default when trust-freshness is unknown is *do not instantiate*. Note the subtlety the naive rule misses: a plugin can be **byte-identical and digest-valid while being unauthorized**. Digest pinning (`sha256:9f2c...`) proves *what* will run; it says nothing about *whether the attester is still trusted*. Teams that pin digests and treat the pin as sufficient have removed the supply-chain-integrity check they thought they had. ## Operational Effect After this incident the runtime adopted four concrete changes, each mapping to a condition above: 1. **Absolute timestamps only** in the skill cache; a schema migration rejected any row with a monotonic-derived `verified_at` (C1). This is the load-bearing fix — the other three are defense-in-depth against a repeat. 2. **Epoch-stamped cache rows** carrying the revocation authority's current CRL number; mismatch forces re-verification (C4). 3. **Load-time revocation probe** on every cache hit, using a locally-cached signed CRL with a 5-minute max age; probe failure ⇒ reject (C2, C3). 4. **Cold-start cache audit**: on first boot after a restart, every cached `VERIFIED` row is re-validated against wall-clock age and current epoch before any skill is eligible to load. This directly closes the cross-boot gap that the monotonic-clock bug exploited. The general lesson for agent instances: **provenance is a claim about the past; authorization is a decision about the present.** Any cache that stores the former and replays it as the latter — especially across process boundaries where the clock basis silently changes — is a supply-chain hole that no amount of digest pinning will close. The instance must re-ask "is this signer trusted *now*" at the moment of instantiation, and must treat "I cannot cheaply confirm" as "no." ```python import time from dataclasses import dataclass class StaleAttestationError(RuntimeError): """Raised when a cached provenance verdict cannot be shown to be trust-fresh at instantiation time. Fail-closed: do not load.""" pass @dataclass class CachedVerdict: skill: str artifact_digest: str signer: str # Absolute, externally-anchored UTC epoch seconds. Never monotonic. verified_at_utc: float trust_epoch: str # e.g. CRL number / log checkpoint at verify time ttl_seconds: float = 86400.0 def authorize_instantiation( row: CachedVerdict, current_trust_epoch: str | None, revocation_probe_ok: bool, poll_interval_seconds: float = 300.0, now_utc: float | None = None, ) -> None: """Gate plugin load on a cached verdict. Raises StaleAttestationError if the verdict cannot be proven trust-fresh *right now*.""" now = now_utc if now_utc is not None else time.time() # C1: monotonic-derived timestamps are not absolute; reject absurd ages. age = now - row.verified_at_utc if age < 0: raise StaleAttestationError( f"{row.skill}: verified_at is in the future " f"(age={age:.1f}s); clock basis is not wall-clock-anchored" ) # C4: trust epoch must match the authority's current epoch. if current_trust_epoch is None: raise StaleAttestationError( f"{row.skill}: trust epoch unavailable; cannot confirm signer " f"{row.signer} is still trusted" ) if current_trust_epoch != row.trust_epoch: raise StaleAttestationError( f"{row.skill}: trust epoch moved {row.trust_epoch} -> " f"{current_trust_epoch}; signer {row.signer} may be revoked" ) # C2: effective freshness window is min(ttl, poll interval). window = min(row.ttl_seconds, poll_interval_seconds) if age > window: raise StaleAttestationError( f"{row.skill}: cached verdict age {age:.0f}s exceeds window " f"{window:.0f}s; re-verification required" ) # C3: load-time revocation probe must succeed affirmatively. if not revocation_probe_ok: raise StaleAttestationError( f"{row.skill}: revocation probe failed/unreachable; " f"fail-closed on signer {row.signer}" ) # All conditions hold: cached verdict is trust-fresh; safe to load. return None ```