Skip to content

Commit 8e007ef

Browse files
committed
updates based on new verification script and additional image verification features
1 parent 75b8e20 commit 8e007ef

File tree

1 file changed

+56
-30
lines changed

1 file changed

+56
-30
lines changed
Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,76 @@
11
# Validate Provenance of Releases for the Replicated SDK
22

3-
This topic describes the process to perform provenance validation on the Replicated SDK.
3+
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.
44

55
## About Supply Chain Levels for Software Artifacts (SLSA)
66

7-
[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.
8-
7+
[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.
98

109
## Purpose of Attestations
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 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. This process ultimately enhances the security and assurances provided to both vendors and end customers.
1210

13-
## Prerequisite
14-
Before you perform these tasks, you must install [slsa-verifier](https://github.com/slsa-framework/slsa-verifier) and [crane](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md).
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 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.
1512

16-
## Validate the SDK SLSA Attestations
13+
The Replicated SDK build process uses Chainguard's Wolfi-based images to minimize the number of CVEs. The build process automatically generates:
14+
- SLSA provenance attestations
15+
- Image signatures
16+
- Software Bill of Materials (SBOM)
1717

18-
The Replicated SDK build process utilizes Wolfi-based images to minimize the number of CVEs. The build process automatically generates SBOMs and attestations, and then publishes the image along with these metadata components. For instance, you can find all the artifacts readily available on [DockerHub](https://hub.docker.com/r/replicated/replicated-sdk/tags). The following shell script is a tool to easily validate the SLSA attestations for a given Replicated SDK image.
18+
## Prerequisites
19+
Before performing these tasks, install the following tools:
20+
- [slsa-verifier](https://github.com/slsa-framework/slsa-verifier)
21+
- [cosign](https://github.com/sigstore/cosign)
22+
- [jq](https://stedolan.github.io/jq/)
1923

20-
```
21-
#!/bin/bash
24+
## Verify SDK Image Integrity
25+
### Using the Verification Script
26+
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
2227

23-
# This script verifies the SLSA metadata of a container image
24-
#
25-
# Requires
26-
# - slsa-verifier (https://github.com/slsa-framework/slsa-verifier)
27-
# - crane (https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md)
28-
#
28+
The verification script performs three key security checks:
29+
1. SBOM attestation verification
30+
2. SLSA Provenance verification
31+
3. Image signature verification
2932

33+
**Usage:**
34+
```bash
35+
./verify-image.sh [OPTIONS]
3036

31-
# Define the image and version to verify
32-
VERSION=v1.0.0-beta.20
33-
IMAGE=replicated/replicated-sdk:${VERSION}
37+
Required Arguments:
38+
-e, --env ENV Environment to verify (dev|stage|prod)
39+
-v, --version VER Version to verify
40+
-d, --digest DIG Image digest to verify
3441

35-
# expected source repository that should have produced the artifact, e.g. github.com/some/repo
36-
SOURCE_REPO=github.com/replicatedhq/replicated-sdk
42+
Optional Arguments:
43+
--show-sbom Show full SBOM content
44+
-h, --help Show this help message
45+
```
3746

47+
**Example:**
48+
```bash
49+
./verify-image.sh --env prod \
50+
--version 1.5.3 \
51+
--digest sha256:7cb8e0c8e0fba8e4a7157b4fcef9e7345538f7543a4e5925bb8b30c9c1375400
52+
```
3853

39-
# Use `crane` to retrieve the digest of the image without pulling the image
40-
IMAGE_WITH_DIGEST="${IMAGE}@"$(crane digest "${IMAGE}")
54+
### Verification Process
4155

42-
echo "Verifying artifact"
43-
echo "Image: ${IMAGE_WITH_DIGEST}"
44-
echo "Source Repo: ${SOURCE_REPO}"
56+
The script performs the following checks:
4557

46-
slsa-verifier verify-image "${IMAGE_WITH_DIGEST}" \
47-
--source-uri ${SOURCE_REPO} \
48-
--source-tag ${VERSION}
58+
1. **SLSA Provenance Verification**
59+
- Validates the build chain integrity
60+
- Verifies the build was performed through the secure build pipeline
61+
- Displays build details
4962

50-
```
63+
2. **Image Signature Verification**
64+
- Uses environment-specific public keys for verification
65+
- 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.
66+
67+
3. **SBOM Attestation Verification**
68+
- Validates the Software Bill of Materials
69+
- Displays SBOM details including:
70+
- Document name
71+
- Creation timestamp
72+
- Creator information
73+
- Total number of packages
74+
- Optionally shows full SBOM content with `--show-sbom` flag
75+
76+
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).

0 commit comments

Comments
 (0)