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

Wrong cosign command in “Verify Signed Kubernetes Artifacts” task #38473

Closed
rascasoft opened this issue Dec 14, 2022 · 10 comments · Fixed by #39080
Closed

Wrong cosign command in “Verify Signed Kubernetes Artifacts” task #38473

rascasoft opened this issue Dec 14, 2022 · 10 comments · Fixed by #39080
Assignees
Labels
language/en Issues or PRs related to English language triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@rascasoft
Copy link

The right command line for cosign usage should be:

cosign verify-blob "$BINARY" --signature "$BINARY".sig --cert "$BINARY".cert

So with --cert instead of the actual --certificate which is an unrecognized option, at least in cosign version 1.6.0.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 14, 2022
@sftim
Copy link
Contributor

sftim commented Dec 14, 2022

/retitle Wrong cosign command in “Verify Signed Kubernetes Artifacts” task
/language en

@k8s-ci-robot k8s-ci-robot changed the title Verify Signed Kubernetes Artifacts Wrong cosign command in “Verify Signed Kubernetes Artifacts” task Dec 14, 2022
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Dec 14, 2022
@mengjiao-liu
Copy link
Member

mengjiao-liu commented Dec 15, 2022

It appears that the cosign version v1.9.0 has updated this parameter to --certificate

But for compatibility with previous versions, both --cert and --certificate can be used.

So the document just uses the newer version of the command.

related issue:

related PR:

code:
https://github.com/sigstore/cosign/blob/1c04ce6299e63fe2af5823f7dcc4d179806208df/cmd/cosign/cli/options/certificate.go#L41

@rascasoft
Copy link
Author

Today, if you follow the instructions (and so you download cosign 1.6.0), you get an error, so it might be useful to fix this anyway.

@mengjiao-liu
Copy link
Member

mengjiao-liu commented Dec 15, 2022

Perhaps, the version of cosign needs to be indicated in the docs?

For more advice. @sftim @saschagrunert

@rascasoft
Copy link
Author

Perhaps, the version of cosign needs to be indicated in the docs?

For more advice. @sftim @saschagrunert

Yes, maybe that would fix the problem as well.

@saschagrunert
Copy link
Member

I agree having the cosign version mentioned in the docs will help us to prevent such issues in the future.

@Shubham82
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 19, 2023
@Shubham82
Copy link
Contributor

@Shubham82
Copy link
Contributor

Can we also mention the note about cosign, something like this: if we are using cosign version v1.9.0+ we should use the --cert parameter instead of the --certificate

@saschagrunert
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/en Issues or PRs related to English language triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants