-
Notifications
You must be signed in to change notification settings - Fork 240
SLSA v1.0: Add "Verifying Build Systems" #568
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
Changes from 8 commits
a55d28b
b0a97c8
1b21bb6
bfd1592
0a3ae1d
5c59c75
bc531ca
e404195
d08a449
0f48461
1c3b95a
444944a
10a8d97
790b67a
b3e67a7
7aafd0d
e2e8c80
2866e69
f6af2be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
# Verifying Build Systems | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
The provenance consumer is responsible for deciding whether they trust a builder to produce SLSA Build L3 provenance. However, assessing Build L3 capabilities requires information about a builder's construction and operating procedures that the consumer cannot glean from the provenance itself. To aid with such assessments, we provide a common threat model and builder model for reasoning about builders' security. We also provide a questionnaire that organizations can use to describe their builders to consumers along with sample answers that do and do not satisfy the SLSA Build L3 requirements. | ||
|
||
## Threat Model | ||
|
||
### Attacker Goal | ||
|
||
The attacker's primary goal is to tamper with a build to create unexpected, vulnerable, or malicious behavior in the output artifact while avoiding detection. Their means of doing so is generating build provenance that does not faithfully represent the built artifact's origins or build process. | ||
|
||
More formally, if a build with external parameters P would produce an artifact with binary hash X and a build with external parameters P' would produce an artifact with binary hash Y, they wish to produce provenance indicating a build with external parameters P produced an artifact with binary hash Y. | ||
|
||
This diagram represents a successful attack: | ||
|
||
 | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Note: Platform abuse and attacks against builder availability are out of scope of this document. | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
TODO: Align/cross-reference with SLSA Provenance Model. | ||
|
||
### Types of attackers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
|
||
We consider three attacker profiles differentiated by the attacker's capabilities and privileges. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
||
#### Low privilege | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you thought about just calling these:
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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to the alternatives There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
I suppose they are an "Authenticated User" with those abilities. That would satisfy my concern about private / public projects. |
||
|
||
- Examples | ||
- Anyone on the internet | ||
- Build platform insiders without administrative access | ||
|
||
- Capabilities | ||
- Create builds on the build platform. | ||
- Modify their builds' external parameters. | ||
- Modify their builds' environments and run arbitrary code inside those environments. | ||
- Read the source repo. | ||
- Fork the source repo. Modify their fork and build from it. | ||
- Access builder maintainers' intranet or other internal communications (e.g. email, design documents) | ||
|
||
#### Medium privilege | ||
|
||
- Examples | ||
- Project maintainer | ||
|
||
- Capabilities | ||
- All listed under "low privilege" | ||
- Create new builds in the package's build project | ||
- Modify the source repo and build from it. | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### High privilege | ||
|
||
- Examples | ||
- Build platform admin | ||
|
||
- Capabilities | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- All listed under "low privilege" | ||
- Run arbitrary code on the build platform | ||
- Read and modify network traffic | ||
|
||
## Build Model | ||
|
||
The build model consists of five components: parameters, the build platform, one or more build executors, a build cache, and output storage. The data flow between these components is shown in the diagram below. | ||
|
||
 | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The following sections detail each element of the build model and prompts for assessing its ability to produce SLSA Build L3 provenance. | ||
|
||
### Parameters | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Parameters are the external interface to the builder. They must include references to the source to be built and the build definition/script to be executed. They may include instructions to the build platform for how to create the build executor (e.g. which operating system to use). They may include additional strings to pass to the build executor. | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Prompts for Assessing Parameters | ||
|
||
- How does the platform process user-provided parameters? Examples: sanitizing, parsing, not at all | ||
- Which parameters are processed by the control plane and which are processed by the executor? | ||
- What sort of parameters does the control plane accept for executor configuration? | ||
|
||
### Control Plane | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The build platform is the control plane that orchestrates each independent build execution. It is responsible for setting up each build and cleaning up afterwards. The platform must generate and sign provenance for each SLSA Build L3+ build performed on the system. The platform is operated by one or more administrators, who have privileges to modify the platform. | ||
|
||
#### Prompts for Assessing Control Planes | ||
|
||
- Administration | ||
- What are they ways an employee can use privileged access to influence a build or provenance generation? Examples: physical access, terminal access, access to cryptographic secrets | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- What controls are in place to detect or prevent the employee from abusing such access? Examples: two-person approvals, audit logging, workload identities | ||
- Roughly how many employees have such access? | ||
- How are privileged accounts protected? Examples: two-factor authentication, client device security policies | ||
- What plans do you have for recovering from security incidents and system outages? Are they tested? How frequently? | ||
|
||
- Provenance generation | ||
- How does the control plane observe the build to ensure the provenance's accuracy? | ||
- Are there situations in which the control plane will not generate provenance for a completed build? What are they? | ||
|
||
- Development practices | ||
- How do you track the control plane's software and configuration? Example: version control | ||
- How do you build confidence in the control plane's software supply chain? Example: SLSA L3+ provenance, build from source | ||
- How do you secure communications between builder components? Example: TLS with certificate transparency. | ||
- Are you able to perform forensic analysis on compromised executors? How? Example: retain base images indefinitely | ||
|
||
- 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may want to also mention hardware security modules here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
- Managing cryptographic secrets | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- How do you store the control plane's cryptographic secrets? | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Which parts of the organization have access to the control plane's cryptographic secrets? | ||
- What controls are in place to detect or prevent employees abusing such access? Examples: two-person approvals, audit logging | ||
- How frequently are cryptographic secrets rotated? Describe the rotation process. | ||
- What is your plan for remediating cryptographic secret compromise? How frequently is this plan tested? | ||
|
||
### Executor | ||
|
||
The build executor is the independent execution environment where the build takes place. Each executor must be isolated from the build platform and from all other executors. Build users are free to modify the environment inside the executor arbitrarily. Build executors must have a means to fetch input artifacts (source, dependencies, etc). | ||
|
||
#### Prompts for Assessing Executors | ||
|
||
- Isolation technologies | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- How are executors isolated from the control plane and each other? Examples: VMs, containers, sandboxed processes | ||
- How have you hardened your executors against malicious tenants? Examples: configuration hardening, limiting attack surface | ||
- How frequently do you update your isolation software? | ||
- What is your process for responding to platform 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? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
- How long could a compromised executor remain active in the build system? | ||
|
||
- Network access | ||
- Are executors able to call out to remote execution? If so, how do you prevent them from tampering with the control plane or other executors over the network? | ||
- Are executors able to open services on the network? If so, how do you prevent remote interference through these services? | ||
|
||
### Cache | ||
|
||
Builders may have zero or more caches to store frequently used dependencies. Build executors may have either read-only or read-write access to caches. | ||
|
||
#### Prompts for Assessing Caches | ||
|
||
- What sorts of caches are available to build executors? | ||
- How are those caches populated? | ||
- How do you defend against cache poisoning attacks? Example: content-addressable storage | ||
MarkLodato marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Output Storage | ||
|
||
Output Storage holds built artifacts and their provenance. Storage may either be shared between build projects or allocated separately per-project. | ||
|
||
#### Prompts for Assessing Output Storage | ||
|
||
- How do you prevent builds from reading or overwriting files that belong to another build? Example: authorization on storage | ||
- What processing, if any, does the control plane do on output artifacts? | ||
|
||
## 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 :) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
Uh oh!
There was an error while loading. Please reload this page.