From f48b54af10d7d404c3163cb0d58bd6f7f2e2dfcb Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 23 Oct 2025 13:33:36 +0100 Subject: [PATCH] Fix fallback not being guarded by `uploadKind` check --- lib/analyze-action.js | 5 ++++- src/analyze-action.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 0537bf934..3a4ce819f 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -96435,7 +96435,7 @@ async function run() { category, getOptionalInput("processed-sarif-path") ); - } else { + } else if (uploadKind === "always") { uploadResults = {}; if (isCodeScanningEnabled(config)) { uploadResults["code-scanning" /* CodeScanning */] = await uploadFiles( @@ -96457,6 +96457,9 @@ async function run() { CodeQuality ); } + } else { + uploadResults = {}; + logger.info("Not uploading results"); } if (uploadResults["code-scanning" /* CodeScanning */] !== void 0) { core14.setOutput( diff --git a/src/analyze-action.ts b/src/analyze-action.ts index 91cf55bbf..50102328f 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -361,7 +361,7 @@ async function run() { category, actionsUtil.getOptionalInput("processed-sarif-path"), ); - } else { + } else if (uploadKind === "always") { uploadResults = {}; if (isCodeScanningEnabled(config)) { @@ -387,6 +387,9 @@ async function run() { analyses.CodeQuality, ); } + } else { + uploadResults = {}; + logger.info("Not uploading results"); } // Set the SARIF id outputs only if we have results for them, to avoid