Repository navigation
Run CodeQL across repository Go modules - #2579
George Adams (gdams) with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: gdams <20224954+gdams@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
The default build excludes the production Linux crypto backend implementations from analysis.
1 open finding
What changed in this PR
Expands CodeQL analysis beyond eng/_util to Go modules throughout the repository.
Changes:
- Replaces autobuild with module discovery and explicit
go build ./...calls. - Excludes the upstream
gosubmodule.
| File | Description |
|---|---|
.github/workflows/codeql.yml |
Builds discovered repository Go modules for CodeQL analysis. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: gdams <20224954+gdams@users.noreply.github.com>
|
This PR touches the GitHub side CodeQL. What about AzDO side? |
is there a requirement which says we need to run CodeQL on both sides? |
|
Requirements don't typically take into account the mirroring process, so I doubt it's cut and dry what they say. Practically it's about s360 alerts I suppose. If we don't need to run both sides, we should remove the other side, which we currently have not. |
…un-codeql-on-all-go-code
|
I was able to significantly simply this by essentially stripping the go submodule from the working directory and running the default CodeQL autobuild. |

CodeQL only analyzed
eng/_util, leaving production code such ascryptobackendunscanned. Expand analysis to all repository Go modules while excluding the upstreamgosubmodule.eng/_util-only autobuild with module discovery viago.mod.go build ./...../go/*.find . -name go.mod -not -path './go/*' -print0