Skip to content

Commit 8462a64

Browse files
jongioCopilot
andcommitted
fix(ci): pin Go dev tool versions to prevent supply chain attacks
Pin gofumpt, deadcode, mage, and govulncheck to specific versions instead of using @latest. This ensures CI builds are reproducible and prevents a compromised upstream from injecting malicious code. Pinned versions: - gofumpt v0.10.0 - deadcode v0.45.0 (golang.org/x/tools) - mage v1.17.2 - govulncheck v1.3.0 Closes #74 Co-authored-by: Copilot <[email protected]>
1 parent ca56f12 commit 8462a64

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
5656
- name: Check strict formatting (gofumpt)
5757
run: |
58-
go install mvdan.cc/gofumpt@latest || { echo "gofumpt install failed, skipping"; exit 0; }
58+
go install mvdan.cc/gofumpt@v0.10.0 || { echo "gofumpt install failed, skipping"; exit 0; }
5959
unformatted=$(gofumpt -l .)
6060
if [ -n "$unformatted" ]; then
6161
echo "::error::Files need strict formatting (gofumpt):"
@@ -65,8 +65,8 @@ jobs:
6565
6666
- name: Check dead code
6767
run: |
68-
go install golang.org/x/tools/cmd/deadcode@latest || { echo "deadcode install failed, skipping"; exit 0; }
69-
go install github.com/magefile/mage@latest || { echo "mage install failed, skipping"; exit 0; }
68+
go install golang.org/x/tools/cmd/deadcode@v0.45.0 || { echo "deadcode install failed, skipping"; exit 0; }
69+
go install github.com/magefile/mage@v1.17.2 || { echo "mage install failed, skipping"; exit 0; }
7070
mage deadcode
7171
7272
- run: go build ./cmd/dispatch/
@@ -88,7 +88,7 @@ jobs:
8888

8989
- name: govulncheck
9090
run: |
91-
go install golang.org/x/vuln/cmd/govulncheck@latest
91+
go install golang.org/x/vuln/cmd/govulncheck@v1.3.0
9292
govulncheck ./...
9393
9494
# Verify the binary compiles for all release platforms.

0 commit comments

Comments
 (0)