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

Loosen verification predicate type + better error messages #2737

Merged
merged 2 commits into from
Feb 23, 2023

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Feb 23, 2023

Summary

Loosen the policy validation restrictions. With the move to strict RFC3986 and the fact that some of the existing attestations out there are still using the non conformant predicate types, allow validating them with non-conformant predicate types.
Also, to aid folks with the 'guess-the-existing-predicate-type' game :) if attestations are found, but they do not match the predicate type that is being looked for, print out the predicates that were found. Hope is that this will make the migration from non conformant predicate types little easier.

Release Note

Documentation

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #2737 (fa59a94) into main (f9d8e5d) will decrease coverage by 0.08%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main    #2737      +/-   ##
==========================================
- Coverage   29.62%   29.55%   -0.08%     
==========================================
  Files         151      151              
  Lines        9641     9648       +7     
==========================================
- Hits         2856     2851       -5     
- Misses       6348     6358      +10     
- Partials      437      439       +2     
Impacted Files Coverage Δ
cmd/cosign/cli/verify/verify_attestation.go 3.34% <0.00%> (-0.09%) ⬇️
pkg/policy/attestation.go 31.57% <25.92%> (-6.06%) ⬇️
cmd/cosign/cli/verify/verify_blob_attestation.go 33.48% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@hectorj2f hectorj2f added the bug Something isn't working label Feb 23, 2023
Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks. I truly believe we need this change in before releasing v2.0.0.

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I think this will be super helpful for folks.

@mattmoor
Copy link
Member

cc @priyawadhwa @znewman01 for thoughts on v2

@haydentherapper
Copy link
Contributor

+1 to this, breaking verification for existing attestations is not ideal. This should go in 2.0

@hectorj2f
Copy link
Contributor

Okay. I just talked to @priyawadhwa ✅ . I'm merging this change as it seems everyone approved it.

@hectorj2f hectorj2f merged commit d6b9001 into sigstore:main Feb 23, 2023
@github-actions github-actions bot added this to the v1.14.0 milestone Feb 23, 2023
@vaikas vaikas deleted the loosen-verification-predicate-type branch February 23, 2023 19:28
dmitris pushed a commit to dmitris/cosign that referenced this pull request Mar 24, 2023
…2737)

* test policy-controller only.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>

* Better error messages.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>

---------

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
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 this pull request may close these issues.

4 participants