From 0554dfbc8cb1239ea4825dff2001d97881a87430 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:02:50 +0000 Subject: [PATCH] Build package with updated changes Co-authored-by: bdehamer <398027+bdehamer@users.noreply.github.com> --- dist/index.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index c680cb9..c6157df 100644 --- a/dist/index.js +++ b/dist/index.js @@ -120950,7 +120950,6 @@ const predicateFromInputs = async (inputs) => { catch { throw new Error(`predicate file not found: ${predicatePath}`); } - /* istanbul ignore next */ const stat = await promises_default().stat(predicatePath); /* istanbul ignore next */ if (stat.size > MAX_PREDICATE_SIZE_BYTES) { @@ -120978,11 +120977,21 @@ const generateProvenancePredicate = async () => { // SBOMs cannot exceed 16MB. const MAX_SBOM_SIZE_BYTES = 16 * 1024 * 1024; const parseSBOMFromPath = async (filePath) => { - const fileContent = await promises_default().readFile(filePath, 'utf8'); - const stats = await promises_default().stat(filePath); + let stats; + try { + stats = await promises_default().stat(filePath); + } + catch (error) { + const err = error; + if (err.code === 'ENOENT') { + throw new Error('SBOM file not found'); + } + throw error; + } if (stats.size > MAX_SBOM_SIZE_BYTES) { throw new Error(`SBOM file exceeds maximum allowed size: ${MAX_SBOM_SIZE_BYTES} bytes`); } + const fileContent = await promises_default().readFile(filePath, 'utf8'); const sbom = JSON.parse(fileContent); if (checkIsSPDX(sbom)) { return { type: 'spdx', object: sbom };