File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Attestations
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ verify-attestations :
15+ name : Verify attestation signatures
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Import builder keys
22+ run : gpg --import builder-keys/*.gpg
23+
24+ - name : Verify attestations
25+ run : ./asmap-verify
26+
27+ verify-shasums :
28+ name : Verify attested hashes match committed files
29+ runs-on : ubuntu-latest
30+ steps :
31+ - name : Checkout code
32+ uses : actions/checkout@v4
33+
34+ - name : Check committed ASMap files against attested SHA256SUMS
35+ run : |
36+ set -euo pipefail
37+ shopt -s nullglob
38+
39+ manifests=( attestations/*/*/*/SHA256SUMS )
40+ if (( ${#manifests[@]} == 0 )); then
41+ echo "Error: No SHA256SUMS manifests found under attestations/."
42+ exit 1
43+ fi
44+
45+ failure=0
46+ for manifest in "${manifests[@]}"; do
47+ year="$(cut -d/ -f2 <<< "$manifest")"
48+ echo "==> ${manifest}"
49+
50+ if ! grep -E '\.dat$' "$manifest" \
51+ | (cd "$year" && sha256sum --check --strict); then
52+ failure=1
53+ fi
54+ echo ""
55+ done
56+
57+ if (( failure )); then
58+ echo "FAIL: One or more committed ASMap files are missing or do not match their attested hashes."
59+ exit 1
60+ fi
61+
62+ echo "OK: All committed ASMap files match their attested hashes."
You can’t perform that action at this time.
0 commit comments