Skip to content

Commit 12679b9

Browse files
authored
Sign images using Cosign v2 (#1176)
Signed-off-by: Alejandro Moreno <[email protected]>
1 parent c9aebd7 commit 12679b9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/ci.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,13 @@ jobs:
128128
uses: actions/[email protected]
129129

130130
- name: Install Cosign
131-
uses: sigstore/cosign-installer@v2.7.0
131+
uses: sigstore/cosign-installer@v3.0.2
132132

133133
- name: Distroless verify
134134
run: |
135135
diff <(grep FROM docker/kubeseal.Dockerfile | awk '{print $2}') \
136136
<(grep FROM docker/controller.Dockerfile | awk '{print $2}')
137-
cosign verify --key /dev/stdin "$(grep FROM docker/controller.Dockerfile | awk '{print $2}')" <<EOF
138-
-----BEGIN PUBLIC KEY-----
139-
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZzVzkb8A+DbgDpaJId/bOmV8n7Q
140-
OqxYbK0Iro6GzSmOzxkn+N2AKawLyXi84WSwJQBK//psATakCgAQKkNTAA==
141-
-----END PUBLIC KEY-----
142-
EOF
137+
cosign verify "$(grep FROM docker/controller.Dockerfile | awk '{print $2}')" --certificate-oidc-issuer https://accounts.google.com --certificate-identity [email protected]
143138
144139
- name: Setup kubecfg
145140
run: |

.github/workflows/release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
# Setup Cosign
6262
- name: Install Cosign
63-
uses: sigstore/cosign-installer@v2.7.0
63+
uses: sigstore/cosign-installer@v3.0.2
6464
- name: Write Cosign key
6565
run: echo "$COSIGN_KEY" > /tmp/cosign.key
6666
env:
@@ -134,7 +134,7 @@ jobs:
134134
tags: ${{ steps.meta_kubeseal.outputs.tags }}
135135
- name: Sign controller image with a key in GHCR
136136
run: |
137-
echo -n "$COSIGN_PASSWORD" | cosign sign --key /tmp/cosign.key $TAG_CURRENT
137+
echo -n "$COSIGN_PASSWORD" | cosign sign --key /tmp/cosign.key --yes $TAG_CURRENT
138138
env:
139139
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
140140
TAG_CURRENT: ${{ steps.meta_controller.outputs.tags }}

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,8 @@ kubeseal <mysecret.json >mysealedsecret.json
716716

717717
Our images are being signed using [cosign](https://github.com/sigstore/cosign). The signatures have been saved in our [GitHub Container Registry](https://ghcr.io/bitnami-labs/sealed-secrets-controller/signs).
718718

719+
> Images up to and including v0.20.2 were signed using Cosign v1. Newer images are signed with Cosign v2.
720+
719721
It is pretty simple to verify the images:
720722

721723
```bash

0 commit comments

Comments
 (0)