Skip to content

remote: verify schema1 digest pulls by body hash#2275

Draft
1seal wants to merge 1 commit into
google:mainfrom
1seal:fix/schema1-digest-body-verify
Draft

remote: verify schema1 digest pulls by body hash#2275
1seal wants to merge 1 commit into
google:mainfrom
1seal:fix/schema1-digest-body-verify

Conversation

@1seal
Copy link
Copy Markdown

@1seal 1seal commented Apr 22, 2026

summary

  • validate schema1 digest pulls against the returned manifest body hash instead of trusting Docker-Content-Digest
  • preserve the historical schema1 header-based digest behavior for tag pulls to avoid breaking older registries
  • add regression coverage for both digest-pull validation and schema1 tag compatibility

root cause

for schema1 signed manifests, fetchManifest computed the body digest and then replaced it with Docker-Content-Digest before checking digest references. that meant digest pulls could succeed based on the header value instead of the manifest bytes that were actually returned.

testing

  • go test ./pkg/v1/remote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant