Dump soon to be uploaded SARIF on request

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.
This commit is contained in:
Paolo Tranquilli
2025-09-10 07:46:05 +02:00
parent 31d3ae847e
commit dae3742b0a
6 changed files with 112 additions and 0 deletions

View File

@@ -119,4 +119,10 @@ export enum EnvVar {
* Whether to enable experimental extractors for CodeQL.
*/
EXPERIMENTAL_FEATURES = "CODEQL_ENABLE_EXPERIMENTAL_FEATURES",
/**
* Whether and where to dump the processed SARIF file that would be uploaded, regardless of
* whether the upload is disabled. This is intended for testing and debugging purposes.
*/
SARIF_DUMP_DIR = "CODEQL_ACTION_SARIF_DUMP_DIR",
}