Skip to content

Commit e31b112

Browse files
committed
ci(gosec): use go.mod for Go version and add manual trigger
The scheduled Gosec run silently produced 0 findings because setup-go resolved 'go-version: 1.26.x' to an older patch than go.mod requires (go 1.26.5) while GOTOOLCHAIN=local blocked a toolchain download, so the package loader failed for every package. Read the Go version from go.mod so it can never drift from the module's requirement, and add workflow_dispatch for manual runs.
1 parent ef6c9dd commit e31b112

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/gosec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Gosec
22
on:
3+
workflow_dispatch:
34
schedule:
45
# # This is meant to run every day at 8am
56
- cron: '0 8 * * 1-5'
@@ -19,7 +20,7 @@ jobs:
1920
uses: actions/checkout@v5
2021
- uses: actions/setup-go@v5
2122
with:
22-
go-version: '1.26.x'
23+
go-version-file: 'go.mod'
2324
cache: false
2425
- name: Run Gosec
2526
id: gosec-run

0 commit comments

Comments
 (0)