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

Some updates on CI, add new jobs and dependabot config #29

Merged
merged 5 commits into from
May 16, 2022

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented May 14, 2022

Summary

  • use git hashes instead of git tag
  • add dependabot
  • add verify and validate gorelease jobs
  • add copyright boilerplate
  • fix lints

Ticket Link

n/a

Release Note

NONE

Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
@cpanato cpanato requested review from dlorenc and wlynch May 14, 2022 22:26
Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

Looks good for the most part! :D

return nil, errors.Wrap(err, "failed to locate rekor entry")
}
claims = append(claims, NewClaim(ClaimLocatedRekorEntry, true))

if err := rekor.Verify(ctx, tlog); err != nil {
claims = append(claims, NewClaim(ClaimValidatedRekorEntry, true))
Copy link
Member

Choose a reason for hiding this comment

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

Whoops, this one should be false 😅

@@ -97,15 +115,14 @@ func Verify(ctx context.Context, data, sig []byte) (*VerificationSummary, error)
// Parse signature
sd, err := cms.ParseSignedData(der)
if err != nil {
claims = append(claims, NewClaim(ClaimParsedSignature, false))
Copy link
Member

Choose a reason for hiding this comment

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

I'd want to keep these in in some form - this is a signal to users for what failed during validation. e.g. we want to show something like:

Parsed Git signature: true
Validated Git signature: true
Located Rekor entry: false

so it's obvious what stage validation failed on.

If we don't put in failed claims, perhaps we can infer what failed from what's missing in the successful claims during rendering? Not sure - open to ideas!

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe i'm not seeing or i'm too dumb but if we have those claims and return that will not show up in any place

example of original code

certs, err := sd.GetCertificates()
	if err != nil {
		claims = append(claims, NewClaim(ClaimValidatedSignature, false))
		return nil, errors.Wrap(err, "error getting signature certs")
	}

so the claims is not used
to use that we should return that in the struct and then not return the nil

Copy link
Member

Choose a reason for hiding this comment

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

d'oh! you're right - we should be populating the verification summary. This is fine for now then - I'll re-add the verification summary in another PR!

Copy link
Member Author

Choose a reason for hiding this comment

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

cool

@wlynch wlynch merged commit cc20420 into sigstore:main May 16, 2022
@cpanato cpanato deleted the update-ci-dependabot branch May 16, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants