Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify-attestation should support --platform argument #3552

Open
querti opened this issue Feb 26, 2024 · 1 comment
Open

verify-attestation should support --platform argument #3552

querti opened this issue Feb 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@querti
Copy link

querti commented Feb 26, 2024

Per my understanding, the use of SBOMs was deprecated and should be replaced by attestations. However, the verification of multiarch image attestations can be highly misleading for the end user. Comparison:
SBOMs:

cosign download sbom registry/repo/image:tag

This multiarch image does not have an SBOM attached at the index level.
Try using --platform with one of the following architectures:
linux/amd64, linux/arm64, linux/ppc64le

Error: no SBOM found attached to image index

attestations:

cosign verify-attestation registry/repo/image:tag

Error: no matching attestations:

I see two issues with this:

  1. The user is not notified that attestations exist for the arch images
  2. The user cannot specify the architecture whose attestation they want to get (with SBOMs this was possible with --platform argument)

The only way to get a multiarch image attestation is to specify the image via digest (if that even occurs to a user, since no hint was given). I don't think it's reasonable to expect this from the end users.

@querti querti added the enhancement New feature or request label Feb 26, 2024
@lcarva
Copy link
Contributor

lcarva commented Feb 29, 2024

@querti, last time I checked, there isn't a lot of guidance on what to do with Image Indexes, aka multi-arch images. I've explored this in the past and one of the approaches that seems reasonable is to attach multiple SBOMs to the Image Index.

Signing and attesting both Image Indexes and Image Manifests seems to be the most compatible option since an Image Index is eventually resolved to an Image Manifest upon usage. This allows verification at different points, for example.

It is probably a good idea to improve the error message when a signature/attestation is not found and the image reference is to an Image Index, like the download sbom command does. That sounds like useful information to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants