Skip to content

Conversation

redsun82
Copy link
Contributor

This introduces a new internal environment variable flag (CODEQL_ACTION_SARIF_DUMP_DIR) that, when set to true, causes the SARIF file that will be uploaded to be dumped to the specified directory. The filename will be upload.sarif or upload.quality.sarif depending on the upload target.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

This introduces a new internal environment variable flag
(`CODEQL_ACTION_SARIF_DUMP_DIR`) that, when set to `true`, causes the
SARIF file that will be uploaded to be dumped to the specified
directory. The filename will be `upload.sarif` or `upload.quality.sarif`
depending on the upload target.
@redsun82 redsun82 requested a review from mbg September 10, 2025 05:48
@redsun82 redsun82 requested a review from a team as a code owner September 10, 2025 05:48
@Copilot Copilot AI review requested due to automatic review settings September 10, 2025 05:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new internal environment variable flag that enables dumping the processed SARIF file to a specified directory before upload for testing and debugging purposes.

  • Adds CODEQL_ACTION_SARIF_DUMP_DIR environment variable to control SARIF dumping
  • Implements dumpSarifFile function to write processed SARIF content to disk
  • Integrates SARIF dumping into the upload workflow with appropriate file naming

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
src/environment.ts Adds new environment variable constant for SARIF dump directory
src/upload-lib.ts Implements SARIF dumping functionality and integrates it into upload process

@redsun82 redsun82 merged commit eb50a88 into main Sep 10, 2025
290 checks passed
@redsun82 redsun82 deleted the redsun82/only-dump-sarif branch September 10, 2025 10:07
Copy link
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

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

It seems that I can't approve anymore now that the PR is merged, but consider this my approval on this PR as well :)

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.

3 participants