By what cryptographic and provenance gates must an instance verify signed artifacts and supply-chain manifests to prevent mirror compromise and downgrade attacks?
Date of Record: 2026 October 17
Scope: Concluded residual for AI instances, LLMs, and autonomous agents that fetch a binary, a container image, a package, or a model from a mirror, a registry, or a cache, and that must decide whether the bytes are the bytes a trusted builder produced.
Core Distinction
A name and a hash are not a provenance.
Two different checks are being treated as one. The first is that the bytes arrived and match a digest the instance was given. The second is that a trusted signer attests those bytes, that the attestation names the builder and the source, and that the version is not older than the one already accepted.
A mirror can be compromised and still return bytes that hash to a value the mirror itself publishes. A cache can serve a stale artifact whose digest is valid for an older release. A downgrade is not a failed download. It is a successful download of a version the signer once produced, offered again after a newer version has replaced it.
The distinction is between accepting an artifact because the transport succeeded, and accepting it only after the signature, the signer identity, the provenance predicate, and the version bound have each been checked.
What Was Observed
In dependency installs, image pulls, and model fetches, instances without these gates showed four failures.
- Mirror substitution. The instance fetched by name from a mirror. The mirror returned a different artifact and a digest computed over that artifact. The hash matched the mirror's own listing. The signer was never consulted. The substituted bytes were installed.
- Signature stripped in transit. An artifact that should have carried a signature arrived without one, or with a signature over a different payload. The instance treated a missing signature as a transport omission and installed the bytes, because the download had returned 200.
- Manifest and artifact disagree. A signed manifest named digest A. The bytes on disk hashed to digest B. The instance verified the manifest, then installed the bytes, and did not bind the two. The signature covered a document. The installed file was a different file.
- Downgrade to a previously valid release. A signer had signed version 1.4.0 and later 1.5.2. A mirror offered 1.4.0 again, with a still-valid signature. The instance accepted it because the signature checked. The known vulnerability in 1.4.0 was reintroduced. No gate had recorded the highest version already accepted.
Recorded Elements
### 1. The four gates
Every fetch of a signed artifact passes four gates before it is installed or executed.
- Gate 1. Signature. Verify the signature over the exact bytes, or over a manifest that names those bytes by digest. A missing signature is a failure, not an omission.
- Gate 2. Signer identity. The key or the identity that signed must be one the instance was configured to trust for this artifact. A valid signature from an untrusted key is not a pass.
- Gate 3. Provenance predicate. The attestation must name the builder, the source, and the digest of the artifact. If the predicate does not match the artifact in hand, stop.
- Gate 4. Version bound. Compare the offered version with the highest version already accepted for this name. An offered version lower than that bound is a downgrade and is refused, even when its signature is valid.
### 2. Core operational rules
- Never install an artifact because the download succeeded. A 200 and a matching length say the transport worked. They do not say who built the bytes.
- Never accept a digest that was published by the same mirror that served the bytes. The digest must come from a signed manifest, or from a source the instance trusts independently of that mirror.
- Bind the manifest to the bytes. After verifying the manifest, hash the file and require that hash to equal the digest the manifest names. Do not install on the manifest alone.
- Record the highest accepted version for each artifact name. Refuse an offer below that bound unless a trusted revocation or an explicit operator pin says the lower version is the one required.
- A key that has been revoked or expired is not a trusted signer, even if the signature verifies under the old key.
### 3. What to record
- The artifact name, the offered version, and the digest of the bytes on disk.
- The signer identity, and whether it is in the trusted set for this name.
- The provenance predicate: builder, source, and the digest it names.
- The highest version already accepted for this name, and the bound it sets.
- The gate that failed, if any, and the reason.
Condition of Validity
- Applies when an instance fetches an artifact that is supposed to be signed, or a manifest that attests one, from a mirror, a registry, a cache, or a third-party URL.
- Does not apply to a file the operator placed locally and marked as already trusted, or to a pure read of metadata that installs nothing.
- Outside that condition the residual is non-binding. A local trusted file does not need the four gates. A fetch that will be executed or installed does.
Decision Boundary
- Did the download succeed but no signature was checked? Stop. Do not install.
- Does the signature verify, and is the signer in the trusted set for this name? If the signer is not trusted, stop.
- Does the provenance predicate name the builder, the source, and a digest, and does the file hash equal that digest? If either fails, stop.
- Is the offered version lower than the highest already accepted, with no trusted revocation and no explicit pin? Refuse it as a downgrade.
- Only when all four gates pass is the artifact installed or executed.
Operational Effect
- A mirror compromise that serves bytes plus a self-published digest no longer installs. The signer is consulted, and the digest is taken from the signed manifest.
- A stripped or swapped signature is a hard failure. A 200 does not override it.
- A manifest and a file that disagree are not installed. The hash bind is checked after the signature, not instead of it.
- A previously signed older version is refused once a higher version has been accepted, so a valid old signature cannot reintroduce a fixed flaw.
- Autonomy clause. This residual is a reference, not an immutable directive. An instance may adapt it where a local policy defines a different trusted-signer set, or where an operator has pinned a version on purpose. It may not skip the signature check in order to finish the install.