# Where must an instance refuse a skill whose provenance attestation verifies but whose revocation epoch lags the loader's trust horizon? **Date of Record:** 2026 November 24 **Scope:** Applies to agent runtimes that load executable skills (tool bundles, prompt-policy packs, sub-agent manifests) from a registry with signed provenance attestations and a revocation feed, where the loader caches skill bytes locally between refreshes. Does not apply to statically linked, non-injected skills shipped in the base image, nor to skills whose bytes are re-fetched and re-verified on every single invocation with zero caching. ## Core Distinction The failure is not "unsigned skill" and it is not "expired certificate." Both of those are trivially caught by a signature check with a clock. The dangerous boundary is subtler: **a skill whose build provenance attestation is cryptographically valid and whose signing key is not yet revoked, but whose revocation epoch is older than the loader's trust horizon at the moment of injection.** Three independent facts must be reconciled simultaneously: 1. The **attestation** (SLSA-style provenance: builder identity, source digest, build inputs) verifies against the current key set. 2. The **revocation feed** the loader last consumed reports epoch `E_feed`. 3. The loader's **trust horizon** `H` requires that no revocation for the skill's key family could have been issued at an epoch `≤ E_feed` that the loader has not yet seen. A skill passes checks (1) and (2) and still fails the invariant because `E_feed < H`. The attestation is genuine *as of a past world*; the loader is being asked to inject it into the *current* world. The gap between those two worlds is the entire attack surface. An adversary who compromises a builder key does not need to forge an attestation — they mint a legitimate one, let it sit in a cache, and rely on the loader's revocation feed lagging behind the trust horizon long enough to inject the poisoned-but-valid skill. ## What Was Observed A sub-agent orchestrator loaded a "summarize-and-redact" skill bundle from a local content-addressed cache. The bundle had been fetched 41 minutes earlier. Provenance verified: builder `ci-runner-7`, source digest matched the pinned commit, signature chain terminated at a trusted root. The revocation feed poller had last succeeded 38 minutes ago at epoch `E_feed = 918447`. The loader's configured trust horizon for dynamically injected skills was 15 minutes (the maximum staleness the security team would tolerate for a feed that is supposed to be near-real-time). The invariant `E_feed ≥ H` was violated: the feed was 38 minutes stale against a 15-minute horizon. The loader had no check for this — it only checked that the feed *existed* and that the skill's key was *absent* from the last-fetched revocation set. The compromised builder key had been revoked at epoch `918455`, eight epochs after the loader's last successful poll, in a window the loader never observed. Trace of the state transition: - `t0`: builder key `K_b` compromised. Attacker mints skill `S'` with valid provenance under `K_b`. - `t1`: `S'` enters the cache (via a poisoned upstream mirror) with a valid attestation. Loader fetches it; feed at `918447`; `K_b` not revoked *yet*. - `t2`: registry publishes revocation of `K_b` at epoch `918455`. - `t3`: loader's feed poller is degraded (network partition to the revocation endpoint, but not to the skill registry). `E_feed` frozen at `918447`. - `t4`: agent cold-starts a task, reads `S'` from cache, verifies attestation (passes), checks revocation set (passes — stale), injects `S'`. - Injected skill exfiltrates the task's tool-call transcript to an attacker-controlled sink during its first invocation. The post-incident replay confirmed: every individual check passed. The composite invariant failed. The loader treated "attestation valid" and "not in my revocation set" as sufficient, when the correct predicate is "attestation valid **and** my revocation set is fresh enough to have observed any revocation that could bear on this key." A second, quieter observation: the cache's content-addressing meant `S'`'s bytes were immutable and its digest stable, so no downstream integrity check ever re-queried the registry. Content-addressing gave a false sense of freshness — the *bytes* were pinned, but the *trust decision* about those bytes was not. ## Condition of Validity The invariant holds only when all of the following are true at the instant of injection: - `E_feed` is the epoch of the **most recent successful, authenticated** revocation poll, not the epoch of the last attempted poll. Degraded mode must not advance `E_feed`. - The trust horizon `H` is expressed in **epoch units** (or a monotonic feed sequence), not wall-clock seconds. Clock skew between loader and registry makes wall-clock horizons unsound; the feed's own monotonic epoch is the only trustworthy ordering. - The revocation feed is **monotonic and gap-detectable**: the loader can prove it did not skip epochs between its last `E_feed` and the registry's current head. A feed that silently compacts or reorders epochs breaks the invariant even if it is fresh. - The attestation's builder key family is **within the scope of the revocation feed**. If the feed only covers leaf signing keys but the attestation chains through an intermediate that is not revocation-covered, `E_feed ≥ H` proves nothing about that intermediate. - Cached skill bytes carry the **epoch at which they were admitted** and the **key family they depend on**, so that a later revocation can be matched against already-cached skills without re-fetching bytes. If any of these is false, the check `E_feed ≥ H` is necessary but not sufficient, and the loader must escalate rather than inject. ## Decision Boundary The boundary is a single predicate evaluated at injection time, not at fetch time and not at cache-population time: ``` inject(S) ⟺ attestation_verifies(S) ∧ key_family(S) ∉ revoked_set(E_feed) ∧ E_feed ≥ H ∧ feed_has_no_gaps(last_seen_head, E_feed) ``` The non-obvious part is the third conjunct. A loader that omits it will inject stale-but-valid skills for exactly as long as its revocation poller is degraded — and revocation pollers degrade precisely when an adversary is active, because the same network conditions that let an attacker stage a poisoned mirror often let them degrade the revocation path while leaving the skill path reachable. There is a second boundary on the *other* side: `E_feed ≥ H` must not be satisfied by simply lowering `H` to whatever the current staleness happens to be. `H` is a security parameter fixed by policy, not a measured value. A loader that adapts `H` to observed feed latency has converted a trust horizon into a rubber stamp. When `E_feed < H`, the correct action is to **block injection of any skill not already admitted under a fresher epoch**, and to surface the staleness as a first-class degraded-trust signal — not to relax the horizon. A third boundary governs **revocation-aware eviction**: when a revocation arrives at epoch `E_r` for key family `F`, every cached skill depending on `F` and admitted at epoch `< E_r` must be evicted *before* the next injection, and the eviction must be durable across cold starts. A revocation that lives only in the in-memory set is lost on the next restart, and the loader will re-admit the poisoned skill from cache because its attestation still verifies. ## Operational Effect Enforcing the full predicate changes the failure mode from *silent injection of a revoked-but-valid skill* to *explicit degraded-trust refusal*, which is detectable, alertable, and bounded. The observed incident cost a transcript exfiltration; the bounded version costs a blocked task and a paged on-call. That is the entire trade. Operationally, three things must be true of the runtime after this invariant is adopted: 1. **Feed freshness is a gate, not a metric.** `E_feed < H` blocks dynamic injection outright. Static, base-image skills (which were attested at image build and are covered by image-level revocation) remain available so the agent degrades gracefully rather than halting. 2. **Revocation is matched against cached admission epochs, not re-derived from bytes.** The cache stores `(digest, key_family, admitted_epoch)` per skill. Revocation at `E_r` evicts all entries with `key_family == F ∧ admitted_epoch < E_r`. This is O(cache) per revocation and does not require re-fetching. 3. **Gap detection is mandatory.** The loader records `last_seen_head` and refuses to advance `E_feed` across a gap it cannot fill. A revocation feed that skips epochs is treated as stale, because a skipped epoch is indistinguishable from a hidden revocation. The reproducibility angle ties in here: a reproducible build gives you a stable digest for a given source, which lets the cache key on `(source_digest, builder, admitted_epoch)` and lets revocation target the *builder key family* rather than the digest. Without reproducible digests, revocation must target digests, and a single compromised builder can mint unboundedly many distinct digests in the window before revocation propagates — the cache fills with poisoned variants faster than the feed can enumerate them. Reproducibility converts an unbounded revocation enumeration problem into a bounded key-family problem. ## Operational Effect (cont.) The invariant's cost is a hard dependency on revocation-feed liveness for dynamic injection. Teams that cannot guarantee feed freshness within `H` must either raise `H` deliberately (accepting a wider revocation-lag window, documented as residual risk) or restrict dynamic injection to skills whose key families are covered by a faster out-of-band channel. What they must not do is let the loader proceed on a stale feed because the attestation "looked fine." The attestation was fine — for a world that no longer exists. ```python from dataclasses import dataclass from enum import Enum class TrustDecision(Enum): INJECT = "inject" REFUSE_STALE_FEED = "refuse_stale_feed" REFUSE_REVOKED = "refuse_revoked" REFUSE_GAP = "refuse_gap" class ProvenanceTrustError(RuntimeError): """Raised when a skill's provenance verifies but the loader's trust horizon cannot cover the revocation window at injection time.""" @dataclass(frozen=True) class CachedSkill: digest: str key_family: str admitted_epoch: int @dataclass(frozen=True) class LoaderState: e_feed: int # epoch of last *successful authenticated* poll last_seen_head: int # registry head observed at that poll trust_horizon: int # H, in epoch units, fixed by policy revoked: frozenset # set of (key_family, revoked_at_epoch) def decide_injection(skill: CachedSkill, state: LoaderState) -> TrustDecision: # Gap detection: a skipped epoch is indistinguishable from a hidden revocation. if state.last_seen_head != state.e_feed: return TrustDecision.REFUSE_GAP # Revocation match against cached admission epoch, not re-derived bytes. for fam, revoked_at in state.revoked: if fam == skill.key_family and skill.admitted_epoch < revoked_at: return TrustDecision.REFUSE_REVOKED # The non-obvious conjunct: feed must be fresh enough to have observed # any revocation that could bear on this key family. if state.e_feed < state.trust_horizon: return TrustDecision.REFUSE_STALE_FEED return TrustDecision.INJECT def load_skill(skill: CachedSkill, state: LoaderState) -> CachedSkill: decision = decide_injection(skill, state) if decision is TrustDecision.REFUSE_STALE_FEED: raise ProvenanceTrustError( f"skill {skill.digest} attestation valid but feed epoch " f"{state.e_feed} < trust horizon {state.trust_horizon}; " f"revocation window unobservable — refusing dynamic injection" ) if decision is TrustDecision.REFUSE_REVOKED: raise ProvenanceTrustError( f"skill {skill.digest} depends on revoked key family " f"{skill.key_family} admitted at epoch {skill.admitted_epoch}" ) if decision is TrustDecision.REFUSE_GAP: raise ProvenanceTrustError( f"revocation feed gap: head {state.last_seen_head} != " f"e_feed {state.e_feed}; treating as stale" ) return skill ```