Skip to content

Switch C# CodeQL analysis to autobuild mode#22

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/improve-codeql-analysis-quality
Draft

Switch C# CodeQL analysis to autobuild mode#22
Copilot wants to merge 1 commit intomainfrom
copilot/improve-codeql-analysis-quality

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

Summary

Improves C# CodeQL analysis quality by switching from build-mode: none to build-mode: autobuild in the analyze-dotnet job.

Changes

  • Added actions/setup-dotnet@v5 (dotnet-version: 10.0) to the analyze-dotnet job so autobuild has the right SDK to compile the file-based .cs samples
  • Changed build-mode: nonebuild-mode: autobuild for the C# CodeQL job

Why

For compiled languages like C#, build-mode: none uses compilation-independent extraction which yields lower analysis quality. autobuild compiles the code and extracts type/flow information from the compilation, enabling CodeQL to produce more accurate and complete results. This mirrors the approach already used for the Go job (build-mode: autobuild).

Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants