feat: support graceful standalone fallback when baseline target image is missing
CI Tests / JS Unit Tests (push) Skipped
CI Tests / cross-check-mixed-sbom (sbom=false) (push) Skipped
CI Tests / cross-check-mixed-sbom (sbom=true) (push) Skipped
CI Tests / without-inbuild-sbom (sbom=false) (push) Skipped
CI Tests / without-inbuild-sbom (sbom=true) (push) Skipped
CI Tests / with-inbuild-sbom (sbom=false) (push) Skipped
CI Tests / with-inbuild-sbom (sbom=true) (push) Skipped
CI Tests / JS Unit Tests (pull_request) Successful in 3m47s
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Successful in 6m8s
CI Tests / cross-check-mixed-sbom (sbom=false) (pull_request) Successful in 8m20s
CI Tests / cross-check-mixed-sbom (sbom=true) (pull_request) Successful in 8m20s
CI Tests / without-inbuild-sbom (sbom=false) (pull_request) Successful in 12m59s
CI Tests / without-inbuild-sbom (sbom=true) (pull_request) Successful in 7m35s
CI Tests / with-inbuild-sbom (sbom=false) (pull_request) Successful in 8m47s
CI Tests / with-inbuild-sbom (sbom=true) (pull_request) Successful in 3m28s

This commit is contained in:
Philipp committed 2026-11-21 23:55:09 +01:00
1 parent e464443894
commit 9e6eef6a37
3 files changed
+85 -35

No files matched your search

+12
View File
@@ -109,3 +109,15 @@ test('formatVulnRow properly formats badge, architecture tag, and escape pipes',
const rowWithoutArch = formatVulnRow(vuln, allArchs, false);
assert.ok(!rowWithoutArch.includes('`amd64`'));
});
test('cve-diff CLI handles --none baseline gracefully and prints full summary', () => {
const { execFileSync } = require('node:child_process');
const headDir = path.join(FIXTURES_DIR, 'head');
const scriptPath = path.join(__dirname, '..', 'cve-diff.js');
const stdout = execFileSync('node', [scriptPath, '--none', headDir, 'main'], { encoding: 'utf8' });
assert.ok(stdout.includes('baseline unavailable'));
assert.ok(stdout.includes('Total Vulnerabilities'));
assert.ok(stdout.includes('CVE-2023-0002'));
assert.ok(stdout.includes('CVE-2023-0003'));
});