Skip to content

Commit 5ea393e

Browse files
Document SecureBuild verification path for SDK images (#3966)
* Document SecureBuild verification path for SDK images Replicated SDK images are rebuilt by SecureBuild roughly 6 hours after release, which breaks the upstream verification script because the digest, signing identity, and provenance builder all change. Add a second verification path using the SecureBuild-provided verify-securebuild-image.sh script, and explain the two-phase verification lifecycle so customers know which path to use. --------- Co-authored-by: Paige Calvert <eura.calvert@gmail.com>
1 parent 3762bc1 commit 5ea393e

File tree

4 files changed

+112
-31
lines changed

4 files changed

+112
-31
lines changed
Lines changed: 105 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,56 @@
11
# Validate provenance of releases for the Replicated SDK
22

3-
:::note
4-
This information applies to Replicated SDK versions 1.18.1 and earlier.
5-
:::
6-
7-
This topic describes how to verify the authenticity and integrity of Replicated SDK container images using SLSA provenance, image signatures, and Software Bill of Materials (SBOM) attestations.
3+
This topic describes how to verify the authenticity and integrity of Replicated SDK container images. It covers Supply Chain Levels for Software Artifacts (SLSA) provenance, image signatures, and Software Bill of Materials (SBOM) attestations.
84

95
## About supply chain levels for software artifacts (SLSA)
106

117
[Supply Chain Levels for Software Artifacts (SLSA)](https://slsa.dev/), pronounced "salsa," is a security framework that comprises standards and controls designed to prevent tampering, enhance integrity, and secure software packages and infrastructure.
128

139
## Purpose of attestations
1410

15-
Attestations enable the inspection of an image to determine its origin, the identity of its creator, the creation process, and its contents. When building software using the Replicated SDK, the image's Software Bill of Materials (SBOM) and SLSA-based provenance attestations empower your customers to make informed decisions regarding the impact of an image on the supply chain security of your application.
11+
Attestations enable the inspection of an image to determine its origin, the identity of its creator, the creation process, and its contents. When building software using the Replicated SDK, the image's SBOM and SLSA-based provenance attestations help your customers assess your application's supply chain security.
1612

1713
The Replicated SDK build process uses Chainguard's Wolfi-based images to minimize the number of CVEs. The build process automatically generates:
1814
- SLSA provenance attestations
19-
- Image signatures
20-
- Software Bill of Materials (SBOM)
15+
- Image signatures
16+
- SBOM
17+
18+
## About the SDK image verification lifecycle
19+
20+
Replicated publishes SDK images in two phases, and the verification method depends on which phase an image is in:
21+
22+
1. **Original release build.** When Replicated releases a new SDK version, it builds the image through its own pipeline, which attaches:
23+
- SLSA L3 provenance from the GitHub Actions build
24+
- A cosign signature using Replicated's environment-specific keys
25+
- An SBOM attestation signed with the same keys
26+
27+
During this phase, see [Verify an original SDK release image](#verify-original).
28+
29+
1. **SecureBuild rebuild.** Approximately six hours after a release, [SecureBuild](https://securebuild.com/) rebuilds the image against the latest upstream package versions to remediate any newly-disclosed CVEs. This rebuild produces a new image digest signed with SecureBuild's keyless identity (Sigstore Fulcio and Rekor, backed by a Google Cloud Platform (GCP) service account). After this rebuild, the upstream verification script fails because the digest, signing identity, and provenance builder have all changed.
30+
31+
During this phase, see [Verify a SecureBuild-rebuilt SDK image](#verify-securebuild).
32+
33+
This lifecycle reflects a trade-off between provenance continuity and CVE remediation. SLSA provenance binds to a specific build pipeline and digest, so any rebuild by a different builder requires a new attestation chain. Both verification paths provide equivalent cryptographic guarantees, only with different trust anchors.
2134

2235
## Prerequisites
36+
2337
Before performing these tasks, install the following tools:
24-
- [slsa-verifier](https://github.com/slsa-framework/slsa-verifier)
2538
- [cosign](https://github.com/sigstore/cosign)
2639
- [jq](https://stedolan.github.io/jq/)
40+
- [slsa-verifier](https://github.com/slsa-framework/slsa-verifier) (only required for the original release build)
41+
42+
## Verify an original SDK release image {#verify-original}
2743

28-
## Verify SDK image integrity
29-
### Using the verification script
30-
Replicated provides a verification script within the replicated-sdk repo that you can use directly or use it as a basis to develop your own verification automation. The script is located at https://github.com/replicatedhq/replicated-sdk/blob/main/certs/verify-image.sh
44+
Use this method when verifying a Replicated SDK image during the window between the original release and the SecureBuild rebuild.
3145

32-
The verification script performs three key security checks:
33-
1. SBOM attestation verification
34-
2. SLSA Provenance verification
35-
3. Image signature verification
46+
### Use the verification script
47+
48+
Replicated provides a verification script in the replicated-sdk repository that you can use directly or as a basis for your own verification automation. You can see the script at https://github.com/replicatedhq/replicated-sdk/blob/main/certs/verify-image.sh.
49+
50+
The verification script performs these security checks:
51+
* SLSA provenance verification
52+
* Image signature verification
53+
* SBOM attestation verification
3654

3755
**Usage:**
3856
```bash
@@ -59,22 +77,78 @@ Optional Arguments:
5977

6078
The script performs the following checks:
6179

62-
1. **SLSA Provenance Verification**
80+
1. SLSA provenance verification:
6381
- Validates the build chain integrity
64-
- Verifies the build was performed through the secure build pipeline
82+
- Verifies that the build ran through the secure build pipeline
6583
- Displays build details
6684

67-
2. **Image Signature Verification**
85+
1. Image signature verification:
6886
- Uses environment-specific public keys for verification
69-
- The repo contains the public located in the /certs directory. For example the `cosign-prod.pub` key is used to validate a production release of the SDK.
70-
71-
3. **SBOM Attestation Verification**
72-
- Validates the Software Bill of Materials
73-
- Displays SBOM details including:
74-
- Document name
75-
- Creation timestamp
76-
- Creator information
77-
- Total number of packages
78-
- Optionally shows full SBOM content with `--show-sbom` flag
79-
80-
For more information about the SDK release process and security measures, see the [Replicated SDK Release Process documentation](https://docs.replicated.com/vendor/releases-creating).
87+
- The replicated-sdk repository contains the public keys in the `certs` directory. For example, the `cosign-prod.pub` key validates a production release of the SDK.
88+
89+
1. SBOM attestation verification:
90+
- Validates the SBOM
91+
- Displays SBOM details, including:
92+
- Document name
93+
- Creation timestamp
94+
- Creator information
95+
- Total number of packages
96+
- Optionally shows full SBOM content with the `--show-sbom` flag
97+
98+
## Verify a SecureBuild-rebuilt SDK image {#verify-securebuild}
99+
100+
Use this method when verifying a Replicated SDK image after SecureBuild has rebuilt it (approximately six hours after the release). SecureBuild rebuilds produce a new digest signed using keyless signing through Sigstore, Fulcio, and Rekor.
101+
102+
### Use the verification script
103+
104+
SecureBuild provides a verification script in the securebuild repository that you can use directly or as a basis for your own verification automation. You can find the script at https://github.com/securebuildhq/securebuild/blob/main/scripts/verify-securebuild-image.sh.
105+
106+
The verification script performs these security checks against the SecureBuild signing identity:
107+
* SLSA v1.0 provenance verification
108+
* Cosign image signature verification
109+
* Software Package Data Exchange (SPDX) SBOM attestation verification
110+
111+
Contact your Replicated account team for the SecureBuild signing identity (a GCP service account email) that applies to your images.
112+
113+
**Usage:**
114+
```bash
115+
./verify-securebuild-image.sh <image-with-digest> [--identity <email>] [--issuer <url>]
116+
117+
Arguments:
118+
image-with-digest Image reference with digest (for example, registry.example.com/image@sha256:abc123)
119+
120+
Options:
121+
--identity <email> Fulcio certificate identity (GCP service account email).
122+
Can also be set with the SECUREBUILD_IDENTITY environment variable.
123+
--issuer <url> OIDC issuer URL. Default: https://accounts.google.com.
124+
Can also be set with the SECUREBUILD_OIDC_ISSUER environment variable.
125+
--help Show this help message.
126+
```
127+
128+
**Example:**
129+
```bash
130+
./verify-securebuild-image.sh \
131+
cve0.io/replicated-sdk-image@sha256:0a83d01a984fb8d77db882648461021d9cef97113bf6332cc939b30d291a09a3 \
132+
--identity attestor@your-securebuild-project.iam.gserviceaccount.com
133+
```
134+
135+
To get the digest for a tag, run `crane digest <image:tag>`.
136+
137+
### Verification process
138+
139+
The script performs the following checks:
140+
141+
1. SLSA provenance verification:
142+
- Runs `cosign verify-attestation --type https://slsa.dev/provenance/v1` against the image
143+
- Validates that the SecureBuild keyless identity signed the attestation
144+
- Displays build details, including the build type, builder ID, build ID, and start and finish timestamps
145+
146+
1. Image signature verification:
147+
- Runs `cosign verify` against the image using the SecureBuild keyless identity
148+
- Confirms that SecureBuild signed the image through Fulcio and recorded it in the Rekor transparency log
149+
150+
1. SBOM attestation verification:
151+
- Runs `cosign verify-attestation --type https://spdx.dev/Document` against the image
152+
- Validates that the SecureBuild keyless identity signed the SPDX SBOM attestation
153+
154+
For more information about the SDK release process, see [Manage releases with the Vendor Portal](/vendor/releases-creating-releases).

styles/config/vocabularies/ReplicatedTerms/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ unarchive
4040
Unarchived
4141
collab
4242
Reinvite
43+
Replicated's

styles/config/vocabularies/TechJargon/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ SCIM
8989
SSO
9090
TOTP
9191
ttl
92+
keyless

styles/config/vocabularies/ThirdPartyProducts/accept.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ ubuntu
4444
Velero
4545
GSuite
4646
Okta
47+
Chainguard
48+
Fulcio
49+
Rekor
50+
SecureBuild
51+
Sigstore

0 commit comments

Comments
 (0)