Skip to content

Commit d23c979

Browse files
authored
chore: Update doc for v2.4.0 (#699)
How to LGTM this PR (I'll work on a proper doc for this in slsa-framework/slsa-github-generator#112): 1. Clone repo ``` $ git clone git@github.com:slsa-framework/slsa-verifier.git $ cd slsa-verifier $ bash verify-release.sh v2.4.0 # NOTE: use the file in _this_ PR. # Note down the path to the temporary dir use. The bash script will print its first line as "INFO: using dir: /tmp/tmp.VaYi6HfbmL" ``` 2. Run command below and compare to SHA256SUM.md in this PR ``` $sha256sum /tmp/tmp.VaYi6HfbmL/* ``` The output hash should be the hash I'm updating to in this PR. If they match, LGTM. If they don't, someone tampered with the released binary and don't LGTM --------- Signed-off-by: laurentsimon <laurentsimon@google.com>
1 parent 886eb4b commit d23c979

File tree

5 files changed

+54
-4
lines changed

5 files changed

+54
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ You have two options to install the verifier.
9797
If you want to install the verifier, you can run the following command:
9898

9999
```bash
100-
$ go install github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier@v2.3.0
100+
$ go install github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier@v2.4.0
101101
$ slsa-verifier <options>
102102
```
103103

@@ -143,7 +143,7 @@ $ go install github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier
143143

144144
```bash
145145
$ git clone git@github.com:slsa-framework/slsa-verifier.git
146-
$ cd slsa-verifier && git checkout v2.3.0
146+
$ cd slsa-verifier && git checkout v2.4.0
147147
$ go run ./cli/slsa-verifier <options>
148148
```
149149

@@ -153,7 +153,7 @@ If you need to install the verifier to run in a GitHub workflow, use the install
153153

154154
### Download the binary
155155

156-
Download the binary from the latest release at [https://github.com/slsa-framework/slsa-verifier/releases/tag/v2.3.0](https://github.com/slsa-framework/slsa-verifier/releases/tag/v2.3.0)
156+
Download the binary from the latest release at [https://github.com/slsa-framework/slsa-verifier/releases/tag/v2.4.0](https://github.com/slsa-framework/slsa-verifier/releases/tag/v2.4.0)
157157

158158
Download the [SHA256SUM.md](https://github.com/slsa-framework/slsa-verifier/blob/main/SHA256SUM.md).
159159

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Follow the steps:
8383
$ git clone git@github.com:slsa-framework/slsa-verifier.git
8484
$ cd slsa-verifier
8585
# $ (Optional: git checkout tags/v1.1.1: you may need to change the command below)
86+
# You can run `bash verify-release.sh vX.Y.Z`: it will download all artifacts and verify them.
8687
$ go run ./cli/slsa-verifier verify-artifact ~/Downloads/slsa-verifier-linux-amd64 --provenance-path ~/Downloads/slsa-verifier-linux-amd64.intoto.jsonl --source-uri github.com/slsa-framework/slsa-verifier --source-tag vX.Y.Z
8788
```
8889

SHA256SUM.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
### [v2.4.0](https://github.com/slsa-framework/slsa-verifier/releases/tag/v2.4.0)
2+
3+
9e67318937b936014b6127affc14bc45f1fb10d9899b0105877778e8179b3029 slsa-verifier-darwin-amd64
4+
b55009be65f8f6dae4399522e4ab5685a5cfe0b72dca3134f12ba144b8860607 slsa-verifier-darwin-arm64
5+
9883e4c7fd0fead95815de1533db62d1ae19daf9d333b359e192fc65ffb401b2 slsa-verifier-linux-amd64
6+
bb025462acd9e93da32694e3ed82bfa57cb487a28c989a083caf2a3569d3cfbe slsa-verifier-linux-arm64
7+
a8ea35a4abf450f3828d42cf0b9be3628692508184bec8610a472a7bf4afc843 slsa-verifier-windows-amd64.exe
8+
b14cd8228fecabe53e3676ec2d94b53d7aee11f6f5a8dabbe07e840143d48e8d slsa-verifier-windows-arm64.exe
9+
110
### [v2.3.0](https://github.com/slsa-framework/slsa-verifier/releases/tag/v2.3.0)
211

312
44ae609925c2dddafa45b2f98da62b40abcf739bbbe6f9dc792f3aba6e236e9c slsa-verifier-darwin-amd64

actions/installer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For more information about SLSA in general, see [https://slsa.dev](https://slsa.
1111
To install a specific version of `slsa-verifier`, use:
1212

1313
```yaml
14-
uses: slsa-framework/slsa-verifier/actions/installer@v2.3.0
14+
uses: slsa-framework/slsa-verifier/actions/installer@v2.4.0
1515
```
1616
1717
See https://github.com/slsa-framework/slsa-verifier/releases for the list of available `slsa-verifier` releases. Only versions greater or equal to 2.0.1 are supported.

verify-release.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if [ "$#" -ne 1 ]; then
6+
echo "Usage: $0 tag"
7+
exit 1
8+
fi
9+
10+
# Verify GH_TOKEN is set.
11+
if [[ -z "${GH_TOKEN:-}" ]]; then
12+
echo "GH_TOKEN is unset"
13+
exit 1
14+
fi
15+
16+
# Set the gh CLI.
17+
if [[ -z "${GH:-}" ]]; then
18+
GH="gh"
19+
fi
20+
21+
dir=$(mktemp -d)
22+
tag="$1"
23+
24+
mkdir -p "${dir}"
25+
rm -rf "${dir:?}/"* 2>/dev/null || true
26+
27+
echo "INFO: using dir: ${dir}"
28+
echo
29+
30+
# Download artifacts and provenance.
31+
cd "${dir}"
32+
"${GH}" release -R slsa-framework/slsa-verifier download "${tag}"
33+
cd -
34+
35+
for file in "${dir}"/*; do
36+
if [[ "${file}" == *".intoto.jsonl" ]]; then
37+
continue
38+
fi
39+
go run ./cli/slsa-verifier verify-artifact "${file}" --provenance-path "${file}".intoto.jsonl --source-uri github.com/slsa-framework/slsa-verifier --source-tag "${tag}"
40+
done

0 commit comments

Comments
 (0)