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

[feature] Make all builders use .build-slsa extension #3088

Open
laurentsimon opened this issue Jan 16, 2024 · 9 comments
Open

[feature] Make all builders use .build-slsa extension #3088

laurentsimon opened this issue Jan 16, 2024 · 9 comments
Labels
area:generic Issue with the generic generator area:go Issue related to the Go ecosystem type:feature New feature or request
Milestone

Comments

@laurentsimon
Copy link
Collaborator

No description provided.

@laurentsimon laurentsimon added type:feature New feature or request status:triage Issue that has not been triaged labels Jan 16, 2024
@laurentsimon laurentsimon added this to the Next release milestone Jan 16, 2024
@ianlewis ianlewis added area:go Issue related to the Go ecosystem area:generic Issue with the generic generator and removed status:triage Issue that has not been triaged labels Jan 30, 2024
@ianlewis
Copy link
Member

ianlewis commented Jun 3, 2024

I kind of wonder if this is really the right approach. Not many file extensions refer to the intended use of the file as opposed to the format. e.g. .jpg or .png as opposed to .img.

So I think this may be fairly counter-intuitive for users.

@ianlewis
Copy link
Member

ianlewis commented Jun 3, 2024

For BYOB, which produces Sigstore bundles, I'm wondering if .sigstore.json wouldn't be the most descriptive. Sigstore bundles don't seem to have a specific file extension and they could technically come in multiple formats (.json, .binpb, or .txtpb) since it's defined in protobuf.

@haydentherapper
Copy link
Contributor

@ianlewis, did you have a code pointer to where bundles are generated in slsa-github-generator? I was just poking around this.

Other Sigstore clients are using .sigstore.json as the extension for a sigstore bundle which wraps provenance (or an artifact hash).

@haydentherapper
Copy link
Contributor

Just filed #3750 to track bundle output.

@ianlewis
Copy link
Member

ianlewis commented Aug 31, 2024

@ianlewis, did you have a code pointer to where bundles are generated in slsa-github-generator? I was just poking around this.

Other Sigstore clients are using .sigstore.json as the extension for a sigstore bundle which wraps provenance (or an artifact hash).

In BYOB builders, for better or worse, the generation of provenance is a multi-step process.

  1. setup-generic generates a token in the context of the caller "Tool Reusable Workflow" (TRW) to get info from the callers context. This is signed with sigstore so it can be verified later.
  2. The token is verified by the BYOB workflow with verify-token and this generates a SLSA predicate.
  3. generate-attestations generates an unsigned provenance for each set of artifacts requested by the caller TRW's "Tool Callback Action" (TCA).
  4. sign-attestations takes the resulting provenance and signs it, creating the resulting sigstore bundles with the sigstore.js client.

For pre-BYOB builders we generate DSSE wrapped SLSA provenance as .intoto.jsonl files. These aren't sigstore bundles but are signed using sigstore with code in the signing package.

@haydentherapper
Copy link
Contributor

Thanks for the pointers!

I would suggest we pursue Sigstore bundles in #3750 as that gives us an easy way to bundle DSSEs with the necessary verification material for offline verification (cert and log proof).

If we do want DSSEs as the outer envelope, we had also explored adding custom extensions to DSSE (secure-systems-lab/dsse#61) where you could specify an ecosystem-defined struct. This would be similar to the addition of the cert in the signature, except it could contain all of the rest of the Sigstore verification material. But there isn't much tooling support for this currently.

@ianlewis
Copy link
Member

ianlewis commented Sep 6, 2024

Sounds good to me. From a purity standpoint I wish we could not fully rely on a Sigstore format as we'd also like to support private PKI at some point (#34) but creating sigstore bundles by default seems best for offline verification purposes.

To be clear though, this issue is around the file extension rather than the format itself. @laurentsimon had argued to use the .build.slsa extension regardless of file format (sigstore bundle, dsse, whatever), and let verifiers sort it out so that there was a common file name to look for provenance and it puts less burden on the end user. I'm leaning more towards having the file extension just reflect the file format per my earlier comments.

@haydentherapper
Copy link
Contributor

I'll mention that the Sigstore bundle should work for private PKI as well. We've designed it to primarily support the spec-compliant path but it's decently flexible - timestamps aren't required, proofs aren't required, you can put certificates, cert chains, or public key identifiers.

@ianlewis
Copy link
Member

I'll mention that the Sigstore bundle should work for private PKI as well. We've designed it to primarily support the spec-compliant path but it's decently flexible - timestamps aren't required, proofs aren't required, you can put certificates, cert chains, or public key identifiers.

Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:generic Issue with the generic generator area:go Issue related to the Go ecosystem type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants