Skip to content

Commit 8aa6c73

Browse files
editorial: Make build environment definitions linkable (#1274)
Fixes #1177 and #1197 . --------- Signed-off-by: Marcela Melara <marcela.melara@intel.com>
1 parent 8cf9066 commit 8aa6c73

File tree

2 files changed

+79
-62
lines changed

2 files changed

+79
-62
lines changed

docs/spec/draft/attested-build-env-levels.md

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: This page gives an overview of the SLSA Build Environment track and
55

66
## Rationale
77

8-
Today's hosted build platforms play a central role in an artifact's supply
8+
Today's hosted [build platforms] play a central role in an artifact's supply
99
chain. Whether it's a cloud-hosted service like GitHub Actions or an internal
1010
enterprise CI/CD system, the build platform has a privileged level of access
1111
to artifacts and sensitive operations during a build (e.g., access to
@@ -18,15 +18,15 @@ implement and operate fully secure build platforms because they are made up
1818
of many layers of interconnected components and subsystems.
1919

2020
The SLSA Build Environment track aims to address these issues by making it
21-
possible to validate the integrity and trace the provenance of core build
21+
possible to validate the integrity and trace the [provenance] of core build
2222
platform components.
2323

2424
## Track overview
2525

2626
The SLSA Build Environment (BuildEnv) track describes increasing levels of
27-
integrity and trustworthiness of the <dfn>provenance</dfn> of a build's
28-
execution context. In this track, provenance describes how a [build image]
29-
was created, how the [hosted] build platform deployed a build image in its
27+
integrity and trustworthiness of the provenance of a build's
28+
execution context. In this track, provenance describes how a build image
29+
was created, how the hosted build platform deployed a build image in its
3030
environment, and the compute platform they used.
3131

3232
| Track/Level | Requirements | Focus | Trust Root
@@ -52,23 +52,23 @@ TODO
5252
## BuildEnv levels
5353

5454
The primary purpose of the Build Environment (BuildEnv) track is to enable
55-
auditing that a build was run in the expected execution context.
55+
auditing that a build was run in the expected [execution context].
5656

5757
The lowest level only requires SLSA [Build L2] Provenance to
58-
exist for the build image, while higher levels provide increasing
58+
exist for the [build image], while higher levels provide increasing
5959
auditability of the build environment's properties and integrity of the
6060
generated provenance attestations. The highest levels introduce further
61-
requirements for hardware-assisted hardening aimed at reducing the trusted
62-
computing base of a build.
61+
requirements for hardware-assisted hardening of the [compute platform]
62+
aimed at reducing the trusted computing base of a build.
6363

6464
Software producers and third-party auditors can check attestations generated
65-
by the build image producer and build platform against the expected
65+
by the [build image producer] and build platform against the expected
6666
properties for a given build environment. This enables any party to detect
6767
[several classes] of supply chain threats originating in the build
6868
environment.
6969

7070
As in the Build track, the exact implementation of this track is determined
71-
by the build platform provider, whether they are a commercial CI/CD service
71+
by the build platform implementer, whether they are a commercial CI/CD service
7272
or enterprise organization. While this track describes general minimum
7373
requirements, this track does not dictate the following
7474
implementation-specific details: the type of build environment, accepted
@@ -110,23 +110,23 @@ n/a
110110
<dt>Summary<dd>
111111

112112
The build image (i.e., VM or container image) used to instantiate the build
113-
environment has SLSA provenance showing how the image was built.
113+
environment has SLSA Build Provenance showing how the image was built.
114114

115115
<dt>Intended for<dd>
116116

117117
Build platforms and organizations wanting to ensure a baseline level of
118-
integrity for build environments at the time of build image distrbution.
118+
integrity for build environments at the time of build image distribution.
119119

120120
<dt>Requirements<dd>
121121

122122
- Build Image Producer:
123123
- MUST automatically generate SLSA [Build L2] or higher
124124
Provenance for created build images (i.e., VM or container images).
125-
- MUST allow independent automatic verification of a build image's SLSA
126-
Provenance. If the build image artifact cannot be published, for example
127-
due to intellectual property concerns, an attestation asserting the
125+
- MUST allow independent automatic verification of a build image's [SLSA
126+
Build Provenance]. If the build image artifact cannot be published, for
127+
example due to intellectual property concerns, an attestation asserting the
128128
expected hash value of the build image MUST be generated and distributed
129-
instead (e.g., using [SCAI] or a [Release Attestation]). If the full
129+
instead (e.g., using [SCAI] or a [Release Attestation]). If the full Build
130130
Provenance document cannot be disclosed, a [VSA] asserting the build
131131
image's SLSA Provenance MUST be distributed instead.
132132

@@ -168,14 +168,14 @@ All of [BuildEnv L1], plus:
168168
- Build Image Producer:
169169
- Build images MUST be created via a SLSA [Build L3] or higher build
170170
process.
171-
- MUST automatically generate and distribute signed reference values
171+
- MUST automatically generate and distribute signed [reference values]
172172
for the following build image components: bootloader or equivalent,
173-
guest kernel, build agent, build executor, and root filesystem (e.g.,
174-
via the image's SLSA Provenance, or [SCAI]).
173+
guest kernel, [build agent], and root filesystem (e.g., via the image's
174+
SLSA Provenance, or [SCAI]).
175175
Additional build image components whose initial state is to be checked
176176
MAY be also measured.
177177
- The build agent MUST be capable of:
178-
- Upon completion of the boot process: Automatically interfacing
178+
- Upon completion of the [boot process]: Automatically interfacing
179179
with the host interface to obtain and transmit a signed quote for the
180180
build environment's system state.
181181
- Upon build dispatch: Automatically generating and distributing
@@ -185,13 +185,13 @@ All of [BuildEnv L1], plus:
185185
- Build Platform Requirements:
186186
- MUST meet SLSA [Build L3] requirements.
187187
- Prior to dispatching a tenant's build to an instantiated environment,
188-
a signed quote MUST be automatically requested from the build agent,
189-
and the contained measurements verified against their boot process
188+
a signed [quote] MUST be automatically requested from the build agent,
189+
and the contained [measurements] verified against their boot process
190190
reference values. A signed attestation to the result of the verification
191191
MUST be generated and distributed (e.g., via a [VSA]).
192192

193193
- Compute Platform Requirements:
194-
- The host interface MUST be capable of generating signed quotes for
194+
- The [host interface] MUST be capable of generating signed quotes for
195195
the build environment's system state.
196196
In a VM-based environment, this MUST be achieved by enabling a feature
197197
like [vTPM], or equivalent, in the hypervisor.
@@ -295,10 +295,22 @@ TODO
295295
[Release Attestation]: https://github.com/in-toto/attestation/blob/main/spec/predicates/release.md
296296
[SCAI]: https://github.com/in-toto/attestation/blob/main/spec/predicates/scai.md
297297
[Secure Boot]: https://wiki.debian.org/SecureBoot#What_is_UEFI_Secure_Boot.3F
298+
[SLSA Build Provenance]: provenance.md
298299
[TPM]: https://trustedcomputinggroup.org/resource/tpm-library-specification/
299300
[VSA]: verification_summary.md
300-
[build image]: terminology.md#build-environment-model
301+
[build image]: terminology.md#build-image
301302
[confidential computing]: https://confidentialcomputing.io/wp-content/uploads/sites/10/2023/03/Common-Terminology-for-Confidential-Computing.pdf
303+
[execution context]: terminology.md#build-environment
302304
[hosted]: requirements.md#isolation-strength
305+
[boot process]: terminology.md#boot-process
306+
[build agent]: terminology.md#build-agent
307+
[build image producer]: terminology.md#build-image-producer
308+
[build platforms]: terminology.md#platform
309+
[compute platform]: terminology.md#compute-platform
310+
[host interface]: terminology.md#host-interface
311+
[measurement]: terminology.md#measurement
312+
[provenance]: terminology.md#provenance
313+
[quote]: terminology.md#quote
314+
[reference values]: terminology.md#reference-value
303315
[several classes]: #build-environment-threats
304316
[vTPM]: https://trustedcomputinggroup.org/about/what-is-a-virtual-trusted-platform-module-vtpm/

docs/spec/draft/terminology.md

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,18 @@ of build types](/provenance/v1#index-of-build-types).
9999

100100
| Primary Term | Description
101101
| --- | ---
102-
| Platform | System that allows tenants to run builds. Technically, it is the transitive closure of software and services that must be trusted to faithfully execute the build. It includes software, hardware, people, and organizations.
102+
| <span id="platform">Platform</span> | System that allows tenants to run builds. Technically, it is the transitive closure of software and services that must be trusted to faithfully execute the build. It includes software, hardware, people, and organizations.
103103
| Admin | A privileged user with administrative access to the platform, potentially allowing them to tamper with builds or the control plane.
104104
| Tenant | An untrusted user that builds an artifact on the platform. The tenant defines the build steps and external parameters.
105105
| Control plane | Build platform component that orchestrates each independent build execution and produces provenance. The control plane is managed by an admin and trusted to be outside the tenant's control.
106106
| Build | Process that converts input sources and dependencies into output artifacts, defined by the tenant and executed within a single build environment on a platform.
107107
| Steps | The set of actions that comprise a build, defined by the tenant.
108-
| Build environment | The independent execution context in which the build runs, initialized by the control plane. In the case of a distributed build, this is the collection of all such machines/containers/VMs that run steps.
108+
| <span id="build-environment">Build environment</span> | The independent execution context in which the build runs, initialized by the control plane. In the case of a distributed build, this is the collection of all such machines/containers/VMs that run steps.
109109
| Build caches | An intermediate artifact storage managed by the platform that maps intermediate artifacts to their explicit inputs. A build may share build caches with any subsequent build running on the platform.
110110
| External parameters | The set of top-level, independent inputs to the build, specified by a tenant and used by the control plane to initialize the build.
111111
| Dependencies | Artifacts fetched during initialization or execution of the build process, such as configuration files, source artifacts, or build tools.
112112
| Outputs | Collection of artifacts produced by the build.
113-
| Provenance | Attestation (metadata) describing how the outputs were produced, including identification of the platform and external parameters.
113+
| <span id="provenance">Provenance</span> | Attestation (metadata) describing how the outputs were produced, including identification of the platform and external parameters.
114114

115115
<details><summary>Ambiguous terms to avoid</summary>
116116

@@ -131,46 +131,51 @@ of build types](/provenance/v1#index-of-build-types).
131131

132132
<p align="center"><img src="images/build-env-model.svg" alt="Build Environment Model"></p>
133133

134-
The Build Environment (BuildEnv) track expands upon the [build model](#build-model)
135-
by explicitily separating the *build image* and *compute platform* from the abstract
136-
build environment and build platform.
137-
138-
A typical build environment will go through the following lifecycle:
139-
140-
1. *Build image creation*: A build image producer creates different build
141-
images through a dedicated build process. For the SLSA BuildEnv track,
142-
the build image producer outputs provenance describing this process.
143-
2. *Build environment instantiation*: The hosted build platform calls
144-
into the *host interface* to create a new instance of a build environment
145-
from a given build image. The *build agent* begins to wait for an incoming
146-
build dispatch. For the SLSA BuildEnv track, the host interface in the
147-
compute platform attests to the integrity of the environment's *initial
148-
state* during its boot process.
149-
3. *Build dispatch*: When the tenant dispatches a new build, the hosted
150-
build platform assigns the build to a created build environment.
151-
For the SLSA BuildEnv track, the build platform
152-
attests to the binding between a build environment and *build ID*.
153-
4. *Build execution*: Finally, the *build agent* within the
154-
environment executes the tenant's build definition.
155-
156-
The BuildEnv track uses the following roles, components, and concepts:
134+
The Build Environment (BuildEnv) track expands upon the
135+
[build model](#build-model) by explicitily separating the
136+
[build image](#build-image) and [compute platform](#compute-platform) from the
137+
abstract [build environment](#build-environment) and [build platform](#platform).
138+
Specifically, the BuildEnv track defines the following roles, components, and concepts:
157139

158140
| Primary Term | Description
159141
| --- | ---
160-
| Build ID | An immutable identifier assigned uniquely to a specific execution of a tenant's build. In practice, the build ID may be an identifier, such as a UUID, associated with the build execution.
161-
| Build image | The template for a build environment, such as a VM or container image. Individual components of a build image include the root filesystem, pre-installed guest OS and packages, the build executor, and the build agent.
162-
| Build image producer | The party that creates and distributes build images. In practice, the build image producer may be the hosted build platform or a third party in a bring-your-own (BYO) build image setting.
163-
| Build agent | A build platform-provided program that interfaces with the build platform's control plane from within a running build environment. The build agent is also responsible for executing the tenant’s build definition, i.e., running the build. In practice, the build agent may be loaded into the build environment after instantiation, and may consist of multiple components. All build agent components must be measured along with the build image.
164-
| Build dispatch | The process of assigning a tenant's build to a pre-deployed build environment on a hosted build platform.
165-
| Compute platform | The compute system and infrastructure underlying a build platform, i.e., the host system (hypervisor and/or OS) and hardware. In practice, the compute platform and the build platform may be managed by the same or distinct organizations.
166-
| Host interface | The component in the compute platform that the hosted build platform uses to request resources for deploying new build environments, i.e., the VMM/hypervisor or container orchestrator.
167-
| Boot process | In the context of builds, the process of loading and executing the layers of firmware and/or software needed to start up a build environment on the host compute platform.
168-
| Measurement | The cryptographic hash of some component or system state in the build environment, including software binaries, configuration, or initialized run-time data.
169-
| Quote | (Virtual) hardware-signed data that contains one or more (virtual) hardware-generated measurements. Quotes may additionally include nonces for replay protection, firmware information, or other platform metadata.
170-
| Reference value | A specific measurement used as the good known value for a given build environment component or state.
142+
| <span id="build-id">Build ID</span> | An immutable identifier assigned uniquely to a specific execution of a tenant's build. In practice, the build ID may be an identifier, such as a UUID, associated with the build execution.
143+
| <span id="build-image">Build image</span> | The template for a build environment, such as a VM or container image. Individual components of a build image include the root filesystem, pre-installed guest OS and packages, the build executor, and the build agent.
144+
| <span id="build-image-producer">Build image producer</span> | The party that creates and distributes build images. In practice, the build image producer may be the hosted build platform or a third party in a bring-your-own (BYO) build image setting.
145+
| <span id="build-agent">Build agent</span> | A build platform-provided program that interfaces with the build platform's control plane from within a running build environment. The build agent is also responsible for executing the tenant’s build definition, i.e., running the build. In practice, the build agent may be loaded into the build environment after instantiation, and may consist of multiple components. All build agent components must be measured along with the build image.
146+
| <span id="build-dispatch">Build dispatch</span> | The process of assigning a tenant's build to a pre-deployed build environment on a hosted build platform.
147+
| <span id="compute-platform">Compute platform</span> | The compute system and infrastructure underlying a build platform, i.e., the host system (hypervisor and/or OS) and hardware. In practice, the compute platform and the build platform may be managed by the same or distinct organizations.
148+
| <span id="host-interface">Host interface</span> | The component in the compute platform that the hosted build platform uses to request resources for deploying new build environments, i.e., the VMM/hypervisor or container orchestrator.
149+
| <span id="boot-process">Boot process</span> | In the context of builds, the process of loading and executing the layers of firmware and/or software needed to start up a build environment on the host compute platform.
150+
| <span id="measurement">Measurement</span> | The cryptographic hash of some component or system state in the build environment, including software binaries, configuration, or initialized run-time data.
151+
| <span id="quote">Quote</span> | (Virtual) hardware-signed data that contains one or more (virtual) hardware-generated measurements. Quotes may additionally include nonces for replay protection, firmware information, or other platform metadata. (Based on the definition in [section 9.5.3.1](https://trustedcomputinggroup.org/wp-content/uploads/TPM-2.0-1.83-Part-1-Architecture.pdf) of the TPM 2.0 spec)
152+
| <span id="reference-value">Reference value</span> | A specific measurement used as the good known value for a given build environment component or state.
171153

172154
**TODO:** Disambiguate similar terms (e.g., image, build job, build executor/runner)
173155

156+
#### Build environment lifecycle
157+
158+
A typical build environment will go through the following lifecycle:
159+
160+
1. *Build image creation*: A [build image producer](#build-image-producer)
161+
creates different [build images](#build-image) through a dedicated build
162+
process. For the SLSA BuildEnv track, the build image producer outputs
163+
[provenance](#provenance) describing this process.
164+
2. *Build environment instantiation*: The [hosted build platform](#platform)
165+
calls into the [host interface](#host-interface) to create a new instance
166+
of a build environment from a given build image. The
167+
[build agent](#build-agent) begins to wait for an incoming
168+
[build dispatch](#build-dispatch).
169+
For the SLSA BuildEnv track, the host interface in the compute platform
170+
attests to the integrity of the environment's initial state during its
171+
[boot process](#boot-process).
172+
3. *Build dispatch*: When the tenant dispatches a new build, the hosted
173+
build platform assigns the build to a created build environment.
174+
For the SLSA BuildEnv track, the build platform attests to the binding
175+
between a build environment and [build ID](#build-id).
176+
4. *Build execution*: Finally, the build agent within the environment executes
177+
the tenant's build definition.
178+
174179
### Package model
175180

176181
Software is distributed in identifiable units called <dfn>packages</dfn>

0 commit comments

Comments
 (0)