-
Notifications
You must be signed in to change notification settings - Fork 142
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: Should provenance include materials? #90
Comments
related to #89 and slsa-framework/slsa-github-generator-go#16? |
We could start by adding the list of actions we use. We need to discuss what format this should look like. SLSA's material or SBOM reference? |
I think we should include the SLSA material for actions. Unless we can re-use a GitHub workflow SBOM-maker somewhere. I think the go builder should generate SBOM eventually, and we can embed the reference inside the provenance. Are there currently tools to generate SBOMs for go binaries? I feel like I heard rumors. Don't want to dupe work |
Currently we include the GitHub repo and commit sha in the materials. Do we need to do anything more? |
I think it was meant to include other materials, such as the dependencies. But maybe that will be replaced by SBOM eventually... /cc @lumjjb any updates on this? We're interested in being a customer and see how we can integrate it in this repo |
We could include details of the virtual-environment in the materials, but that's hard to link to in an immutable way. |
Are there plans to add a generic My use-case:
|
There are a couple of nuanced issues and here is my understanding:
*1 and 2 might have significant overlap. To the extent that they are the same it is due to the limitations of tooling. |
Hi @ckotzbauer! What exactly is the
|
The generator adds the repo and digest of the repository the action runs in (the place where the reusable action is called). That's totally fine, but in addition, I use other reusable workflows from other repositories which are not included. Example:
Only the "slsa-framework/slsa-github-generator" is added as material automatically, but my build-workflow also affects the whole process and I cannot add it manually to the materials. |
@ckotzbauer Thanks for the explanation. If I understand correctly you have a workflow A that calls workflow B and possibly C, D etc. and you want to capture all of A, B, C, and D in the provenance? Am I understanding that right?
I think there may be some confusion because the "materials": [
{
"uri": "git+https://github.com/ianlewis/actions-test@refs/tags/v0.0.9",
"digest": {
"sha1": "e491e4b2ce5bc76fb103729b61b04d3c46d8a192"
}
}
] The provenance should also contain a link to the top level workflow that was run in the "invocation": {
"configSource": {
"uri": "git+https://github.com/ianlewis/actions-test@refs/heads/main.git",
"digest": {
"sha1": "e491e4b2ce5bc76fb103729b61b04d3c46d8a192"
},
"entryPoint": ".github/workflows/generic-container.yml"
},
"parameters": {},
"environment": {
...
}
... In your case I think this should point to Where the generic generator does refer to itself is in the "builder": {
"id": "https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@refs/tags/v1.2.0"
},
"buildType": "https://github.com/slsa-framework/slsa-github-generator/generic@v1", With all that said, I'm not sure it's the level of granularity we want and I'm not sure we could effectively capture all the information in a better way than the workflow files themselves could capture. One issue I do see is that many times actions and workflows are referred to by mutable tags or without a version at all and get run at HEAD of their default branch. This could make it hard to know exactly which version of a reusable workflow was run. I'm not sure there is a way to capture that information accurately and reliably though. I'm a bit wary of having user workflows add things manually to the provenance via inputs because user code is not supposed to be able to modify fields such as the |
Thanks for your detailed explanation @ianlewis.
Not A calls B and B calls C; A calls first B and then C afterwards (when B finished). In regards to |
IIUC, the re-usable workflow at https://github.com/ckotzbauer/actions-toolkit/blob/main/.github/workflows/toolkit-release-goreleaser.yml is used by all the org projects to release artifacts. The generic generator does not allow specifying additional materials / re-usable workflow that were called prior to calling the generic generator:
Fyi, we're working on this feature which may be what you're interested in #763 (comment) |
That's exactly what I'm looking for. Thanks @laurentsimon. 👍 |
SLSA materials are:
It seems like we currently include the source repo and digest, but should we also be including:
I don't see any examples of this, and since it's optional I understand it's not necessary but I would like to have a plan in mind. Go seems easy enough for dependencies because they are listed in the source anyway with hashes.
The text was updated successfully, but these errors were encountered: