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

feat: add slsa v1?draft provenance experimental support #470

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

asraa
Copy link
Contributor

@asraa asraa commented Feb 8, 2023

Signed-off-by: Asra Ali asraa@google.com

Description:

  • feat: Adds slsa v1?draft provenance support with unit SLSA v1 provenance tests

  • feat: [EXPERIMENTAL] Adds --bundle-path option to specify a Sigstore bundle.

  • test: I've added unit tests with the SLSA v1 provenance.

Follow-up issue:

Fixes #464
Fixes #441

Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
@asraa
Copy link
Contributor Author

asraa commented Feb 9, 2023

cc @laurentsimon this is ready for review.

verifiers/internal/gha/slsaprovenance/v0.2/provenance.go Outdated Show resolved Hide resolved
verifiers/internal/gha/slsaprovenance/v1.0/provenance.go Outdated Show resolved Hide resolved
verifiers/utils/provenance.go Outdated Show resolved Hide resolved
Signed-off-by: Asra Ali <asraa@google.com>
@asraa asraa enabled auto-merge (squash) February 9, 2023 17:13
@asraa asraa merged commit 239c448 into slsa-framework:main Feb 9, 2023
// one must be set. We already check to ensure that they are mutually exclusive.
if ExperimentalEnabled() {
if !(cmd.Flags().Changed("provenance-path") ||
cmd.Flags().Changed("bundle-path")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious if we want another options for this or simply re-use provenance-path?
Does a new option require users to be "aware" of the "type" of provenance file they want to verify? Is this OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm good point, from our perspective we will be having generators that may output DSSE or sigstore bundle, and clients may still want a uniform interface rather than switching over the extension type.

I can update to allow that -- we'll have to test unmarshal both to figure out the right type, but it will actually clean up the interface.

Copy link
Member

Choose a reason for hiding this comment

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

I thought about this too but didn't comment since I figured that having separate options has the benefit of avoiding format type detection logic. If all types have the same security implications then probably it's fine, but if one format could be more secure than others then we might have to worry about downgrades.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#462

So long as we turn this option on my default the same content is present and same validations will occur. So let's definitely resolve this one before releasing.

ramonpetgrave64 pushed a commit to ramonpetgrave64/slsa-verifier that referenced this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants