From 0c80cee8061e24785c6ad1b079c5f4314b827b75 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 7 May 2026 15:39:42 +0100 Subject: [PATCH] Add explicit error on Windows --- lib/analyze-action-post.js | 3 +++ lib/init-action-post.js | 3 +++ lib/start-proxy-action-post.js | 3 +++ lib/upload-sarif-action-post.js | 3 +++ src/artifact-scanner.ts | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index fe47faa57..b7ee97d89 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -128728,6 +128728,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log `Maximum archive extraction depth (${MAX_DEPTH}) reached for ${archivePath}` ); } + if (process.platform === "win32") { + throw new Error("Scanning archives is not supported on Windows."); + } const result = { scannedFiles: 0, findings: [] diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 2794b130e..57b06ab2f 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -133650,6 +133650,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log `Maximum archive extraction depth (${MAX_DEPTH}) reached for ${archivePath}` ); } + if (process.platform === "win32") { + throw new Error("Scanning archives is not supported on Windows."); + } const result = { scannedFiles: 0, findings: [] diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 9c40cb5e6..414118377 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -127590,6 +127590,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log `Maximum archive extraction depth (${MAX_DEPTH}) reached for ${archivePath}` ); } + if (process.platform === "win32") { + throw new Error("Scanning archives is not supported on Windows."); + } const result = { scannedFiles: 0, findings: [] diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 12d1b216c..cce51af70 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -127577,6 +127577,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log `Maximum archive extraction depth (${MAX_DEPTH}) reached for ${archivePath}` ); } + if (process.platform === "win32") { + throw new Error("Scanning archives is not supported on Windows."); + } const result = { scannedFiles: 0, findings: [] diff --git a/src/artifact-scanner.ts b/src/artifact-scanner.ts index 90c424197..5f238811a 100644 --- a/src/artifact-scanner.ts +++ b/src/artifact-scanner.ts @@ -156,6 +156,10 @@ async function scanArchiveFile( ); } + if (process.platform === "win32") { + throw new Error("Scanning archives is not supported on Windows."); + } + const result: ScanResult = { scannedFiles: 0, findings: [],