Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit a92cd68

Browse files
committed
Fixed verification of signature for sbom-operator
1 parent 9f66c92 commit a92cd68

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/sbom-operator/Dockerfile.template

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,23 @@ COPY --link --from=cosign / /
99
ARG name
1010
ARG version
1111
RUN <<EOF
12+
echo "### Downloading sbom-operator ${version}"
1213
curl --silent --location --fail --remote-name "https://github.com/ckotzbauer/sbom-operator/releases/download/${version}/sbom-operator_${version}_linux_${alt_arch}.tar.gz"
14+
15+
echo "### Downloading signature and certificate"
1316
curl --silent --location --fail --remote-name "https://github.com/ckotzbauer/sbom-operator/releases/download/${version}/sbom-operator_${version}_linux_${alt_arch}.tar.gz.sig"
1417
curl --silent --location --fail --remote-name "https://github.com/ckotzbauer/sbom-operator/releases/download/${version}/sbom-operator_${version}_linux_${alt_arch}.tar.gz.pem"
1518

19+
SHA="$(
20+
git ls-remote --tags https://github.com/ckotzbauer/sbom-operator "${version}" \
21+
| cut -f1
22+
)"
23+
echo "### Verifying signature for SHA ${SHA}"
1624
COSIGN_EXPERIMENTAL=1 cosign verify-blob "sbom-operator_${version}_linux_${alt_arch}.tar.gz" \
1725
--certificate "sbom-operator_${version}_linux_${alt_arch}.tar.gz.pem" \
1826
--signature "sbom-operator_${version}_linux_${alt_arch}.tar.gz.sig" \
1927
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
20-
--certificate-identity https://github.com/ckotzbauer/actions-toolkit/.github/workflows/toolkit-release-goreleaser.yml@refs/tags/0.25.0 \
28+
--certificate-identity https://github.com/ckotzbauer/actions-toolkit/.github/workflows/toolkit-release-goreleaser.yml@refs/tags/0.31.0 \
2129
--certificate-github-workflow-repository ckotzbauer/sbom-operator \
2230
--certificate-github-workflow-name create-release \
2331
--certificate-github-workflow-ref refs/heads/main \

0 commit comments

Comments
 (0)