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 verify message has hardcoded fulcio reference #2562

Closed
vEpiphyte opened this issue Dec 21, 2022 · 0 comments · Fixed by #2621
Closed

cosign verify message has hardcoded fulcio reference #2562

vEpiphyte opened this issue Dec 21, 2022 · 0 comments · Fixed by #2621
Labels
bug Something isn't working

Comments

@vEpiphyte
Copy link

Description

When using a bring your own PKI scenario ( using notes from from #1554 ), cosign verify produces a hardcoded reference to the Fulcio roots, despite the fulcio roots not being used.

Here is an example (using cosign v1.13.1 ):

$ COSIGN_EXPERIMENTAL=1 SIGSTORE_ROOT_FILE=./keys/cas/fullchain.pem cosign verify --rekor-url="" repo/someImage:myTag -a foo=bar
The verify gives me the following output:
The following checks were performed on each of these signatures:
  - The specified annotations were verified.
  - The cosign claims were validated
  - Any certificates were verified against the Fulcio roots.  <---------- This line is misleading

I would expect certificate verification to possibly include the name of the CA names from the fullchain.pem file? But hard coding the fulcio reference when fulcio isn't used does not feel correct.

This value is hardcoded here https://github.com/sigstore/cosign/blob/v1.13.1/cmd/cosign/cli/verify/verify.go#L231 and the prior function notes it needs to be refactored to have some better awareness of verification so it can pass that information along.

I do not know if any of this has changed in the v2 / main code.

Version

$ cosign version
  ______   ______        _______. __    _______ .__   __.
 /      | /  __  \      /       ||  |  /  _____||  \ |  |
|  ,----'|  |  |  |    |   (----`|  | |  |  __  |   \|  |
|  |     |  |  |  |     \   \    |  | |  | |_ | |  . `  |
|  `----.|  `--'  | .----)   |   |  | |  |__| | |  |\   |
 \______| \______/  |_______/    |__|  \______| |__| \__|
cosign: A tool for Container Signing, Verification and Storage in an OCI registry.

GitVersion:    v1.13.1
GitCommit:     d1c6336475b4be26bb7fb52d97f56ea0a1767f9f
GitTreeState:  clean
BuildDate:     2022-10-17T18:00:05Z
GoVersion:     go1.19.2
Compiler:      gc
Platform:      linux/amd64
@vEpiphyte vEpiphyte added the bug Something isn't working label Dec 21, 2022
haydentherapper added a commit to haydentherapper/cosign that referenced this issue Jan 11, 2023
Fixes sigstore#2562

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
haydentherapper added a commit to haydentherapper/cosign that referenced this issue Jan 11, 2023
Fixes sigstore#2562

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
znewman01 pushed a commit that referenced this issue Jan 14, 2023
* Remove hardcoded Fulcio from output

Fixes #2562

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* remove trailing whitespace

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
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.

1 participant