mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 14:50:21 +00:00
Always merge SARIF files in analyze action
This commit is contained in:
Generated
+4
-1
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InvalidSarifUploadError = exports.validateUniqueCategory = exports.waitForProcessing = exports.buildPayload = exports.validateSarifFileSchema = exports.uploadFromActions = exports.findSarifFilesInDir = exports.populateRunAutomationDetails = void 0;
|
||||
exports.InvalidSarifUploadError = exports.validateUniqueCategory = exports.waitForProcessing = exports.buildPayload = exports.validateSarifFileSchema = exports.getSarifFilePaths = exports.uploadFromActions = exports.findSarifFilesInDir = exports.populateRunAutomationDetails = exports.combineSarifFilesUsingCLI = exports.combineSarifFiles = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const zlib_1 = __importDefault(require("zlib"));
|
||||
@@ -69,6 +69,7 @@ function combineSarifFiles(sarifFiles) {
|
||||
}
|
||||
return combinedSarif;
|
||||
}
|
||||
exports.combineSarifFiles = combineSarifFiles;
|
||||
/**
|
||||
* Checks whether all the runs in the given SARIF files were produced by CodeQL.
|
||||
* @param sarifFiles The list of SARIF files to check.
|
||||
@@ -127,6 +128,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
});
|
||||
return JSON.parse(fs.readFileSync(outputFile, "utf8"));
|
||||
}
|
||||
exports.combineSarifFilesUsingCLI = combineSarifFilesUsingCLI;
|
||||
// Populates the run.automationDetails.id field using the analysis_key and environment
|
||||
// and return an updated sarif file contents.
|
||||
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
|
||||
@@ -237,6 +239,7 @@ function getSarifFilePaths(sarifPath) {
|
||||
}
|
||||
return sarifFiles;
|
||||
}
|
||||
exports.getSarifFilePaths = getSarifFilePaths;
|
||||
// Counts the number of results in the given SARIF file
|
||||
function countResultsInSarif(sarif) {
|
||||
let numResults = 0;
|
||||
|
||||
Reference in New Issue
Block a user