mirror of
https://github.com/github/codeql-action.git
synced 2025-12-15 03:49:11 +08:00
Compare commits
1 Commits
codeql-bun
...
esbena/deb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28e47ba26d |
7
lib/analyze-action.js
generated
7
lib/analyze-action.js
generated
@@ -95919,6 +95919,7 @@ async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths,
|
|||||||
}
|
}
|
||||||
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
|
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
|
||||||
const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
|
const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
|
||||||
|
logger.info(`Post-processed SARIF output path: ${outputPath}`);
|
||||||
if (outputPath !== void 0) {
|
if (outputPath !== void 0) {
|
||||||
dumpSarifFile(
|
dumpSarifFile(
|
||||||
JSON.stringify(postProcessingResults.sarif),
|
JSON.stringify(postProcessingResults.sarif),
|
||||||
@@ -96175,6 +96176,7 @@ function filterAlertsByDiffRange(logger, sarif) {
|
|||||||
|
|
||||||
// src/upload-sarif.ts
|
// src/upload-sarif.ts
|
||||||
async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category, postProcessedOutputPath) {
|
async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category, postProcessedOutputPath) {
|
||||||
|
logger.info("XXX at upload-sarif.ts|postProcessAndUploadSarif");
|
||||||
const sarifGroups = await getGroupedSarifFilePaths(
|
const sarifGroups = await getGroupedSarifFilePaths(
|
||||||
logger,
|
logger,
|
||||||
sarifPath
|
sarifPath
|
||||||
@@ -96183,6 +96185,9 @@ async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutP
|
|||||||
for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
|
for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
|
||||||
sarifGroups
|
sarifGroups
|
||||||
)) {
|
)) {
|
||||||
|
logger.info(
|
||||||
|
`XXX at upload-sarif.ts|postProcessAndUploadSarif loop for analysisKind: ${analysisKind}`
|
||||||
|
);
|
||||||
const analysisConfig = getAnalysisConfig(analysisKind);
|
const analysisConfig = getAnalysisConfig(analysisKind);
|
||||||
const postProcessingResults = await postProcessSarifFiles(
|
const postProcessingResults = await postProcessSarifFiles(
|
||||||
logger,
|
logger,
|
||||||
@@ -96410,7 +96415,7 @@ async function run() {
|
|||||||
if (runStats) {
|
if (runStats) {
|
||||||
const checkoutPath = getRequiredInput("checkout_path");
|
const checkoutPath = getRequiredInput("checkout_path");
|
||||||
const category = getOptionalInput("category");
|
const category = getOptionalInput("category");
|
||||||
if (await features.getValue("analyze_use_new_upload" /* AnalyzeUseNewUpload */)) {
|
if (Math.random() > -1) {
|
||||||
uploadResults = await postProcessAndUploadSarif(
|
uploadResults = await postProcessAndUploadSarif(
|
||||||
logger,
|
logger,
|
||||||
features,
|
features,
|
||||||
|
|||||||
1
lib/upload-lib.js
generated
1
lib/upload-lib.js
generated
@@ -92733,6 +92733,7 @@ async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths,
|
|||||||
}
|
}
|
||||||
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
|
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
|
||||||
const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
|
const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
|
||||||
|
logger.info(`Post-processed SARIF output path: ${outputPath}`);
|
||||||
if (outputPath !== void 0) {
|
if (outputPath !== void 0) {
|
||||||
dumpSarifFile(
|
dumpSarifFile(
|
||||||
JSON.stringify(postProcessingResults.sarif),
|
JSON.stringify(postProcessingResults.sarif),
|
||||||
|
|||||||
5
lib/upload-sarif-action.js
generated
5
lib/upload-sarif-action.js
generated
@@ -93389,6 +93389,7 @@ async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths,
|
|||||||
}
|
}
|
||||||
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
|
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
|
||||||
const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
|
const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
|
||||||
|
logger.info(`Post-processed SARIF output path: ${outputPath}`);
|
||||||
if (outputPath !== void 0) {
|
if (outputPath !== void 0) {
|
||||||
dumpSarifFile(
|
dumpSarifFile(
|
||||||
JSON.stringify(postProcessingResults.sarif),
|
JSON.stringify(postProcessingResults.sarif),
|
||||||
@@ -93615,6 +93616,7 @@ function filterAlertsByDiffRange(logger, sarif) {
|
|||||||
|
|
||||||
// src/upload-sarif.ts
|
// src/upload-sarif.ts
|
||||||
async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category, postProcessedOutputPath) {
|
async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category, postProcessedOutputPath) {
|
||||||
|
logger.info("XXX at upload-sarif.ts|postProcessAndUploadSarif");
|
||||||
const sarifGroups = await getGroupedSarifFilePaths(
|
const sarifGroups = await getGroupedSarifFilePaths(
|
||||||
logger,
|
logger,
|
||||||
sarifPath
|
sarifPath
|
||||||
@@ -93623,6 +93625,9 @@ async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutP
|
|||||||
for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
|
for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
|
||||||
sarifGroups
|
sarifGroups
|
||||||
)) {
|
)) {
|
||||||
|
logger.info(
|
||||||
|
`XXX at upload-sarif.ts|postProcessAndUploadSarif loop for analysisKind: ${analysisKind}`
|
||||||
|
);
|
||||||
const analysisConfig = getAnalysisConfig(analysisKind);
|
const analysisConfig = getAnalysisConfig(analysisKind);
|
||||||
const postProcessingResults = await postProcessSarifFiles(
|
const postProcessingResults = await postProcessSarifFiles(
|
||||||
logger,
|
logger,
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ async function run() {
|
|||||||
const checkoutPath = actionsUtil.getRequiredInput("checkout_path");
|
const checkoutPath = actionsUtil.getRequiredInput("checkout_path");
|
||||||
const category = actionsUtil.getOptionalInput("category");
|
const category = actionsUtil.getOptionalInput("category");
|
||||||
|
|
||||||
if (await features.getValue(Feature.AnalyzeUseNewUpload)) {
|
if (Math.random() > -1) {
|
||||||
uploadResults = await postProcessAndUploadSarif(
|
uploadResults = await postProcessAndUploadSarif(
|
||||||
logger,
|
logger,
|
||||||
features,
|
features,
|
||||||
|
|||||||
@@ -748,7 +748,7 @@ export async function writePostProcessedFiles(
|
|||||||
) {
|
) {
|
||||||
// If there's an explicit input, use that. Otherwise, use the value from the environment variable.
|
// If there's an explicit input, use that. Otherwise, use the value from the environment variable.
|
||||||
const outputPath = pathInput || util.getOptionalEnvVar(EnvVar.SARIF_DUMP_DIR);
|
const outputPath = pathInput || util.getOptionalEnvVar(EnvVar.SARIF_DUMP_DIR);
|
||||||
|
logger.info(`Post-processed SARIF output path: ${outputPath}`);
|
||||||
// If we have a non-empty output path, write the SARIF file to it.
|
// If we have a non-empty output path, write the SARIF file to it.
|
||||||
if (outputPath !== undefined) {
|
if (outputPath !== undefined) {
|
||||||
dumpSarifFile(
|
dumpSarifFile(
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export async function postProcessAndUploadSarif(
|
|||||||
category?: string,
|
category?: string,
|
||||||
postProcessedOutputPath?: string,
|
postProcessedOutputPath?: string,
|
||||||
): Promise<UploadSarifResults> {
|
): Promise<UploadSarifResults> {
|
||||||
|
logger.info("XXX at upload-sarif.ts|postProcessAndUploadSarif");
|
||||||
const sarifGroups = await upload_lib.getGroupedSarifFilePaths(
|
const sarifGroups = await upload_lib.getGroupedSarifFilePaths(
|
||||||
logger,
|
logger,
|
||||||
sarifPath,
|
sarifPath,
|
||||||
@@ -41,6 +42,10 @@ export async function postProcessAndUploadSarif(
|
|||||||
for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
|
for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
|
||||||
sarifGroups,
|
sarifGroups,
|
||||||
)) {
|
)) {
|
||||||
|
logger.info(
|
||||||
|
`XXX at upload-sarif.ts|postProcessAndUploadSarif loop for analysisKind: ${analysisKind}`,
|
||||||
|
);
|
||||||
|
|
||||||
const analysisConfig = analyses.getAnalysisConfig(analysisKind);
|
const analysisConfig = analyses.getAnalysisConfig(analysisKind);
|
||||||
const postProcessingResults = await upload_lib.postProcessSarifFiles(
|
const postProcessingResults = await upload_lib.postProcessSarifFiles(
|
||||||
logger,
|
logger,
|
||||||
|
|||||||
Reference in New Issue
Block a user