Skip to content

Commit 824841b

Browse files
committed
Add documentation on fetching Knative supply-chain security attestations
1 parent 2d54a1c commit 824841b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

config/nav.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ nav:
4848
- About metrics: admin/collecting-metrics/README.md
4949
- Knative Eventing metrics: admin/collecting-metrics/eventing-metrics/metrics.md
5050
- Knative Serving metrics: admin/collecting-metrics/serving-metrics/metrics.md
51+
- Security:
52+
- Verifying Knative images: admin/security/verifying-images.md
5153
- Uninstalling Knative: admin/install/uninstall.md
5254
# Serving config
5355
- Knative Serving configuration:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Verifying Knative Images
2+
3+
Knative publishes SBOMs and SLSA provenance documents for each image in the Knative release. You can configure
4+
5+
## Knative SLSA Provenance (signed)
6+
7+
The Knative build process produces a SLSA [in-toto](https://in-toto.io/) attestation for each image in the build process. For a given image in the Knative release manifests, you can verify the build attestation using the following:
8+
9+
```bash
10+
cosign verify-attestation \
11+
--certificate-oidc-issuer https://accounts.google.com \
12+
--certificate-identity signer@knative-releases.iam.gserviceaccount.com \
13+
--type slsaprovenance02 \
14+
$IMAGE
15+
```
16+
17+
Note that the in-toto document is base64 encoded in the `.payload` attribute of the attestation; you can use `jq` to extract this with the following invocation:
18+
19+
```bash
20+
cosign verify-attestation \
21+
--certificate-oidc-issuer https://accounts.google.com \
22+
--certificate-identity signer@knative-releases.iam.gserviceaccount.com \
23+
--type slsaprovenance02 \
24+
$IMAGE | jq -r .payload | base64 --decode | jq
25+
```
26+
27+
## Knative SBOMs
28+
29+
For each container image, Knative publishes an SBOM corresponding to each image. These SBOMs are produced during compilation by the [`ko` tool](https://ko.build/), and can be downloaded using the `cosign download sbom` command. Note that the image references in the Knative manifests are to multi-architecture images; to extract the software components for a particular architecture (as different architectures may build with different libraries), you will need to run `cosign download sbom` on the architecture-specific image (e.g. for `linux/amd64`).

0 commit comments

Comments
 (0)