mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Ignore non-string values in populateRunAutomationDetails
This commit is contained in:
9
lib/upload-lib.js
generated
9
lib/upload-lib.js
generated
@@ -55,7 +55,14 @@ function populateRunAutomationDetails(sarifContents, analysis_key, environment)
|
||||
if (environment !== undefined && environment !== "null") {
|
||||
const environmentObject = JSON.parse(environment);
|
||||
for (const entry of Object.entries(environmentObject).sort()) {
|
||||
automationID += `${entry[0]}:${entry[1]}/`;
|
||||
if (typeof entry[1] === "string") {
|
||||
automationID += `${entry[0]}:${entry[1]}/`;
|
||||
}
|
||||
else {
|
||||
// In code scanning we just handle the string values,
|
||||
// the rest get converted to the empty string
|
||||
automationID += `${entry[0]}:/`;
|
||||
}
|
||||
}
|
||||
}
|
||||
const sarif = JSON.parse(sarifContents);
|
||||
|
||||
Reference in New Issue
Block a user