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

cosign copy no longer copies signatures by default in 2.2.1 #3379

Closed
ioanrogers opened this issue Nov 21, 2023 · 3 comments · Fixed by #3409
Closed

cosign copy no longer copies signatures by default in 2.2.1 #3379

ioanrogers opened this issue Nov 21, 2023 · 3 comments · Fixed by #3409
Labels
bug Something isn't working

Comments

@ioanrogers
Copy link

Description

We recently started using cosign at v2.2.0. We have a CI step that runs cosign copy temp-image prod-image which would copy the container image and signatures.
After the cosign-installer action got updated in our repo this week, I noticed I could no longer verify signatures on prod images because the signatures were missing from the prod registry.
I tested with -d using 2.2.0 and 2.2.1 and confirmed 2.2.1 doesn't copy or look for existing .sig artifacts without setting -only sign. 2.2.0 does copy without needing extra params.

I think this change was introduced by #3247. Should there be some default tags if nothing is explicitly requested?

Version

v2.2.1

@ioanrogers ioanrogers added the bug Something isn't working label Nov 21, 2023
@marcosbc
Copy link

Hi folks, we are also observing the same behavior. Not only does it not copy signatures by default, but it also skips all attestations and sboms.

And according to cosign copy -h, it should still copy everything by default if no -only= flag is set:

$ cosign copy -h
Copy the supplied container image and signatures.

Usage:
cosign copy [flags]

Examples:
  cosign copy <source image> <destination image>

  # copy a container image and its signatures
  cosign copy example.com/src:latest example.com/dest:latest

  # copy the signatures only
  cosign copy --only=sign example.com/src example.com/dest

  # copy the signatures, attestations, sbom only
  cosign copy --only=sign,att,sbom example.com/src example.com/dest

  (...)

@haydentherapper
Copy link
Contributor

That was unintentional to make any breaking changes, the behavior should be the same as before. I can take a look at a fix later, though feel free to propose a PR with the fix.

@haydentherapper
Copy link
Contributor

#3409 for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants