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

SLSA v1.0: Add "Verifying Build Systems" #568

Merged
merged 19 commits into from
Jan 15, 2023
Merged

Conversation

kpk47
Copy link
Contributor

@kpk47 kpk47 commented Jan 10, 2023

Addresses #508 .

@netlify
Copy link

netlify bot commented Jan 10, 2023

Deploy Preview for slsa ready!

Name Link
🔨 Latest commit f6af2be
🔍 Latest deploy log https://app.netlify.com/sites/slsa/deploys/63c1dbfbe73cbd000ae17727
😎 Deploy Preview https://deploy-preview-568--slsa.netlify.app/spec/v1.0
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@SecKatie SecKatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this is great! There are only a few typos that need to be fixed and I think there are some areas that we can improve, especially when it comes to cryptographic secret security

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
- Creating executors
- How does the control plane share data with executors? Example: mounting a shared file system partition
- How does the control plane protect its integrity from executors? Example: not mount its own file system partitions on executors
- How does the control plane prevent executors from accessing its cryptographic secrets? Examples: dedicated secret storage, not mounting its own file system partitions on executors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to also mention hardware security modules here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
Copy link
Member

@MarkLodato MarkLodato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me! I just have some minor suggestions

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved

### Types of attackers

We consider three attacker profiles differentiated by the attacker's capabilities and privileges.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this section is a bit unclear on the meaning of terms like "the source repo", "their", and "the package". Maybe explain that there is a "target" repo/project? Then in low privilege, "their" can be used to describe the attacker creating a separate project unrelated to the target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to clarify this section by drawing a distinction between the "target build" and "controlled builds." It may be a bit clunky.

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/index.md Outdated Show resolved Hide resolved
Note: Platform abuse (e.g. running non-build workloads) and attacks against builder availability are out of scope of this document.

TODO: Align/cross-reference with SLSA Provenance Model.
TODO: Redraw diagrams in the style used by the rest of the site.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkLodato who has created the diagrams before?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a design firm (Projects by IF) draw them initially, and then I have since updated them. It's in Figma format, with the source at https://github.com/slsa-framework/slsa/tree/main/resources/editable-diagrams. You can create a free account. Figma has a bit of a learning curve, but it has a lot of features for power users, such as components.

Sadly there is no clean version control integration, so I just download the .fig file and check it in whenever I update the diagram, which is as light pain.

For this PR, I think any diagram is fine, then we can clean it up once we get close to publishing.


- Examples
- Anyone on the internet
- Build servec insiders without administrative access
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "Build service"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- What is your process for responding to vulnerability disclosures? What about vulnerabilities in your dependencies?

- Creation and destruction
- What environment is available in executors on creation? How were the elements of this environment chosen?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to append an example for what you'd expect an answer for "What environment is available"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@abacchi
Copy link
Collaborator

abacchi commented Jan 13, 2023

Great work! Thinking about the user experience for someone wanting to fill out the assessment-
I could see a next step once this is finalized to create some sort of consolidated questionnaire with just the questions for folks to use. That way they wouldn't have to copy and paste different sections from the page.
Con to this: now we would need to keep this page and the pure questionnaire in sync any time there is a change.

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
Note: Platform abuse (e.g. running non-build workloads) and attacks against builder availability are out of scope of this document.

TODO: Align/cross-reference with SLSA Provenance Model.
TODO: Redraw diagrams in the style used by the rest of the site.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a design firm (Projects by IF) draw them initially, and then I have since updated them. It's in Figma format, with the source at https://github.com/slsa-framework/slsa/tree/main/resources/editable-diagrams. You can create a free account. Figma has a bit of a learning curve, but it has a lot of features for power users, such as components.

Sadly there is no clean version control integration, so I just download the .fig file and check it in whenever I update the diagram, which is as light pain.

For this PR, I think any diagram is fine, then we can clean it up once we get close to publishing.


### Types of attackers

We consider three attacker profiles differentiated by the attacker's capabilities and privileges.
We consider three attacker profiles differentiated by the attacker's capabilities and privileges as related to the build they wish to subvert (the "target build").

#### Low privilege
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you thought about just calling these:

  • Everyone else (low privilege)
  • Project maintainer (medium privilege)
  • Build service admin (high privilege)

It seems like the rest of the doc does not use the low/medium/high profile terms anyway. Perhaps the alternates are easier to work in?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to the alternatives

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering private projects, I'd recommend to not use "Everyone else" rather something like "Developer" or "Contributor". I feel this could help apply for both public and private projects.

  • 1 for alternatives though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New wording is "Project contributors". (But it should be singular.)

But that seems overly narrow. An attacker could be someone who is not a contributor at all, no?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, we are talking about someone who is able to execute the capabilities:

Capabilities:

  • Create builds on the build service. These are the attacker's controlled builds.
  • Modify one or more controlled builds' external parameters.
  • Modify one or more controlled builds' environments and run arbitrary code inside those environments.
  • Read the target build's source repo.
  • Fork the target build's source repo.
  • Modify a fork of the target build's source repo and build from it.

I suppose they are an "Authenticated User" with those abilities. That would satisfy my concern about private / public projects.

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved

TODO: Align/cross-reference with SLSA Provenance Model.
TODO: Redraw diagrams in the style used by the rest of the site.

### Types of attackers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this list of attacker profiles, but the rest of the doc doesn't seem to use it. That seems like a missing piece, though I can't figure out exactly what's missing.

Maybe it's that the SLSA Build requirements are designed to protect against Low and Medium attackers, while protecting against High attackers is very complex and we need this "verifying systems" piece to convince consumers that they've done a good enough job?


#### Prompts for Assessing Parameters
#### Prompts for Assessing External Parameters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also: What gives us confidence that there are no additional external parameters that are missing from the provenance, and that a future design change will not violate SLSA assumptions?

(I ask because the new GHA Variables is exactly this type of design change.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work on this Kris. It looks great overall, I made a few minor comments on clarity and would like to see other's feedback addressed too.

Should we be adding a requirement that all build systems provide this information? My reading of the "Builder Evaluation" section suggests yes. If so, is that follow-on work?


### Control Plane

The control plane is the build system component that orchestrates each independent build execution. It is responsible for setting up each build and cleaning up afterwards. The control plane generates and signs provenance for each SLSA Build L3+ build performed on the system. The control plane is operated by one or more administrators, who have privileges to modify the control plane.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The control plane is the build system component that orchestrates each independent build execution. It is responsible for setting up each build and cleaning up afterwards. The control plane generates and signs provenance for each SLSA Build L3+ build performed on the system. The control plane is operated by one or more administrators, who have privileges to modify the control plane.
The control plane is the build system component that orchestrates each independent build execution. It is responsible for setting up each build and cleaning up afterwards. At SLSA Build L3+ the control plane generates and signs provenance for each build performed on the system. The control plane is operated by one or more administrators, who have privileges to modify the control plane.

I'm worried that folks could read the original phrasing as only L3+ builds are signed, but maybe I'm being overly pessimistic here. My suggestion may not actually help either. :-D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, though I used L2+ since that's when the service starts signing provenance.


- What sorts of caches are available to build executors?
- How are those caches populated?
- How do you defend against cache poisoning attacks?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might re-phrase this as "How are cache contents validated before use?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


## Builder Evaluation

Organizations can either self-attest to their answers or seek an audit/certification from a third party. Questionnaires for self-attestation should be published on the internet. Questionnaires for third-party certification need not be published. All provenance generated by L3+ builders must contain a non-forgeable attestation of the builder's L3+ capabilities with a limited validity period. Any secret materials used to prove the non-forgeability of the attestation must belong to the attesting party.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably expand on " All provenance generated by L3+ builders must contain a non-forgeable attestation of the builder's L3+ capabilities with a limited validity period." – what attestation? Why? What period?

This AI could be a TODO

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of this - maybe for SLSA 1.1 we could create a verified build system attestation spec :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added as a TODO. I'm hoping to squeeze it into 1.0 if possible.


### Types of attackers

We consider three attacker profiles differentiated by the attacker's capabilities and privileges.
We consider three attacker profiles differentiated by the attacker's capabilities and privileges as related to the build they wish to subvert (the "target build").

#### Low privilege
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to the alternatives

@abacchi
Copy link
Collaborator

abacchi commented Jan 13, 2023

Should we be adding a requirement that all build systems provide this information?

It would make the maintainers' lives easier if the build system vendors were able to provide this to the best of their ability (maintainer may need to fill in some gaps)

@@ -0,0 +1,157 @@
# Verifying Build Systems
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use hyphens to separate words, not underscores (e.g. use-cases.md, get-started.md, also that's Google's style guide). I suggest waiting until right before merging so that we don't lose comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

docs/spec/v1.0/verifying_systems.md Outdated Show resolved Hide resolved
Co-authored-by: Mark Lodato <[email protected]>
Signed-off-by: kpk47 <[email protected]>
@kpk47 kpk47 merged commit 99ce983 into slsa-framework:main Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants