-
Notifications
You must be signed in to change notification settings - Fork 229
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
Clarify Provenance is Unforgeable requirements at Build L3 #986
Comments
@marcelamelara I have opened a related issue and there is already a PR to adjust the wording. |
Great questions, thanks @marcelamelara! At Build L3 the tenant should only be able to provide the subject (see threat "Forge output digest of the provenance" for why this is OK), all other information in the provenance should come from the trusted control plane. This means that:
AIUI there are multiple factors which make provenance from slsa-github-generators unforgeable, copying @ianlewis and @laurentsimon to help correct/clarify:
|
Thanks @behnazh-w and @joshuagl ! I will go take a look at the linked issue and PR.
This first point, I think, is really the one that I was getting at, and not quite certain how the control plane/build platform ensures that the tenant can't influence the logic of a reusable workflow since tenants technically do have unfettered access to anything running within the VM. The second and third points are in line with my understanding as well, so it's possible I am just missing some context around reusable workflows. CC @chkimes |
Related: #975 (comment). I think L2 vs L3 is quite murky, and I think it's worth considering moving some requirements from L3 to L2 to have a more crisp definition of L2.
A reusable workflow runs as a separate VM instance from the caller. There is documentation at https://github.com/slsa-framework/slsa-github-generator/blob/main/SPECIFICATIONS.md, but in short, the only influence that the caller has is the input parameters. Does that help? |
This does help, thanks. If the main goal of L3 (as you mention in #975 (comment)) is to ensure the tenant cannot tamper with the provenance generation during the build, it seems like we should be able to relax the requirement that the build platform itself must perform the generation. In fact, the actual level definition for L3 aligns with this, but the Unforgeable description (as currently written) still requires that provenance to be generated and/or verified by the platform-managed control plane. So I wonder if ensuring that the requirements.md page is better aligned with levels.md would help in addressing my comments. Happy to open a PR for this, since #948 currently only provides changes to levels.md, if we want to keep these separate, though there seem to be some recommendations for edits to requirements.md on that PR as well. Separately, though, I would still like to better understand how a reusable workflow (or equivalent process) that generates provenance and runs outside of the control plane (and thus the trust boundary in the model) isn't susceptible to the threats targeted by L3. In essence, even if the caller can't influence the separate workflow in the reusable workflows scenario, trust has been shifted away from the control plane/build platform to a separate SW artifact. In some ways, this also seems like a deviation from some of the SLSA guiding principles. What I think would be helpful is for the documentation on the Getting Started page might be to describe how specific features of the tools recommended on that page meet the SLSA requirements. Again, happy to propose some possible changes here if others think that would be helpful. |
I think, at least for Technically speaking a CI platform (e.g. GitHub Actions) that provide build primitives (e.g. reusable workflows) that have properties that allow us to meet SLSA L3+ requirements could allow us to relax the wording relating to "build platforms" but this is definitely the exception rather than the rule. I think the clarification that would be needed is probably harder to understand than just saying that the "build platform" is the reusable workflow + GitHub Actions in the case of
Just to be clear, which principles do you think it is a deviation from? I think that needing to trust a separate SW artifact (the reusable workflow) is an accurate assessment, and it could perhaps be interpreted as a deviation from the guiding principles if given a narrow interpretation that trusting I will say that you have access to the exact source code that the reusable workflow runs, so you do have to trust the In many ways the project is a stop-gap until GHA itself provides some kind of native SLSA support. So rather than try to clarify it on the SLSA side would it make more sense to clarify it on the /cc @laurentsimon |
@arewm You are correct in that it's related, as However, I'm not sure it helps with regard to |
The current Provenance is Unforgeable requirements at Build L3 include: "Every field in the provenance MUST be generated or verified by the build platform in a trusted control plane. The user-controlled build steps MUST NOT be able to inject or alter the contents, except as noted in Provenance is Authentic."
I'm looking for clarification on two fronts. Is there a restriction on the L2 exceptions to accuracy at L3? If not, does the real gain for accuracy at L3 come from requiring the signing keys for the Provenance to reside outside a tenant-controlled component? In this case, I'm not sure what the "user-controlled build steps MUST NOT be able to inject/alter the contents" requirement adds in terms of accuracy properties at L3 if a tenant is still able to modify the Provenance before it's signed by the control plane.
This leads me to my second question. If my interpretation of "provenance MUST be generated/verified by the build platform in a trusted control plane" is correct, any Provenance generated and signed by a GHA workflow (a tenant-controlled component such as the generic slsa-github-generator), should not qualify for Build L3. Is this interpretation accurate? Coming back to my first point, is the main intent of the accuracy requirements at L3 to ensure signing keys are managed by the trusted control plane?
Would appreciate hearing folks' thoughts on this, and I'd also be happy to open a PR with wording changes to reflect clarifications to the spec, if others agree that changes are warranted.
The text was updated successfully, but these errors were encountered: