mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 14:40:10 +08:00
Add job run UUID to SARIF output
This commit is contained in:
@@ -870,6 +870,7 @@ export async function getCodeQLForCmd(
|
||||
)}`,
|
||||
"--sarif-group-rules-by-pack",
|
||||
...(await getCodeScanningQueryHelpArguments(this)),
|
||||
...(await getJobRunUuidSarifOptions(this)),
|
||||
...getExtraOptionsFromEnv(["database", "interpret-results"]),
|
||||
];
|
||||
if (automationDetailsId !== undefined) {
|
||||
@@ -1423,3 +1424,14 @@ function applyAutobuildAzurePipelinesTimeoutFix() {
|
||||
"-Dmaven.wagon.http.pool=false",
|
||||
].join(" ");
|
||||
}
|
||||
|
||||
async function getJobRunUuidSarifOptions(codeql: CodeQL) {
|
||||
const jobRunUuid = process.env[EnvVar.JOB_RUN_UUID];
|
||||
|
||||
return jobRunUuid &&
|
||||
(await codeql.supportsFeature(
|
||||
ToolsFeature.DatabaseInterpretResultsSupportsSarifRunProperty,
|
||||
))
|
||||
? [`--sarif-run-property=jobRunUuid=${jobRunUuid}`]
|
||||
: [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user