Skip to content

Commit 991b5d3

Browse files
committed
ci(gosec): let gosec container fetch required Go toolchain
1 parent 2eed8ef commit 991b5d3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/gosec.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ jobs:
1818
steps:
1919
- name: Checkout Source
2020
uses: actions/checkout@v5
21-
- uses: actions/setup-go@v5
22-
with:
23-
go-version-file: 'go.mod'
24-
cache: false
2521
- name: Run Gosec
2622
id: gosec-run
2723
continue-on-error: true
2824
uses: securego/gosec@master # zizmor: ignore[unpinned-uses]
25+
env:
26+
# gosec runs in its own container with a bundled Go and
27+
# GOTOOLCHAIN=local; allow it to fetch the toolchain go.mod
28+
# requires, otherwise it loads 0 packages and scans nothing.
29+
GOTOOLCHAIN: auto
2930
with:
3031
args: '-exclude=G104,G115,G304,G406,G507 -exclude-dir=builtin/gen ./...'
3132

0 commit comments

Comments
 (0)