Surfaced during review of #197 (pre-existing, applies to both keyless and key-signed flows — filing separately as requested there).
container/verifier's bundle reconstruction never parses the simple-signing payload's critical.image.docker-manifest-digest. Both the bundle's MessageDigest and the verification policy's artifact digest derive from the registry-supplied layer.Digest.Hex, so sigstore-go's digest cross-check is tautological: it proves the signature covers the payload layer, but not that the payload's embedded manifest digest matches the artifact actually being verified (CWE-354 / OWASP A08:2021).
Exploitation requires registry compromise (serving a signature manifest whose payload binds a different artifact digest), but this package is becoming the trust anchor for ToolHive's skill verification (stacklok/toolhive#5899), so the binding should be validated explicitly:
- parse the simple-signing payload JSON after signature verification,
- compare
critical.image.docker-manifest-digest against the digest of the artifact under verification,
- fail closed on mismatch or unparsable payload.
Refs: #192, #197, sigstore.go's getSimpleSigningLayersFromSignatureManifest / getBundleMsgSignature.
Surfaced during review of #197 (pre-existing, applies to both keyless and key-signed flows — filing separately as requested there).
container/verifier's bundle reconstruction never parses the simple-signing payload'scritical.image.docker-manifest-digest. Both the bundle'sMessageDigestand the verification policy's artifact digest derive from the registry-suppliedlayer.Digest.Hex, so sigstore-go's digest cross-check is tautological: it proves the signature covers the payload layer, but not that the payload's embedded manifest digest matches the artifact actually being verified (CWE-354 / OWASP A08:2021).Exploitation requires registry compromise (serving a signature manifest whose payload binds a different artifact digest), but this package is becoming the trust anchor for ToolHive's skill verification (stacklok/toolhive#5899), so the binding should be validated explicitly:
critical.image.docker-manifest-digestagainst the digest of the artifact under verification,Refs: #192, #197, sigstore.go's
getSimpleSigningLayersFromSignatureManifest/getBundleMsgSignature.