Skip to content

Commit bfb630e

Browse files
committed
Add explict build instructions for codeQL
1 parent 46a339a commit bfb630e

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,31 @@ jobs:
3232
steps:
3333
- name: Checkout repository
3434
uses: actions/checkout@v6
35+
3536
# Initializes the CodeQL tools for scanning.
3637
- name: Initialize CodeQL
3738
uses: github/codeql-action/init@v4
3839
with:
3940
languages: go
4041
build-mode: manual
42+
4143
- name: Install Taskfile support
4244
uses: arduino/setup-task@v2
43-
- shell: bash
44-
run: task build
45+
46+
- name: Build
47+
shell: bash
48+
env:
49+
# Prevent Go toolchain re-exec which breaks CodeQL tracing.
50+
# When GOTOOLCHAIN is not "local", Go may re-exec to a different
51+
# toolchain version, bypassing CodeQL's instrumented go binary.
52+
GOTOOLCHAIN: local
53+
run: |
54+
echo "CODEQL go: $CODEQL_ACTION_GO_BINARY"
55+
echo "which go (before task): $(which go)"
56+
go version
57+
go env GOTOOLCHAIN GOROOT GOPATH
58+
task build
59+
4560
- name: Perform CodeQL Analysis
4661
uses: github/codeql-action/analyze@v4
4762
with:

0 commit comments

Comments
 (0)