@@ -27,35 +27,43 @@ It will:
2727
2828## Verifying
2929
30+ ``` bash
31+ export VERSION=" $( gh release list -L 1 -R goreleaser/example-secure --json=tagName -q ' .[] | .tagName' ) "
32+ ```
33+
3034### Checksums
3135
3236``` shell
33- wget https://github.com/goreleaser/example-secure/releases/download/v0.0.4 /checksums.txt
37+ wget https://github.com/goreleaser/example-secure/releases/download/$VERSION /checksums.txt
3438cosign verify-blob \
35- --certificate-identity ' https://github.com/goreleaser/example-secure/.github/workflows/release.yml@refs/tags/v0.0.4 ' \
39+ --certificate-identity ' https://github.com/goreleaser/example-secure/.github/workflows/release.yml@refs/tags/$VERSION ' \
3640 --certificate-oidc-issuer ' https://token.actions.githubusercontent.com' \
37- --cert https://github.com/goreleaser/example-secure/releases/download/v0.0.4 /checksums.txt.pem \
38- --signature https://github.com/goreleaser/example-secure/releases/download/v0.0.4 /checksums.txt.sig \
41+ --cert https://github.com/goreleaser/example-secure/releases/download/$VERSION /checksums.txt.pem \
42+ --signature https://github.com/goreleaser/example-secure/releases/download/$VERSION /checksums.txt.sig \
3943 ./checksums.txt
4044```
4145
4246You can then download any file you want from the release, and verify it with, for example:
4347
4448``` shell
45- wget https://github.com/goreleaser/example-secure/releases/download/v0.0.4/example_0.0.4_linux_amd64 .tar.gz
49+ wget https://github.com/goreleaser/example-secure/releases/download/$VERSION /example_linux_amd64 .tar.gz
4650sha256sum --ignore-missing -c checksums.txt
4751```
4852
4953And both should say "OK".
5054
5155### SBOMs
5256
53- You can then inspect the ` .sbom ` file to see the entire dependency tree of the binary, check for vulnerable dependencies and whatnot:
57+ You can then inspect the ` .sbom ` file to see the entire dependency tree of the
58+ binary, check for vulnerable dependencies and whatnot.
59+
60+ To get the SBOM of an artifact, you can use the same download URL, adding
61+ ` .sbom.json ` to the end of the URL:
5462
5563``` shell
56- wget https://github.com/goreleaser/example-secure/releases/download/v0.0.4/example_0.0.4_linux_amd64 .tar.gz.sbom.json
64+ wget https://github.com/goreleaser/example-secure/releases/download/$VERSION /example_linux_amd64 .tar.gz.sbom.json
5765sha256sum --ignore-missing -c checksums.txt
58- grype sbom:example_0.0.4_linux_amd64 .tar.gz.sbom.json
66+ grype sbom:example_linux_amd64 .tar.gz.sbom.json
5967```
6068
6169### Attestations
@@ -64,20 +72,24 @@ This example also publishes build attestations.
6472You can verify any artifact with:
6573
6674``` shell
67- gh attestation verify --owner goreleaser * .tar.gz
75+ gh attestation verify \
76+ --owner goreleaser \
77+ * .tar.gz
6878```
6979
7080### Docker image
7181
7282``` shell
7383cosign verify \
74- --certificate-identity ' https://github.com/goreleaser/example-secure/.github/workflows/release.yml@refs/tags/v0.0.4 ' \
84+ --certificate-identity ' https://github.com/goreleaser/example-secure/.github/workflows/release.yml@refs/tags/$VERSION ' \
7585 --certificate-oidc-issuer ' https://token.actions.githubusercontent.com' \
76- ghcr.io/goreleaser/example-secure:v0.0.4
86+ ghcr.io/goreleaser/example-secure:$VERSION
7787```
7888
7989The images are also attested:
8090
8191``` shell
82- gh attestation verify --owner goreleaser oci://ghcr.io/goreleaser/example-secure:v0.0.4
92+ gh attestation verify \
93+ --owner goreleaser \
94+ oci://ghcr.io/goreleaser/example-secure:$VERSION
8395```
0 commit comments