grafeas / voucher

🎟 Voucher creates attestations for Binary Authorization
Apache License 2.0
73 stars 24 forks source link

Support OCI Image Index ManifestType #82

Closed rxbchen closed 9 months ago

rxbchen commented 9 months ago

Follow up to: https://github.com/grafeas/voucher/pull/81.

We recently added support for oci image specs, however, this introduced a bug when trying to pull the manifest for an image of type: application/vnd.oci.image.index.v1+json. When attempting to pull the oci manifest, it instead of the schema2 manifest. Resulting in the following error:

$ go run ./cmd/voucher_client -v <voucher-server> -c diy <insert-oci-image-here>

Using config file: /Users/bchen/.voucher.yaml
Submitting image to Voucher: <insert-oci-image-here>
image was rejected
   ✗ failed diy, err: failed to load config: fetching manifest: could not load manifest " <insert-oci-image-here>/manifests/sha256:wrongsha" - 404 Not Found

checking image with voucher failed: image failed to pass required check(s)
exit status 1