-
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 how SLSA interacts with self-hosted runners #966
Comments
I agree with the rational for providing more guidance about self-hosted runners and think the proposals here sound good. |
Thanks for creating the issue @MarkLodato!
Please forgive me my lack of deep understanding of SLSA inner workings and requirements for various levels, as I've not been working a lot with it in the past. I just wonder if this problem revolves around the identity of who certifies that the build environment used during the build was actually trusted. If it is a customer's self-managed runner, it could not be appropriate for the platform (that has no control over the build process in there) to certify that the build environment was trusted, hence using the platform-provided identity to sign build artifacts may provide a false sense of security if From what I understand (and I may be completely wrong here), the I'm sorry in advance if my understanding of how it works is incorrect! 🙏 |
This was the line of thinking when we were writing up the requirements:
Up to the point of SLSA Build L3, we are concerned about having complete, accurate, and authentic provenance (except for potentially the completeness of resolved dependencies). At Build L3, we are only specifying requirements for the build platform and not the build action based on the requirement that the platform is generating the provenance. How is the provenance actually generated in the self-hosted runner situations? The requirements imposed on the runner itself would depend on who is generating the Provenance attestation. If the runner is generating the provenance then that runner would have to be SLSA Build conformant. If the provenance is generated from outside of the runner (i.e. the recent blog bring-your-own-builder), then that process would need to conform. Therefore, in my mind, the counter argument continues to sound accurate as long as the runner fits the case of the argument -- that it is just a method for remote execution of the build and not one for remote generation of the provenance. |
@grzesiek and @arewm that's a good point about who generates the provenance. Maybe that's what it hinges on. I imagine there are three cases:
|
This is what you had in mind initially when we wrote the specification or when creating this issue?
Can we treat it the same by ensuring that we indicate any system (platform and/or remote build environment) which is responsible for informing the provenance must be upheld to the requirements (i.e. secure key storage, isolation, etc.)? It is a different case in implementation, but the specifics around an implementation should be able to taken into account during an audit/conformance process. If these parts are controlled by different entities, then they would both be in the transitive closure of the build platform. |
When creating the issue.
Yes, agreed. I should have said "called out specifically". I think the main issue with self-hosted runners is that it's difficult for readers to make the mental leap between the spec as written and the details of a real-world CI/CD system with self-hosted runners. Doing so requires a solid grasp of both SLSA and the technical security details of how the CI/CD system is implemented, and even then requires some careful thinking and analysis. My hope is that we can expand the text in the spec to offer more guidelines for these common situations so that readers can understand more quickly without having to do so much analysis. Does that make sense? Do you agree? |
That makes sense, thanks. I do agree that readers might be challenged with a large mental leap requiring detailed knowledge of multiple aspects. I am trying to figure out what the best place to record this type of clarification might be. There are two options that I see off hand:
I have a slight preference to the latter -- refine the structure of the FAQs to start using it as a way to inform applying the SLSA specification -- so that we can keep the specification itself from growing too large. This will also enable us to use a more long-form style for clarification. |
Yeah, I agree that both seem viable and also lean towards the FAQ. |
…ance Resolves: slsa-framework#966 Some CI systems allow for users to configure self-hosted runner environments for perform builds and CI analysis. While both the build platform and the self-hosted runners have the ability to affect the build for the resulting artifact, the SLSA Build requirements do not need to be imposed on both systems. This addition to the FAQ is a clarification of the requirements as they relate to the generation of the provenance. Signed-off-by: arewm <[email protected]>
I proposed a change to the FAQs: #989 |
…ance Resolves: slsa-framework#966 Some CI systems allow for users to configure self-hosted runner environments for perform builds and CI analysis. While both the build platform and the self-hosted runners have the ability to affect the build for the resulting artifact, the SLSA Build requirements do not need to be imposed on both systems. This addition to the FAQ is a clarification of the requirements as they relate to the generation of the provenance. Signed-off-by: arewm <[email protected]>
…ance (#989) Resolves: #966 Some CI systems allow for users to configure self-hosted runner environments for perform builds and CI analysis. While both the build platform and the self-hosted runners have the ability to affect the build for the resulting artifact, the SLSA Build requirements do not need to be imposed on both systems. This addition to the FAQ is a clarification of the requirements as they relate to the generation of the provenance. Signed-off-by: arewm <[email protected]>
The SLSA specification could use more explicit guidance on how to handle self-hosted runners.
Problem
Many central build platforms, such as GitLab CI and GitHub Actions, have two options for where the build executes:
This is usually not a separate "external parameter" but rather it is a field inside the build configuration.
People have concerns that (a) a self-hosted runner might be less secure than a platform-hosted runner, such that it does not guarantee the isolation requirements of SLSA Build L3; and/or (b) a specific self-hosted running might be more secure and thus required by the customer.
Related: #362, possibly others?
/cc @samwhite-gl @arewm
Status quo
Technically we already have a recommendation in the spec, but it's weak and obscure, requiring a bit of a mental leap to realize:
In provenance (source):
And then in Verifying artifacts (source):
Combined, this means that the builder ought to embed the runner's identity in the
builder.id
and then the consumer ought to choose which specific runners they trust (or ignore the runner portion of the ID, if they don't care) in their verification policy. But this clearly isn't coming across, and it's only a weak recommendation.To my knowledge, this is already what GitLab CI does. I'm not sure about GitHub Actions or other build platforms.
My thoughts
I (@MarkLodato) think we should:
builder.id
.A counterargument is that a self-hosted runner is just one type of remote execution, and the user's build script could do arbitrary remote execution that is invisible to the build platform. Why are we calling out self-hosted runners explicitly? I am sympathetic to this argument, but here it seems like a win to at least partially address this. Self-hosted runners are an obvious thing that people have questions about and we can address. We can address other remote execution down the line.
The text was updated successfully, but these errors were encountered: