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:
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.
github/codeql-action
doesn't work well if thego
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:
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
.