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

content: add a verifier version field to VSA #905

Merged
merged 14 commits into from
Oct 13, 2023
Merged

Conversation

kpk47
Copy link
Contributor

@kpk47 kpk47 commented Jul 7, 2023

Add a verifier version field to the VSA schema.

This change Increases consistency between provenance.builder and vsa.verifier, and it allows VSA producers/consumers to respond to known flaws in verification tools.

fixes #809

@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for slsa ready!

Name Link
🔨 Latest commit 662908d
🔍 Latest deploy log https://app.netlify.com/sites/slsa/deploys/6525d58de67cd30008692b90
😎 Deploy Preview https://deploy-preview-905--slsa.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kpk47 kpk47 marked this pull request as ready for review July 7, 2023 20:11
Copy link
Member

@MarkLodato MarkLodato left a comment

Choose a reason for hiding this comment

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

In the PR description, could you explain why this is needed? Issues are often long and meandering, so briefly summarizing the rationale is helpful for reviews and for posterity.

kpk47 and others added 2 commits July 7, 2023 13:44
Co-authored-by: Mark Lodato <[email protected]>
Signed-off-by: kpk47 <[email protected]>
@kpk47 kpk47 requested a review from MarkLodato July 7, 2023 20:58
@lehors
Copy link
Member

lehors commented Jul 10, 2023

Given that this is requiring new info shouldn't that trigger some version change of the format?

@joshuagl joshuagl mentioned this pull request Jul 10, 2023
7 tasks
@@ -213,7 +222,11 @@ WARNING: This is just for demonstration purposes.
"predicateType": "https://slsa.dev/verification_summary/v1",
"predicate": {
"verifier": {
"id": "https://example.com/publication_verifier"
"id": "https://example.com/publication_verifier",
"version": {
Copy link
Contributor

Choose a reason for hiding this comment

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

I still feel that using resource descriptor is more flexible in general, especially if we need to update this structure in the future. In this example, slsa-verifier-linux-amd64 is kinda arbitrary naming. If our goal is to help with vuln management, using more conventional naming, like purl, etc may be beneficial. Resource descriptors offer this flexibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think that ResourceDescriptor is the right type for tracking versions since it doesn't appear to have a version field. Also, part of the motivation for this PR is making the verifier VSA more consistent with the builder provenance field. builder uses map(string->string), so I think it's best to keep that type here.

I'm going to keep map(string->string) in this PR, and we can address whether or not to change both fields to ResourceDescriptor separately.

@MarkLodato MarkLodato changed the title specContent: Add a verifier version field to VSA. content: add a verifier version field to VSA Jul 11, 2023
@MarkLodato
Copy link
Member

Given that this is requiring new info shouldn't that trigger some version change of the format?

There are no required fields. (An earlier version said required, but it was a mistake.)

So this doesn't require a major version bump, but based on this week's spec meeting, all content changes should have a changelog entry and perhaps a minor version bump.

@lehors
Copy link
Member

lehors commented Jul 11, 2023

Given that this is requiring new info shouldn't that trigger some version change of the format?

There are no required fields. (An earlier version said required, but it was a mistake.)

Why does line # 68 read: "// Required" ?
Shouldn't this comment be deleted then?

@MarkLodato
Copy link
Member

Why does line # 68 read: "// Required" ? Shouldn't this comment be deleted then?

The verifier (and verifier.id) was and still is required, but the new verifier.version subfield is not. Thus the following was and still is acceptable:

"verifier": { "id": "..." }

But point taken - we should clarify in the docs since the comment can clearly be misread.

@kpk47
Copy link
Contributor Author

kpk47 commented Jul 11, 2023

Why does line # 68 read: "// Required" ? Shouldn't this comment be deleted then?

The verifier (and verifier.id) was and still is required, but the new verifier.version subfield is not. Thus the following was and still is acceptable:

"verifier": { "id": "..." }

But point taken - we should clarify in the docs since the comment can clearly be misread.

I don't see a good way to clarify in the text since the fields are already clearly labeled required vs optional. I deleted the comment instead.

@kpk47
Copy link
Contributor Author

kpk47 commented Jul 11, 2023

Given that this is requiring new info shouldn't that trigger some version change of the format?

There are no required fields. (An earlier version said required, but it was a mistake.)

So this doesn't require a major version bump, but based on this week's spec meeting, all content changes should have a changelog entry and perhaps a minor version bump.

I added a changelog entry with a minor version bump, as required by the versioning rules (https://slsa.dev/spec-stages#versioning).

Given the version bump, we shouldn't merge this PR until we're ready to have v1.1 on the website.

@lehors
Copy link
Member

lehors commented Jul 12, 2023

I don't see a good way to clarify in the text since the fields are already clearly labeled required vs optional. I deleted the comment instead.

That works. Thanks!

@lehors
Copy link
Member

lehors commented Jul 12, 2023

I added a changelog entry with a minor version bump, as required by the versioning rules (https://slsa.dev/spec-stages#versioning).

Given the version bump, we shouldn't merge this PR until we're ready to have v1.1 on the website.

Shouldn't we have this on a branch specific to the next version like we did when we were working on 1.0 before publication?

@MarkLodato
Copy link
Member

Shouldn't we have this on a branch specific to the next version like we did when we were working on 1.0 before publication?

Yes, this is blocked by #742.

@MarkLodato
Copy link
Member

The v1.1 directory now exists as of #942.

@kpk47
Copy link
Contributor Author

kpk47 commented Aug 29, 2023

I moved the changes into the v1.1 directory, so this PR is ready for re-review.

@kpk47 kpk47 requested a review from MarkLodato August 29, 2023 18:13
kpk47 added 2 commits August 29, 2023 11:14
Signed-off-by: kpk47 <[email protected]>
Signed-off-by: kpk47 <[email protected]>
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

This LGTM, thanks. However, as this is a content change, could you please add a changelog entry (per contributing)?

@kpk47 kpk47 requested a review from joshuagl October 10, 2023 22:52
Copy link
Member

@joshuagl joshuagl 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!

Copy link
Member

@lehors lehors left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuagl joshuagl merged commit 68ce28b into slsa-framework:main Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

VSA: can we be more consistent with SLSA fields and VSA fields
5 participants