Skip to content

Commit

Permalink
Add Cosign signing key
Browse files Browse the repository at this point in the history
  • Loading branch information
samhclark committed Oct 19, 2024
1 parent 9569a7d commit b5fb995
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG silverblue_version=40
FROM quay.io/fedora-ostree-desktops/silverblue:${silverblue_version}

COPY cosign.pub /etc/pki/cosign/cosign.pub
COPY overlay-root/etc/ /etc/

RUN mkdir -p /var/opt \
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,30 @@ When things start breaking eventually, get the new key with:
```
wget -O overlay-root/etc/pki/rpm-gpg/google-linux-public-key.asc https://dl.google.com/linux/linux_signing_key.pub
```

## Cosign Signing Keys

The resulting container images are signed by Cosign.
The keys were generated with the following command:

```
$ GITHUB_TOKEN="$(gh auth token)" COSIGN_PASSWORD="$(head -c 33 /dev/urandom | base64)" cosign generate-key-pair github://samhclark/custom-silverblue --output-file cosign.pub
Password written to COSIGN_PASSWORD github actions secret
Private key written to COSIGN_PRIVATE_KEY github actions secret
Public key written to COSIGN_PUBLIC_KEY github actions secret
Public key also written to cosign.pub
```

The key is included in the image at `/etc/pki/cosign/cosign.pub`.
You can also download the key with:

```
wget https://raw.githubusercontent.com/samhclark/custom-silverblue/refs/heads/main/cosign.pub
```

The SHA-256 checksum of the key that I originally created on October 18, 2024 is

```
$ sha256sum cosign.pub
55e391488bbbfe28209e09963edf38a612e306572b2dd72bbcc97402690ff000 cosign.pub
```
4 changes: 4 additions & 0 deletions cosign.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeZFHiaCiaiJrPkLbyjpTKF9KFFex
7o2M7HBLHUDHIdFIKVMkb1IOybx1bGrzdjUJ336Gh5Y5MRaSJhydIWsUww==
-----END PUBLIC KEY-----

0 comments on commit b5fb995

Please sign in to comment.