Skip to content

fix(ci): upload CodeQL results together - #10295

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:reubenbond-fix-codeql-configuration
Jul 21, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:reubenbond-fix-codeql-configuration

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

CodeQL's language matrix uploads results as each analysis finishes. Fast Actions and JavaScript uploads can trigger GitHub Advanced Security's pull-request evaluation before the slower C# result exists, producing a stale configuration-not-found warning.\n\nStage each language's post-processed SARIF output and upload all results together after every analysis completes. This preserves the existing per-language categories and the no-upload behavior for merge queues while ensuring GitHub evaluates a complete configuration set.

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: b03cf56f-2e40-4d40-bc2d-7e667a0d965c
Copilot AI review requested due to automatic review settings July 21, 2026 18:04
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the CodeQL GitHub Actions workflow to avoid partial SARIF uploads from the language matrix triggering premature (and stale) PR evaluations in GitHub Advanced Security. It stages each language’s SARIF output as an artifact and performs a single upload step after all matrix entries complete (while continuing to skip uploads for merge queue runs).

Changes:

  • Disable per-language SARIF uploads during the matrix run and instead stage SARIF output as artifacts.
  • Add a follow-up job which downloads all staged SARIF artifacts and uploads them together via upload-sarif.
Show a summary per file
File Description
.github/workflows/codeql.yml Stages per-language SARIF results from the CodeQL matrix and uploads them together in a dependent job to avoid incomplete PR evaluation.

Copilot's findings

Comments suppressed due to low confidence (1)

.github/workflows/codeql.yml:66

  • If the analysis matrix job is renamed to analyze, this upload-only job should use a distinct id (for example upload) and depend on analyze to keep the workflow readable.
  analyze:
    name: Upload CodeQL results
    if: github.event_name != 'merge_group'
    needs: generate
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread .github/workflows/codeql.yml Resolved
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: b03cf56f-2e40-4d40-bc2d-7e667a0d965c
Copilot AI review requested due to automatic review settings July 21, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

@ReubenBond
ReubenBond merged commit a575888 into dotnet:main Jul 21, 2026
63 checks passed
@ReubenBond
ReubenBond deleted the reubenbond-fix-codeql-configuration branch July 21, 2026 18:32
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants