chore(ci): pin Go version from go.mod and add a govulncheck step
CI's go-version was a floating "1.26" independent of go.mod, so it could silently drift from the toolchain the project actually builds with. Switched to go-version-file: go.mod as the single source of truth, and added `task vuln` (govulncheck) plus a CI scan step -- kept out of `task check` since it needs network access to the vuln DB.
This commit is contained in:
1 parent
e76f7d5ff0
commit
d96f403d93
2 files changed
+11
-1
No files matched your search
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.26"
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
@@ -45,6 +45,11 @@ jobs:
|
||||
go build ./...
|
||||
go test ./... -count=1
|
||||
|
||||
- name: Vulnerability scan
|
||||
run: |
|
||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
govulncheck ./...
|
||||
|
||||
# The dashboard suite runs in CI too, or it only ever runs when
|
||||
# someone remembers to; the Go steps above never touch it.
|
||||
- name: Dashboard tests
|
||||
|
||||
@@ -25,6 +25,11 @@ tasks:
|
||||
cmds:
|
||||
- golangci-lint run ./...
|
||||
|
||||
vuln:
|
||||
desc: "Scan for known stdlib/dependency CVEs (govulncheck). Not part of task check: it needs network access to the vuln DB and is not build/test-blocking; run it explicitly or in CI."
|
||||
cmds:
|
||||
- govulncheck ./...
|
||||
|
||||
ui:
|
||||
desc: Build the dashboard into ui/dist (committed; the Go build embeds it)
|
||||
dir: ui
|
||||
|
||||
Reference in new issue
Block a user