-
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
Workstream: Source Track #956
Comments
cc @TomHennen who has done a lot of thinking about source attestations in the past. |
This is great! I'm going to take a stab at answering these questions.
I think the top-level object should be a list of changesets. A changeset can be made up of one or more commits. A changeset should have a 1-1 relationship with a review process (e.g. pull request in GitHub terminology or merge request in GitLab terminology), although a changeset might not have a review if it was pushed directly to a remote. A changeset has a 1-1 relationship with a repository, but the changesets described in the source attestations for an artifact could come from more than one repository.
Pragmatically, I would focus on git. At the very least, a graph-based distributed version control system. I worry that we might not be able to come up with a specification that is meaningful and covers all the version control systems out there.
Generally, I'd lean towards objective statements that don't change over time. Instead of "no vulnerabilities found at X time" do things like list components for later determination of vulnerabilities, or a specific command that was run and the output it produced. We should frame these in terms of what verification policies we'd want to run, and then figure out how to represent them such that the policy can be evaluated. The shortest list of things I'd like to verify is things like:
I think the source attestation representation will be the same for open and closed source projects. The policies that people evaluate against those source attestations will be different for every organization, including open source and closed source projects. Some additional questions:
Changes since the last release? Changes over the past X units of time? Changes going all the way back to the start of a repository? How do you onboard an existing repository to conform to a more strict policy?
Conceptually, I want all the contributions associated with any commit that has a line of code in the release. But there's a bunch of corner-cases here. What if I make a contribution that includes 4 commits, and later the branch history is rewritten to not include any of those commits? What if the lines of code in that contribution are all replaced by later contributions before the release is cut? |
I super excited to see this spin up!! I have a few additional questions and thoughts to add to the discussion in no particular order. Attestations are explicitly from the perspective of the code-hosting serverThis is a more interesting topic for a distributed version control system like git, where all repos are considered equally valid. This seems to mean:
Who "contributed" a line of code?Reasonable options:
From a team's perspective, the answer could be any combination of those. From the server's security perspective, the answer seems unequivocally "3": regardless of the contents of the payload, the server "blames" the authenticated user who connected to the server to upload the changes. For git, there are no security controls to enforce the contents of a commit, but authentication with the server requires control of an account. Because attestations are from the server's perspective, it seems the server should be picky that the "authenticated pusher" is the relevant identity. What kind of commits can be trusted?Due do the uncontrollable nature of commit contents, it's reasonable for the server to assign more trust to the commits it creates itself (where it controls the process) and less trust to commits it receives from the internet. For most mature dev teams, code review is a required part of the change process and the most important commits created by the server are the proposed merge commits between the topic branch and the target branch. These kinds of merge commits are a great candidate to consider for attestations. Is the "pusher" a contributor?In Git, a single push may contain many objects and ref updates, creating many new versions of the repo at once. In such a setup, most human-user pushes contribute to peer-reviewable changesets, and are not necessarily useful on their own. Accepting a change set causes the server's service principal to produce the approved "contribution" commit. Important scenarios to validateI like @steiza 's summary☝️.
This rule restricts the kinds of commits that make it out of developer-controlled refs and onto "production" refs. |
Thanks @steiza and @zachariahcox! This is a great start. My team has thought about this topic quite significantly and I'm happy to share those thoughts as well (matches fairly well to what has been said above). But before I do that, let's figure out the best way to collaborate here. Should we discuss these ideas via GitHub Issues? GitHub Wiki? Google Doc? Something else? My inclination is to use a google doc or wiki so that people can have threads and iterate on ideas. A comment thread is pretty hard to follow. Either way, I think we might want to break this down along the following lines:
These two pieces will necessarily influence each other, but they can happen in parallel. The reason I think it might be valuable to split them is that it's hard to have conversations at two very different levels of abstraction. |
I created a doc here to get us started. It's empty now but we can start to fill it in: |
I added v0.1 to the doc as one possible starting point to build on. It would be helpful to know (via docs comments) what is problematic, unclear, or missing from that ladder. Feel free to also start a new section that doesn't build on v0.1, or that changes it significantly. |
just want folks to remember the original thread on source that @marcelamelara and I originally were thinking through #463 |
I've digested the brainstorming doc into a draft specification for the Source Track. Please take a look and comment: https://docs.google.com/document/d/1sKNvZzjdpL4OC5H7VdPLPGG0G3XFJc3i5q144mhOnP8/edit. I intend to accept comments on the Google Doc for 2 weeks, at which point I will turn the draft into a formal proposal in the slsa-framework/slsa-proposals repo. |
marking this one as closed for now.
|
This is a tracking issue for creating a Source track. The main idea is to cover properties of how the source code was developed. The exact thrust of this track --- i.e. the threats mitigated by this track --- are still TBD.
Workstream shepherd: Kris K (@kpk47)
Sub-issues:
SLSA v0.1 set requirements on source code management that we removed from v1.0. We should reintroduce those requirements (or something similar) in a Source Track. We will also need to create a format for any source attestations.
A few questions to start discussion:
The text was updated successfully, but these errors were encountered: