Skip to content

Commit 263b518

Browse files
authored
Merge pull request #42996 from saschagrunert/sbom-verification
Add SBOM verification to docs
2 parents d349068 + 68370ff commit 263b518

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

content/en/docs/tasks/administer-cluster/verify-signed-artifacts.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,32 @@ Here are some helpful resources to get started with `policy-controller`:
116116

117117
- [Installation](https://github.com/sigstore/helm-charts/tree/main/charts/policy-controller)
118118
- [Configuration Options](https://github.com/sigstore/policy-controller/tree/main/config)
119+
120+
## Verify the Software Bill Of Materials
121+
122+
You can verify the Kubernetes Software Bill of Materials (SBOM) by using the
123+
sigstore certificate and signature, or the corresponding SHA files:
124+
125+
```shell
126+
# Retrieve the latest available Kubernetes release version
127+
VERSION=$(curl -Ls https://dl.k8s.io/release/stable.txt)
128+
129+
# Verify the SHA512 sum
130+
curl -Ls "https://sbom.k8s.io/$VERSION/release" -o "$VERSION.spdx"
131+
echo "$(curl -Ls "https://sbom.k8s.io/$VERSION/release.sha512") $VERSION.spdx" | sha512sum --check
132+
133+
# Verify the SHA256 sum
134+
echo "$(curl -Ls "https://sbom.k8s.io/$VERSION/release.sha256") $VERSION.spdx" | sha256sum --check
135+
136+
# Retrieve sigstore signature and certificate
137+
curl -Ls "https://sbom.k8s.io/$VERSION/release.sig" -o "$VERSION.spdx.sig"
138+
curl -Ls "https://sbom.k8s.io/$VERSION/release.cert" -o "$VERSION.spdx.cert"
139+
140+
# Verify the sigstore signature
141+
cosign verify-blob \
142+
--certificate "$VERSION.spdx.cert" \
143+
--signature "$VERSION.spdx.sig" \
144+
--certificate-identity [email protected] \
145+
--certificate-oidc-issuer https://accounts.google.com \
146+
"$VERSION.spdx"
147+
```

0 commit comments

Comments
 (0)