microsoft / go

The Microsoft build of the Go toolset
BSD 3-Clause "New" or "Revised" License
287 stars 28 forks source link

Run GitHub codeql workflow only for eng/_utils #1329

Closed qmuntal closed 1 month ago

qmuntal commented 2 months ago

github/codeql-action doesn't work well if the go binary is replaced during the build command, and that's exactly what happens when building the Go toolchain. See https://github.com/github/codeql/issues/17526 for more info.

This PR reduces the scope of the GitHub codeql workflow to only run for eng/_utils to avoid the issue. This folder contains all the code that is really not part of the Microsoft Go toolchain but is used to build the toolchain itself. The Go toolchain will still be analyzed when running the CI in Azure Pipelines, as 1ES is tightly integrated with CodeQL.

In fact, the GitHub CodeQL workflow was not doing that much. This is the report from its last successful run:

image

It only analyzed 3 files from the thousands of files that take part in the Go toolchain compilation, and all of them where from eng/_utils.

qmuntal commented 2 months ago

This run analyzed more files that the last run in main 😄

image