cnabio / cnab-go

A Go implementation of CNAB Core 1.0
MIT License
69 stars 37 forks source link

Fix invocation image digest validation #232

Closed carolynvs closed 3 years ago

carolynvs commented 4 years ago

Bundles pushed with cnab-to-oci will have invocation images with more than one repoDigest, which is valid. One is for the original invocation image that was pushed. The other is for the relocated invocation image that is now inside the bundle repository.

https://porter.sh/distribute-bundles/#image-references-after-publishing

We should check all of the repoDigests and if a match is found, then it is valid.

This corrects a bug introduced in #227 that is present in v0.14.0 where executing a bundle fail because bundles pushed with cnab-to-to-oci always have more than one repoDigest.

carolynvs commented 4 years ago

Doh! Thanks, that's what I get for tweaking the error message at the last minute. 😊

carolynvs commented 4 years ago

All fixed