Skip to content

Commit f7bdd1d

Browse files
committed
Merge all requirements docs into one.
This allows us to add a link to the top of the website, and it also makes it easier to see all requirements on one page. NOTE: In a future change, I will reformat the source and common requirements into table form, to match the build requirements.
1 parent d017a42 commit f7bdd1d

6 files changed

+189
-186
lines changed

README.md

+21-24
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ mean the lack of a SLSA level.
250250

251251
### Level requirements
252252

253-
The following is a summary. For details, see corresponding [Source],
254-
[Build/Provenance], and [Common] documents.
253+
The following is a summary. For details, click the links in the table for
254+
corresponding [requirements](requirements.md).
255255

256256
Requirement | SLSA 1 | SLSA 2 | SLSA 3 | SLSA 4
257257
------------------------------------ | ------ | ------ | ------ | ------
@@ -277,28 +277,25 @@ Common - [Superusers] | | | | ✓
277277

278278
_○ = required unless there is a justification_
279279

280-
[Access]: common-requirements.md#access
281-
[Authenticated]: build-requirements.md#authenticated
282-
[Available]: build-requirements.md#available
283-
[Build Service]: build-requirements.md#build-service
284-
[Build/Provenance]: build-requirements.md
285-
[Common]: common-requirements.md
286-
[Dependencies Complete]: build-requirements.md#dependencies-complete
287-
[Ephemeral Environment]: build-requirements.md#ephemeral-environment
288-
[Hermetic]: build-requirements.md#hermetic
289-
[Isolated]: build-requirements.md#isolated
290-
[Non-Falsifiable]: build-requirements.md#non-falsifiable
291-
[Parameterless]: build-requirements.md#parameterless
292-
[Reproducible]: build-requirements.md#reproducible
293-
[Retained Indefinitely]: source-requirements.md#retained-indefinitely
294-
[Scripted Build]: build-requirements.md#scripted-build
295-
[Security]: common-requirements.md#security
296-
[Service Generated]: build-requirements.md#service-generated
297-
[Source]: source-requirements.md
298-
[Superusers]: common-requirements.md#superusers
299-
[Two-Person Reviewed]: source-requirements.md#two-person-reviewed
300-
[Verified History]: source-requirements.md#verified-history
301-
[Version Controlled]: source-requirements.md#version-controlled
280+
[Access]: requirements.md#access
281+
[Authenticated]: requirements.md#authenticated
282+
[Available]: requirements.md#available
283+
[Build Service]: requirements.md#build-service
284+
[Dependencies Complete]: requirements.md#dependencies-complete
285+
[Ephemeral Environment]: requirements.md#ephemeral-environment
286+
[Hermetic]: requirements.md#hermetic
287+
[Isolated]: requirements.md#isolated
288+
[Non-Falsifiable]: requirements.md#non-falsifiable
289+
[Parameterless]: requirements.md#parameterless
290+
[Reproducible]: requirements.md#reproducible
291+
[Retained Indefinitely]: requirements.md#retained-indefinitely
292+
[Scripted Build]: requirements.md#scripted-build
293+
[Security]: requirements.md#security
294+
[Service Generated]: requirements.md#service-generated
295+
[Superusers]: requirements.md#superusers
296+
[Two-Person Reviewed]: requirements.md#two-person-reviewed
297+
[Verified History]: requirements.md#verified-history
298+
[Version Controlled]: requirements.md#version-controlled
302299

303300
## Scope of SLSA
304301

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: Supply-chain Levels for Software Artifacts
33
copyright_html: Copyright 2021 The Linux Foundation<br>under the terms of the <a href="https://github.com/slsa-framework/slsa/blob/main/LICENSE">Apache License 2.0</a>
44
repository: slsa-framework/slsa
55
header_pages:
6+
- requirements.md
67
- walkthrough.md
78

89
theme: minima

common-requirements.md

-20
This file was deleted.

build-requirements.md requirements.md

+163-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
# SLSA Build and Provenance Requirements
1+
# Requirements
22

3-
TODO: Add an introduction, diagram, threat model, and high-level description of
4-
each level.
3+
Table of Contents:
4+
5+
* [Definitions](#definitions)
6+
* [Source Requirements](#source-requirements)
7+
* [Build Requirements](#build-requirements)
8+
* [Provenance Requirements](#provenance-requirements)
9+
* [Common Requirements](#common-requirements)
510

611
_Reminder: The definitions below are not yet finalized and subject to change,
712
particularly SLSA 3-4._
813

9-
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
10-
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
11-
interpreted as described in
12-
[RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
14+
This document enumerates all of the detailed requirements for an artifact to
15+
meet SLSA. For a broader overview, including basic terminology and threat model,
16+
see the [main page](README.md).
1317

1418
## Definitions
1519

16-
**Provenance**: Metadata about how an artifact was produced.
17-
1820
<a id="immutable-reference"></a>**Immutable reference:** An identifier that is
1921
guaranteed to always point to the same, immutable artifact. This MUST allow the
2022
consumer to locate the artifact and SHOULD include a cryptographic hash of the
@@ -24,9 +26,137 @@ commit ID; cloud storage bucket ID + SHA-256 hash; Subversion URL (no hash).
2426
[immutable reference]: #immutable-reference
2527
[immutable references]: #immutable-reference
2628

27-
## Requirements
29+
**Platform:** Infrastructure or service that hosts the source, build, or
30+
distribution of software. Examples: GitHub, Google Cloud Build, Travis CI,
31+
[Mozilla's self-hosted Mercurial server](https://hg.mozilla.org).
2832

29-
### Build Requirements
33+
**Provenance**: Metadata about how an artifact was produced.
34+
35+
**Revision:** An immutable, coherent state of a source. In Git, for example, a
36+
revision is a commit in the history reachable from a specific branch in a
37+
specific repository. Different revisions within one repo MAY have different
38+
levels. Example: the most recent revision on a branch meets SLSA 4 but very old
39+
historical revisions before the cutoff do not.
40+
41+
**Trusted persons:** Set of persons who are granted the authority to maintain a
42+
software project. For example, https://github.com/MarkLodato/dotfiles has just
43+
one trusted person (MarkLodato), while https://hg.mozilla.org/mozilla-central
44+
has a set of trusted persons with write access to the mozilla-central
45+
repository.
46+
47+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
48+
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
49+
interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
50+
51+
## Source requirements
52+
53+
### SLSA 1
54+
55+
There are no source requirements at SLSA 1.
56+
57+
### SLSA 2
58+
59+
A revision meets SLSA 2 if all of the following are true:
60+
61+
* <a id="version-controlled"></a>**[Version Controlled]** Every change to the
62+
source is tracked in a version control system that meets the following
63+
requriements.
64+
65+
- **[Change History]** There exists a record of the history of changes
66+
that went into the revision. Each change must contain: the identities of
67+
the uploader and reviewers (if any), timestamps of the reviews (if any)
68+
and submission, the change description / justification, the content of
69+
the change, and the parent revisions.
70+
71+
- **[Immutable Reference]** There exists a way to indefinitely reference
72+
this particular, immutable revision. In git, this is the {repo URL +
73+
branch/tag/ref + commit ID}.
74+
75+
Most popular version control system meet this requirement, such as git,
76+
Mercurial, Subversion, or Perforce.
77+
78+
NOTE: This does NOT require that the code, uploader/reviewer identities, or
79+
change history be made public. Rather, some organization must attest to the fact
80+
that these requirements are met, and it is up to the consumer whether this
81+
attestation is sufficient.
82+
83+
### SLSA 3
84+
85+
_NOTE: The SLSA 3 requirements are subject to change._
86+
87+
A revision meets SLSA 3 if all of the following are true:
88+
89+
- The revision meets [SLSA 2](#slsa-2).
90+
91+
- <a id="verified-history"></a>**[Verified History]** Every change in the
92+
revision's history has at least one strongly authenticated actor identities
93+
(author, uploader, reviewer, etc.) and timestamp. It must be clear which
94+
identities were verified, and those identities must use
95+
[two-step verification](https://www.google.com/landing/2step/) or similar.
96+
(Exceptions noted below.)
97+
98+
- **[First-Parent History]** In the case of a non-linear version control
99+
system, where a revision can have more than one parent, only the "first
100+
parent history" is in scope. In other words, when a feature branch is
101+
merged back into the main branch, only the merge itself is in scope.
102+
- **[Historical Cutoff]** There is some TBD exception to allow existing
103+
projects to meet SLSA 3/4 even if historical revisions were present in
104+
the history. Current thinking is that this could be either last N months
105+
or a platform attestation guaranteeing that future changes in the next N
106+
months will meet the requirements.
107+
108+
- <a id="retained-indefinitely"></a>**[Retained Indefinitely]** The revision
109+
and its change history are preserved indefinitely and cannot be deleted,
110+
except when subject to an established and transparent policy for
111+
obliteration, such as a legal or policy requirement.
112+
113+
- **[Immutable History]** It must not be possible for persons to delete or
114+
modify the history, even with multi-party approval, except by trusted
115+
platform admins with two-party approval following the obliterate policy.
116+
- **[Limited Retention for SLSA 2]** At SLSA 2 (but not 3), it is
117+
acceptable for the retention to be limited to 18 months, as attested by
118+
the source control platform.
119+
- Example: If a commit is made on 2020-04-05 and then a retention
120+
attestation is generated on 2021-01-01, the commit must be retained
121+
until at least 2022-07-01.
122+
123+
### SLSA 4
124+
125+
_NOTE: The SLSA 4 requirements are subject to change._
126+
127+
A revision meets SLSA 4 if all of the following are true:
128+
129+
- The revision meets [SLSA 3](#slsa-3).
130+
131+
- <a id="two-person-reviewed"></a>**[Two-Person Reviewed]** Every change in
132+
the revision's history was agreed to by two trusted persons prior to
133+
submission, and both of these trusted persons were strongly authenticated.
134+
(Exceptions from [Verified History] apply here as well.)
135+
136+
- The following combinations are acceptable:
137+
- Uploader and reviewer are two different trusted persons.
138+
- Two different reviewers are trusted persons.
139+
- **[Different Persons]** The platform ensures that no person can use
140+
alternate identities to bypass the two-person review requirement.
141+
- Example: if a person uploads with identity X then reviews with alias
142+
Y, the platform understands that this is the same person and does
143+
not consider the review requirement satisfied.
144+
- **[Informed Review]** The reviewer is able and encouraged to make an
145+
informed decision about what they're approving. The reviewer should be
146+
presented with a full, meaningful content diff between the proposed
147+
revision and the previously reviewed revision. For example, it is not
148+
sufficient to just indicate that file changed without showing the
149+
contents.
150+
- **[Context-specific Approvals]** Approvals are for a specific context,
151+
such as a repo + branch in git. Moving fully reviewed content from one
152+
context to another still requires review. (Exact definition of "context"
153+
depends on the project, and this does not preclude well-understood
154+
automatic or reviewless merges, such as cutting a release branch.)
155+
- Git example: If a fully reviewed commit in one repo is merged into a
156+
different repo, or a commit in one branch is merged into a different
157+
branch, then the merge still requires review.
158+
159+
## Build Requirements
30160

31161
Requirements on build process:
32162

@@ -152,7 +282,7 @@ Requirements on build process:
152282
</tr>
153283
</table>
154284

155-
### Provenance Requirements
285+
## Provenance Requirements
156286

157287
Requirements on the process by which provenance is generated and consumed:
158288

@@ -316,3 +446,24 @@ Requirements on the contents of the provenance:
316446
<td>○<td>○<td>○<td>○
317447
</tr>
318448
</table>
449+
450+
## Common requirements
451+
452+
TODO: Write this section
453+
454+
Common requirements for every trusted system involved in the supply chain
455+
(source, build, distribution, etc.)
456+
457+
* <a id="security"></a>**[Security]** The system meets some TBD baseline
458+
security standard to prevent compromise. (Patching, vulnerability scanning,
459+
user isolation, transport security, secure boot, machine identity, etc.
460+
Perhaps
461+
[NIST 800-53](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r5.pdf)
462+
or a subset thereof.)
463+
464+
* <a id="access"></a>**[Access]** All physical and remote access must be rare,
465+
logged, and gated behind multi-party approval.
466+
467+
* <a id="superusers"></a>**[Superusers]** Only a small number of platform
468+
admins may override the guarantees listed here. Doing so MUST require
469+
approval of a second platform admin.

0 commit comments

Comments
 (0)