Created
December 1, 2022 14:13
-
-
Save saschagrunert/76558f6787b7c848fbd52c11119d68d8 to your computer and use it in GitHub Desktop.
Verifying Kubernetes binary artifacts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euox pipefail | |
TAG=v1.26.0-rc.1 | |
URL=https://dl.k8s.io/release/$TAG/bin/linux/amd64 | |
BIN=kubectl | |
for EXT in "" .sig .cert; do | |
FILE=$BIN$EXT | |
curl -sSfL --retry 3 --retry-delay 3 $URL/$FILE -o $FILE | |
done | |
COSIGN_EXPERIMENTAL=1 cosign verify-blob $BIN --signature $BIN.sig --certificate $BIN.cert |
you also can do
$ COSIGN_EXPERIMENTAL=1 cosign verify-blob kubectl --signature https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl.sig --certificate https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl.cert
tlog entry verified with uuid: 5d54b39222e3fa9a21bcb0badd8aac939b4b0d1d9085b37f1f10b18a8cd24657 index: 8173886
Verified OK
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output