Skip to content

Commit 6f96e48

Browse files
Pin go-licenses to v2.0.1 for reproducible builds
Fixes code scanning alerts #10 and #11 by removing the @latest version for local development and using the pinned v2.0.1 version consistently across all environments. This ensures deterministic builds and addresses the CWE-494 'Download of Code Without Integrity Check' security concern.
1 parent e81f120 commit 6f96e48

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

script/licenses

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@
1818
# depending on the license.
1919
set -e
2020

21-
# Pinned version for CI reproducibility, latest for local development
21+
# Pinned version for reproducibility
2222
# See: https://github.com/cli/cli/pull/11161
23-
if [ "$CI" = "true" ]; then
24-
go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e # v2.0.1
25-
else
26-
go install github.com/google/go-licenses@latest
27-
fi
23+
go install github.com/google/go-licenses/v2@v2.0.1
2824

2925
# actions/setup-go does not setup the installed toolchain to be preferred over the system install,
3026
# which causes go-licenses to raise "Package ... does not have module info" errors in CI.

0 commit comments

Comments
 (0)