Add job run UUID to SARIF output
This commit is contained in:
parent
889597e41d
commit
de6fe7e20a
6 changed files with 24 additions and 2 deletions
8
lib/codeql.js
generated
8
lib/codeql.js
generated
|
|
@ -486,6 +486,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
`--sarif-codescanning-config=${getGeneratedCodeScanningConfigPath(config)}`,
|
||||
"--sarif-group-rules-by-pack",
|
||||
...(await getCodeScanningQueryHelpArguments(this)),
|
||||
...(await getJobRunUuidSarifOptions(this)),
|
||||
...getExtraOptionsFromEnv(["database", "interpret-results"]),
|
||||
];
|
||||
if (automationDetailsId !== undefined) {
|
||||
|
|
@ -906,4 +907,11 @@ function applyAutobuildAzurePipelinesTimeoutFix() {
|
|||
"-Dmaven.wagon.http.pool=false",
|
||||
].join(" ");
|
||||
}
|
||||
async function getJobRunUuidSarifOptions(codeql) {
|
||||
const jobRunUuid = process.env[environment_1.EnvVar.JOB_RUN_UUID];
|
||||
return jobRunUuid &&
|
||||
(await codeql.supportsFeature(tools_features_1.ToolsFeature.DatabaseInterpretResultsSupportsSarifRunProperty))
|
||||
? [`--sarif-run-property=jobRunUuid=${jobRunUuid}`]
|
||||
: [];
|
||||
}
|
||||
//# sourceMappingURL=codeql.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue