Table of Contents:
Reminder: The definitions below are not yet finalized and subject to change, particularly SLSA 3-4.
This document enumerates all of the detailed requirements for an artifact to meet SLSA. For a broader overview, including basic terminology and threat model, see the main page.
Immutable reference: An identifier that is guaranteed to always point to the same, immutable artifact. This MUST allow the consumer to locate the artifact and SHOULD include a cryptographic hash of the artifact's contents to ensure integrity. Examples: git URL + branch/tag/ref + commit ID; cloud storage bucket ID + SHA-256 hash; Subversion URL (no hash).
Platform: Infrastructure or service that hosts the source, build, or distribution of software. Examples: GitHub, Google Cloud Build, Travis CI, Mozilla's self-hosted Mercurial server.
Provenance: Metadata about how an artifact was produced.
Revision: An immutable, coherent state of a source. In Git, for example, a revision is a commit in the history reachable from a specific branch in a specific repository. Different revisions within one repo MAY have different levels. Example: the most recent revision on a branch meets SLSA 4 but very old historical revisions before the cutoff do not.
Trusted persons: Set of persons who are granted the authority to maintain a software project. For example, https://github.com/MarkLodato/dotfiles has just one trusted person (MarkLodato), while https://hg.mozilla.org/mozilla-central has a set of trusted persons with write access to the mozilla-central repository.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Requirement | Description | L1 | L2 | L3 | L4 |
---|---|---|---|---|---|
Version Controlled |
Every change to the source is tracked in a version control system that meets the following requirements:
Most popular version control system meet this requirement, such as git, Mercurial, Subversion, or Perforce. NOTE: This does NOT require that the code, uploader/reviewer identities, or change history be made public. Rather, some organization must attest to the fact that these requirements are met, and it is up to the consumer whether this attestation is sufficient. | ✓ | ✓ | ✓ | |
Verified History |
Every change in the revision's history has at least one strongly authenticated actor identities (author, uploader, reviewer, etc.) and timestamp. It must be clear which identities were verified, and those identities must use two-step verification or similar. (Exceptions noted below.)
| ✓ | ✓ | ||
Retained Indefinitely |
The revision and its change history are preserved indefinitely and cannot be deleted, except when subject to an established and transparent policy for obliteration, such as a legal or policy requirement.
| 18 mo. | ✓ | ||
Two-Person Reviewed |
Every change in the revision's history was agreed to by two trusted persons prior to submission, and both of these trusted persons were strongly authenticated. (Exceptions from Verified History apply here as well.)
| ✓ |
Requirements on build process:
Requirement | Description | L1 | L2 | L3 | L4 |
---|---|---|---|---|---|
Scripted Build |
All build steps were fully defined in some sort of "build script". The only manual command, if any, was to invoke the build script. Examples:
| ✓ | ✓ | ✓ | ✓ |
Build Service |
All build steps ran using some build service, not on a developer's workstation. Examples: GitHub Actions, Google Cloud Build, Travis CI. | ✓ | ✓ | ✓ | |
Ephemeral Environment |
The build service ensured that the build steps ran in an ephemeral environment, such as a container or VM, provisioned solely for this build, and not reused from a prior build. | ✓ | ✓ | ||
Isolated |
The build service ensured that the build steps ran in an isolated environment free of influence from other build instances, whether prior or concurrent.
| ✓ | ✓ | ||
Parameterless |
The build output cannot be affected by user parameters other than the build entry point and the top-level source location. In other words, the build is fully defined through the build script and nothing else. Examples:
| ✓ | |||
Hermetic |
All transitive build steps, sources, and dependencies were fully declared up front with immutable references, and the build steps ran with no network access. The user-defined build script:
The build service:
| ✓ | |||
Reproducible |
Re-running the build steps with identical input artifacts results in bit-for-bit identical output. Builds that cannot meet this MUST provide a justification why the build cannot be made reproducible. "○" means that this requirement is "best effort". The user-provided build script SHOULD declare whether the build is intended to be reproducible or a justification why not. The build service MAY blindly propagate this intent without verifying reproducibility. A consumer MAY reject the build if it does not reproduce. | ○ |
Requirements on the process by which provenance is generated and consumed:
Requirement | Description | L1 | L2 | L3 | L4 |
---|---|---|---|---|---|
Available |
The provenance is available to the consumer in a format that the consumer accepts. The format SHOULD be in-toto provenance, but another format MAY be used if both producer and consumer agree and it meets all the other requirements. | ✓ | ✓ | ✓ | ✓ |
Authenticated |
The provenance's authenticity and integrity can be verified by the consumer. This SHOULD be through a digital signature from a private key accessible only to the service generating the provenance. | ✓ | ✓ | ✓ | |
Service Generated |
The data in the provenance MUST be obtained from the build service (either because the generator is the build service or because the provenance generator reads the data directly from the build service). Regular users of the service MUST NOT be able to inject or alter the contents, except as noted below. The following provenance fields MAY be generated by the user-controlled build steps:
| ✓ | ✓ | ✓ | |
Non-Falsifiable |
Provenance cannot be falsified by the build service's users. NOTE: This requirement is a stricter version of Service Generated.
The following provenance fields MAY be generated by the user-controlled build steps without the build service verifying their correctness:
| ✓ | ✓ | ||
Dependencies Complete |
Provenance records all build dependencies that were available while running the build steps. This includes the initial state of the machine, VM, or container of the build worker.
| ✓ |
Requirements on the contents of the provenance:
Requirement | Description | L1 | L2 | L3 | L4 |
---|---|---|---|---|---|
Identifies Artifact |
The provenance identifies the output artifact via a cryptographic hash. The RECOMMENDED algorithm is SHA-256 for cross-system compatibility. If another algorithm is used, it SHOULD be resistant to collisions and second preimages. | ✓ | ✓ | ✓ | ✓ |
Identifies Builder |
The provenance identifies the entity that performed the build and generated the provenance. This represents the entity that the consumer must trust. Examples: "GitHub Actions with a GitHub-hosted worker", "jdoe@example.com's machine". | ✓ | ✓ | ✓ | ✓ |
Identifies Source |
The provenance identifies the source containing the top-level build script, via an immutable reference. Example: git URL + branch/tag/ref + commit ID. | ✓ | ✓ | ✓ | ✓ |
Identifies Entry Point |
The provenance identifies the "entry point" or command that was used to invoke
the build script. Example: | ✓ | ✓ | ✓ | ✓ |
Includes All Build Parameters |
The provenance includes all build parameters under a user's control. See Parameterless for details. (At L3, the parameters must be listed; at L4, they must be empty.) | ✓ | ✓ | ||
Includes All Transitive Dependencies |
The provenance includes all transitive dependencies listed in Dependencies Complete. | ✓ | |||
Includes Reproducible Info |
The provenance includes a boolean indicating whether build is intended to be reproducible and, if so, all information necessary to reproduce the build. See Reproducible for more details. | ✓ | |||
Includes Metadata |
The provenance includes metadata to aid debugging and investigations. This SHOULD at least include start and end timestamps and a permalink to debug logs. "○" = RECOMMENDED. | ○ | ○ | ○ | ○ |
Common requirements for every trusted system involved in the supply chain (source, build, distribution, etc.)
TODO: Expand this section. Currently it is under-specified.
Requirement | Description | L1 | L2 | L3 | L4 |
---|---|---|---|---|---|
Security |
The system meets some TBD baseline security standard to prevent compromise. (Patching, vulnerability scanning, user isolation, transport security, secure boot, machine identity, etc. Perhaps NIST 800-53 or a subset thereof.) | ✓ | |||
Access |
All physical and remote access must be rare, logged, and gated behind multi-party approval. | ✓ | |||
Superusers |
Only a small number of platform admins may override the guarantees listed here. Doing so MUST require approval of a second platform admin. | ✓ |