cve-lite-cli 1.31.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -15
- package/dist/advisory/npm-advisory-source.js +77 -0
- package/dist/cli/args.js +21 -0
- package/dist/cli/help.js +4 -0
- package/dist/epss/client.js +26 -0
- package/dist/index.js +32 -2
- package/dist/licenses/license-check.js +137 -0
- package/dist/licenses/types.js +1 -0
- package/dist/osv/cache.js +19 -8
- package/dist/output/formatters.js +4 -0
- package/dist/output/html-reporter.js +86 -5
- package/dist/output/license-findings-html.js +63 -0
- package/dist/output/license-findings-json.js +10 -0
- package/dist/output/license-findings-sarif.js +64 -0
- package/dist/output/license-terminal.js +35 -0
- package/dist/output/multi-folder-html-reporter.js +16 -8
- package/dist/output/printers.js +69 -14
- package/dist/output/sarif.js +10 -3
- package/dist/output/write-outputs.js +9 -2
- package/dist/remediation/parent-upgrade.js +8 -1
- package/dist/scan/completeness.js +6 -0
- package/dist/scan/multi-folder-scan.js +41 -6
- package/dist/scanner.js +75 -4
- package/dist/utils/priority-signal.js +40 -0
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ import { MAL_GIT_SOURCE_PINNED_DISPLAY, MAL_GIT_SOURCE_FLOATING_DISPLAY, severit
|
|
|
9
9
|
import { hasMaliciousAdvisory } from "../utils/vuln.js";
|
|
10
10
|
import { renderOverrideFindingsHtml } from "./override-findings-html.js";
|
|
11
11
|
import { renderMaintenanceFindingsHtml } from "./maintenance-findings-html.js";
|
|
12
|
+
import { renderLicenseFindingsHtml } from "./license-findings-html.js";
|
|
13
|
+
import { PRIORITY_SIGNAL_LABELS, PRIORITY_SIGNAL_DESCRIPTIONS, PRIORITY_SIGNAL_LEGEND_DESCRIPTIONS } from "../utils/priority-signal.js";
|
|
12
14
|
import { UNVERIFIED_PARENT_UPGRADE_NOTE } from "../remediation/fix-commands.js";
|
|
13
15
|
import { getCompletenessImpact } from "../scan/completeness.js";
|
|
14
16
|
export function serializeHtmlFinding(finding, plan) {
|
|
@@ -33,6 +35,8 @@ export function buildReportData(params) {
|
|
|
33
35
|
skippedDependencies: params.skippedDependencies,
|
|
34
36
|
overrideFindings: params.overrideFindings,
|
|
35
37
|
maintenanceFindings: params.maintenanceFindings,
|
|
38
|
+
licenseFindings: params.licenseFindings,
|
|
39
|
+
licenseLimitedToDirectOnly: params.licenseLimitedToDirectOnly,
|
|
36
40
|
completeness: params.completeness,
|
|
37
41
|
};
|
|
38
42
|
}
|
|
@@ -180,7 +184,7 @@ button.header-link:hover{color:var(--link);border-color:var(--link)}
|
|
|
180
184
|
.fix-target-note{color:var(--text-3);font-style:italic;font-size:10px}
|
|
181
185
|
.fix-target-coverage{flex-basis:100%;color:var(--text-3);font-size:10px;line-height:1.45}
|
|
182
186
|
.chain-proof{font-size:0.78rem;color:var(--text-2);margin-left:6px;font-family:monospace}
|
|
183
|
-
.completeness-banner{margin:16px 32px
|
|
187
|
+
.completeness-banner{margin:16px 32px;background:#e3b34111;border:1px solid #e3b34144;border-radius:8px;padding:14px 18px;display:flex;gap:14px;align-items:flex-start}
|
|
184
188
|
.completeness-banner-icon{font-size:22px;flex-shrink:0;line-height:1}
|
|
185
189
|
.completeness-banner-body strong{font-size:13px;color:var(--text);display:block;margin-bottom:4px}
|
|
186
190
|
.completeness-banner-body p{font-size:12px;color:var(--text-2);margin:0}
|
|
@@ -207,7 +211,19 @@ button.header-link:hover{color:var(--link);border-color:var(--link)}
|
|
|
207
211
|
.maintenance-risk table tbody tr{border-bottom:1px solid var(--border-sub)}
|
|
208
212
|
.maintenance-risk table tbody tr:last-child{border-bottom:none}
|
|
209
213
|
.maintenance-risk table tbody tr:hover{background:var(--surface)}
|
|
210
|
-
.maintenance-risk table tbody td{padding:11px 14px;font-size:13px;color:var(--text);vertical-align:middle}
|
|
214
|
+
.maintenance-risk table tbody td{padding:11px 14px;font-size:13px;color:var(--text);vertical-align:middle}
|
|
215
|
+
.priority-badge{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;padding:2px 7px;border-radius:4px;white-space:nowrap}
|
|
216
|
+
.priority-badge.fix-now{background:#f8514922;color:#f85149;border:1px solid #f8514966}
|
|
217
|
+
.priority-badge.fix-soon{background:#fb850022;color:#fb8500;border:1px solid #fb850066}
|
|
218
|
+
.priority-badge.monitor{background:#388bfd22;color:#388bfd;border:1px solid #388bfd66}
|
|
219
|
+
.priority-badge.low-priority{background:#8b949e22;color:#8b949e;border:1px solid #8b949e66}
|
|
220
|
+
.priority-none{font-size:11px;color:var(--text-3)}
|
|
221
|
+
.epss-val{font-size:11px;color:var(--text-2);font-family:monospace;white-space:nowrap;cursor:help;border-bottom:1px dotted var(--text-3)}
|
|
222
|
+
.epss-val.hot{color:#a371f7;border-bottom-color:#a371f7}
|
|
223
|
+
.priority-legend{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:14px 18px;margin:0 32px 24px}
|
|
224
|
+
.priority-legend h4{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--text-2);margin-bottom:12px}
|
|
225
|
+
.priority-legend-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
|
|
226
|
+
.priority-legend-item{display:flex;align-items:flex-start;gap:10px;font-size:12px;color:var(--text-2);line-height:1.5}`;
|
|
211
227
|
export function renderHtmlReport(data) {
|
|
212
228
|
const projectName = path.basename(data.projectPath);
|
|
213
229
|
const scanDate = new Date(data.scannedAt).toLocaleString();
|
|
@@ -318,6 +334,8 @@ ${duplicatePackagesHtml}
|
|
|
318
334
|
<th onclick="sortBy('package')">Package <span class="sort-arrow">↕</span></th>
|
|
319
335
|
<th>Fix available</th>
|
|
320
336
|
<th onclick="sortBy('severity')" class="sorted">Severity <span class="sort-arrow" style="color:var(--link)">↓</span></th>
|
|
337
|
+
<th title="Exploit Prediction Scoring System - likelihood of exploitation in the next 30 days, relative to all CVEs (FIRST.org)">EPSS</th>
|
|
338
|
+
<th>EPSS Priority</th>
|
|
321
339
|
<th onclick="sortBy('relationship')">Type <span class="sort-arrow">↕</span></th>
|
|
322
340
|
<th>Root</th>
|
|
323
341
|
<th>CVE / Advisory</th>
|
|
@@ -325,13 +343,14 @@ ${duplicatePackagesHtml}
|
|
|
325
343
|
</thead>
|
|
326
344
|
<tbody id="findings-tbody">
|
|
327
345
|
${findingRowsHtml}
|
|
328
|
-
<tr id="no-results-row" style="display:none"><td colspan="
|
|
346
|
+
<tr id="no-results-row" style="display:none"><td colspan="9" class="no-results">No findings match your search.</td></tr>
|
|
329
347
|
</tbody>
|
|
330
348
|
</table>
|
|
349
|
+
${renderPriorityLegendHtml(data.findings)}
|
|
331
350
|
</div>
|
|
332
351
|
${renderOverrideFindingsHtml(data.overrideFindings, data.projectPath)}
|
|
333
352
|
${renderMaintenanceFindingsHtml(data.maintenanceFindings)}
|
|
334
|
-
|
|
353
|
+
${renderLicenseFindingsHtml(data.licenseFindings, { limitedToDirectOnly: data.licenseLimitedToDirectOnly })}
|
|
335
354
|
${skippedDepsHtml}
|
|
336
355
|
${noticesHtml}
|
|
337
356
|
|
|
@@ -486,6 +505,63 @@ function renderRelBadge(finding) {
|
|
|
486
505
|
}
|
|
487
506
|
return `<span class="rel-badge ${escapeHtml(finding.relationship)}">${escapeHtml(finding.relationship)}</span>`;
|
|
488
507
|
}
|
|
508
|
+
function renderPrioritySignalDetailHtml(priority, epssScores) {
|
|
509
|
+
if (!priority)
|
|
510
|
+
return "";
|
|
511
|
+
const label = PRIORITY_SIGNAL_LABELS[priority];
|
|
512
|
+
const desc = PRIORITY_SIGNAL_DESCRIPTIONS[priority];
|
|
513
|
+
const cssClass = priority.replace(/_/g, "-");
|
|
514
|
+
let epssLine = "";
|
|
515
|
+
if (epssScores && epssScores.length > 0) {
|
|
516
|
+
const best = epssScores.slice().sort((a, b) => b.percentile - a.percentile)[0];
|
|
517
|
+
const top = (1 - best.percentile) * 100;
|
|
518
|
+
const topStr = top < 0.01 ? "<0.01" : top < 1 ? top.toFixed(2) : top.toFixed(1);
|
|
519
|
+
epssLine = `<p style="font-size:12px;color:var(--text-3);margin-top:4px">${escapeHtml(best.cve)} - top ${topStr}% exploitation likelihood (EPSS: ${(best.epss * 100).toFixed(2)}%)</p>`;
|
|
520
|
+
}
|
|
521
|
+
return `<h4 class="detail-subheading">EPSS Priority Signal</h4>
|
|
522
|
+
<p><span class="priority-badge ${escapeHtml(cssClass)}">${escapeHtml(label)}</span> ${escapeHtml(desc)}</p>
|
|
523
|
+
${epssLine}`;
|
|
524
|
+
}
|
|
525
|
+
export function renderPriorityLegendHtml(findings) {
|
|
526
|
+
const hasEpss = findings.some(f => f.epssScores && f.epssScores.length > 0);
|
|
527
|
+
if (!hasEpss)
|
|
528
|
+
return "";
|
|
529
|
+
const items = [
|
|
530
|
+
{ signal: "fix_now", label: PRIORITY_SIGNAL_LABELS.fix_now, desc: PRIORITY_SIGNAL_LEGEND_DESCRIPTIONS.fix_now },
|
|
531
|
+
{ signal: "fix_soon", label: PRIORITY_SIGNAL_LABELS.fix_soon, desc: PRIORITY_SIGNAL_LEGEND_DESCRIPTIONS.fix_soon },
|
|
532
|
+
{ signal: "monitor", label: PRIORITY_SIGNAL_LABELS.monitor, desc: PRIORITY_SIGNAL_LEGEND_DESCRIPTIONS.monitor },
|
|
533
|
+
{ signal: "low_priority", label: PRIORITY_SIGNAL_LABELS.low_priority, desc: PRIORITY_SIGNAL_LEGEND_DESCRIPTIONS.low_priority },
|
|
534
|
+
];
|
|
535
|
+
const itemsHtml = items.map(({ signal, label, desc }) => {
|
|
536
|
+
const cssClass = signal.replace(/_/g, "-");
|
|
537
|
+
return `<div class="priority-legend-item"><span class="priority-badge ${escapeHtml(cssClass)}">${escapeHtml(label)}</span><span>${escapeHtml(desc)}</span></div>`;
|
|
538
|
+
}).join("\n");
|
|
539
|
+
return `<div class="priority-legend">
|
|
540
|
+
<h4>Priority Signal - severity x exploitation likelihood</h4>
|
|
541
|
+
<div class="priority-legend-grid">
|
|
542
|
+
${itemsHtml}
|
|
543
|
+
</div>
|
|
544
|
+
<p style="margin-top:10px;font-size:11px;color:var(--text-3)">EPSS = Exploit Prediction Scoring System (FIRST.org). "top X%" = this CVE is among the X% most likely to be exploited across all published CVEs. "-" is shown in the EPSS and EPSS Priority columns when EPSS data is unavailable for a finding.</p>
|
|
545
|
+
</div>`;
|
|
546
|
+
}
|
|
547
|
+
function renderEpssColumnHtml(epssScores) {
|
|
548
|
+
if (!epssScores || epssScores.length === 0)
|
|
549
|
+
return `<span class="priority-none">-</span>`;
|
|
550
|
+
const best = epssScores.slice().sort((a, b) => b.percentile - a.percentile)[0];
|
|
551
|
+
const top = (1 - best.percentile) * 100;
|
|
552
|
+
const topStr = top < 0.01 ? "<0.01" : top < 1 ? top.toFixed(2) : top.toFixed(1);
|
|
553
|
+
const isHot = best.percentile >= 0.90;
|
|
554
|
+
const hotClass = isHot ? " hot" : "";
|
|
555
|
+
const tooltip = `This CVE is more likely to be exploited than ${(best.percentile * 100).toFixed(0)}% of all published CVEs (EPSS score: ${(best.epss * 100).toFixed(2)}%)`;
|
|
556
|
+
return `<span class="epss-val${hotClass}" title="${escapeHtml(tooltip)}">top ${topStr}%</span>`;
|
|
557
|
+
}
|
|
558
|
+
function renderPriorityColumnHtml(priority) {
|
|
559
|
+
if (!priority)
|
|
560
|
+
return `<span class="priority-none">-</span>`;
|
|
561
|
+
const label = PRIORITY_SIGNAL_LABELS[priority];
|
|
562
|
+
const cssClass = priority.replace(/_/g, "-");
|
|
563
|
+
return `<span class="priority-badge ${escapeHtml(cssClass)}">${escapeHtml(label)}</span>`;
|
|
564
|
+
}
|
|
489
565
|
export function renderFindingRow(finding, idx, skippedKeys) {
|
|
490
566
|
const cveLinks = finding.cves.length > 0
|
|
491
567
|
? finding.cves.map(advisoryLink).join(", ")
|
|
@@ -526,17 +602,21 @@ export function renderFindingRow(finding, idx, skippedKeys) {
|
|
|
526
602
|
const rootDepsHtml = finding.rootDependencies.length > 0
|
|
527
603
|
? finding.rootDependencies.map(name => `<span class="root-dep">${escapeHtml(name)}</span>`).join(", ")
|
|
528
604
|
: `<span class="root-dep-none">-</span>`;
|
|
605
|
+
const epssHtml = renderEpssColumnHtml(finding.epssScores);
|
|
606
|
+
const priorityHtml = renderPriorityColumnHtml(finding.prioritySignal);
|
|
529
607
|
return `<tr id="row-${idx}" data-skipped="${isSkipped ? '1' : '0'}" onclick="toggleRow(${idx})">
|
|
530
608
|
<td><span class="expand-icon" id="icon-${idx}">▶</span></td>
|
|
531
609
|
<td><div class="pkg-name"><a href="https://www.npmjs.com/package/${encodeURIComponent(finding.package)}" target="_blank" rel="noopener noreferrer">${escapeHtml(finding.package)}</a></div><div class="pkg-version">${escapeHtml(finding.version)}</div></td>
|
|
532
610
|
<td>${fixHtml}</td>
|
|
533
611
|
<td><span class="sev-badge ${escapeHtml(finding.severity)}">${escapeHtml(finding.severity)}</span></td>
|
|
612
|
+
<td>${epssHtml}</td>
|
|
613
|
+
<td>${priorityHtml}</td>
|
|
534
614
|
<td>${renderRelBadge(finding)}</td>
|
|
535
615
|
<td>${rootDepsHtml}</td>
|
|
536
616
|
<td>${cveLinks}</td>
|
|
537
617
|
</tr>
|
|
538
618
|
<tr id="detail-${idx}" class="detail-row">
|
|
539
|
-
<td colspan="
|
|
619
|
+
<td colspan="9">
|
|
540
620
|
<div class="expanded-inner">
|
|
541
621
|
<div class="detail-col" style="max-width:320px">
|
|
542
622
|
<h4>Description</h4>
|
|
@@ -554,6 +634,7 @@ export function renderFindingRow(finding, idx, skippedKeys) {
|
|
|
554
634
|
<p>${escapeHtml(finding.riskSummary)}</p>
|
|
555
635
|
<h4 class="detail-subheading">Next action</h4>
|
|
556
636
|
<p>${escapeHtml(finding.nextAction)}</p>
|
|
637
|
+
${renderPrioritySignalDetailHtml(finding.prioritySignal, finding.epssScores)}
|
|
557
638
|
</div>
|
|
558
639
|
</div>
|
|
559
640
|
</td>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function esc(s) {
|
|
2
|
+
return s
|
|
3
|
+
.replace(/&/g, "&")
|
|
4
|
+
.replace(/</g, "<")
|
|
5
|
+
.replace(/>/g, ">")
|
|
6
|
+
.replace(/"/g, """);
|
|
7
|
+
}
|
|
8
|
+
export function renderLicenseFindingsHtml(findings, opts) {
|
|
9
|
+
// undefined = license checking was never requested -> render nothing, so a plain
|
|
10
|
+
// `cve-lite .` report shows no License Issues panel at all. An empty array =
|
|
11
|
+
// it ran and found nothing -> render the "no findings" reassurance.
|
|
12
|
+
if (findings === undefined) {
|
|
13
|
+
return "";
|
|
14
|
+
}
|
|
15
|
+
if (findings.length === 0) {
|
|
16
|
+
const note = opts?.limitedToDirectOnly
|
|
17
|
+
? `\n <p style="margin-top:8px;font-size:12px;color:var(--text-2)">Note: license data is not available for transitive packages in pnpm/Yarn/Bun - direct dependencies only.</p>`
|
|
18
|
+
: "";
|
|
19
|
+
return `
|
|
20
|
+
<div class="findings-section">
|
|
21
|
+
<div class="findings-header">
|
|
22
|
+
<div style="display:flex;align-items:center;gap:8px">
|
|
23
|
+
<h2>License Issues</h2>
|
|
24
|
+
<span class="badge-warning">informational</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<p style="color:var(--text-2);font-size:13px">No license issues found.</p>${note}
|
|
28
|
+
</div>`;
|
|
29
|
+
}
|
|
30
|
+
const rows = findings.map(f => ` <tr style="cursor:default">` +
|
|
31
|
+
`<td><span class="sev-badge ${esc(f.severity)}">${esc(f.ruleId)}</span></td>` +
|
|
32
|
+
`<td style="font-weight:500">${esc(f.package.name)}</td>` +
|
|
33
|
+
`<td style="color:var(--text-2)">${esc(f.package.version)}</td>` +
|
|
34
|
+
`<td><code style="font-size:12px;font-family:monospace;color:var(--text)">${esc(f.license ?? "(none)")}</code></td>` +
|
|
35
|
+
`<td><span class="rel-badge ${esc(f.relationship)}">${esc(f.relationship)}</span></td>` +
|
|
36
|
+
`<td style="color:var(--text-2);font-size:12px">${esc(f.message)}</td>` +
|
|
37
|
+
`</tr>`);
|
|
38
|
+
const count = findings.length;
|
|
39
|
+
const note = opts?.limitedToDirectOnly
|
|
40
|
+
? `\n <p style="margin-top:10px;font-size:12px;color:var(--text-2)">Note: license data is not available for transitive packages in pnpm/Yarn/Bun - direct dependencies only.</p>`
|
|
41
|
+
: "";
|
|
42
|
+
return `
|
|
43
|
+
<div class="findings-section">
|
|
44
|
+
<div class="findings-header">
|
|
45
|
+
<div style="display:flex;align-items:center;gap:8px">
|
|
46
|
+
<h2>License Issues</h2>
|
|
47
|
+
<span class="badge-warning">informational</span>
|
|
48
|
+
</div>
|
|
49
|
+
<span style="font-size:12px;color:var(--text-2)">${count} ${count === 1 ? "finding" : "findings"}</span>
|
|
50
|
+
</div>
|
|
51
|
+
<table class="findings-table">
|
|
52
|
+
<thead>
|
|
53
|
+
<tr>
|
|
54
|
+
<th>Rule</th><th>Package</th><th>Version</th><th>License</th><th>Relationship</th><th>Message</th>
|
|
55
|
+
</tr>
|
|
56
|
+
</thead>
|
|
57
|
+
<tbody>
|
|
58
|
+
${rows.join("\n")}
|
|
59
|
+
</tbody>
|
|
60
|
+
</table>${note}
|
|
61
|
+
</div>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function serializeLicenseFindings(findings) {
|
|
2
|
+
return findings.map(f => ({
|
|
3
|
+
ruleId: f.ruleId,
|
|
4
|
+
severity: f.severity,
|
|
5
|
+
package: { name: f.package.name, version: f.package.version },
|
|
6
|
+
license: f.license,
|
|
7
|
+
relationship: f.relationship,
|
|
8
|
+
message: f.message,
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getCliVersion } from "../utils/version-info.js";
|
|
2
|
+
import { severityToSarifLevel } from "../utils/severity.js";
|
|
3
|
+
import { sarifFingerprintHash } from "../utils/sarif.js";
|
|
4
|
+
const LC_RULES = [
|
|
5
|
+
{
|
|
6
|
+
id: "LC001",
|
|
7
|
+
name: "Copyleft license",
|
|
8
|
+
shortDescription: "Dependency uses a copyleft license that may require open-sourcing your code",
|
|
9
|
+
helpUri: "https://owasp.org/cve-lite-cli/docs/license-scanning/lc001",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "LC002",
|
|
13
|
+
name: "Unknown license",
|
|
14
|
+
shortDescription: "Dependency has no license declaration - legally ambiguous",
|
|
15
|
+
helpUri: "https://owasp.org/cve-lite-cli/docs/license-scanning/lc002",
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
const LC_RULE_INDEX = new Map(LC_RULES.map((r, i) => [r.id, i]));
|
|
19
|
+
export function buildLicenseSarifComponent() {
|
|
20
|
+
return {
|
|
21
|
+
name: "cve-lite-cli-licenses",
|
|
22
|
+
version: getCliVersion(),
|
|
23
|
+
informationUri: "https://github.com/OWASP/cve-lite-cli",
|
|
24
|
+
rules: LC_RULES.map(r => ({
|
|
25
|
+
id: r.id,
|
|
26
|
+
name: r.name,
|
|
27
|
+
shortDescription: { text: r.shortDescription },
|
|
28
|
+
helpUri: r.helpUri,
|
|
29
|
+
})),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function buildLicenseSarifResults(findings, lockfileUri, toolComponentIndex = 0) {
|
|
33
|
+
return findings.map(f => {
|
|
34
|
+
const ruleIndex = LC_RULE_INDEX.get(f.ruleId);
|
|
35
|
+
if (ruleIndex === undefined) {
|
|
36
|
+
throw new Error(`LC_RULE_INDEX: unknown ruleId "${f.ruleId}" - add it to LC_RULES`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
ruleId: f.ruleId,
|
|
40
|
+
ruleIndex,
|
|
41
|
+
rule: { id: f.ruleId, toolComponent: { index: toolComponentIndex } },
|
|
42
|
+
kind: "open",
|
|
43
|
+
level: severityToSarifLevel(f.severity),
|
|
44
|
+
message: { text: f.message },
|
|
45
|
+
locations: [
|
|
46
|
+
{
|
|
47
|
+
physicalLocation: {
|
|
48
|
+
artifactLocation: { uri: lockfileUri, uriBaseId: "%SRCROOT%" },
|
|
49
|
+
region: { startLine: 1 },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
partialFingerprints: {
|
|
54
|
+
primaryLocationLineHash: sarifFingerprintHash(`${f.ruleId}:${f.package.name}:${f.package.version}`),
|
|
55
|
+
},
|
|
56
|
+
properties: {
|
|
57
|
+
package: f.package.name,
|
|
58
|
+
version: f.package.version,
|
|
59
|
+
license: f.license,
|
|
60
|
+
severity: f.severity,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { chalk } from "../utils/chalk.js";
|
|
2
|
+
import { formatSeverityLabel } from "../utils/severity.js";
|
|
3
|
+
const DIVIDER = "────────────────────────────────";
|
|
4
|
+
export function renderLicenseFindings(findings, opts) {
|
|
5
|
+
const lines = [
|
|
6
|
+
DIVIDER,
|
|
7
|
+
chalk.bold("⚖ License Issues"),
|
|
8
|
+
DIVIDER,
|
|
9
|
+
"",
|
|
10
|
+
];
|
|
11
|
+
if (findings.length === 0) {
|
|
12
|
+
lines.push(chalk.greenBright("✔ No license issues found."));
|
|
13
|
+
return lines.join("\n");
|
|
14
|
+
}
|
|
15
|
+
for (const f of findings) {
|
|
16
|
+
const pkg = `${f.package.name}@${f.package.version}`;
|
|
17
|
+
const sevPad = " ".repeat(Math.max(0, 8 - f.severity.length));
|
|
18
|
+
lines.push(`${formatSeverityLabel(f.severity.toUpperCase())}${sevPad} ${f.ruleId} ${pkg}`);
|
|
19
|
+
lines.push(` ${f.message}`);
|
|
20
|
+
lines.push(` Type: ${f.relationship}`);
|
|
21
|
+
lines.push("");
|
|
22
|
+
}
|
|
23
|
+
const highCount = findings.filter((f) => f.severity === "high").length;
|
|
24
|
+
const medCount = findings.filter((f) => f.severity === "medium").length;
|
|
25
|
+
const parts = [];
|
|
26
|
+
if (highCount > 0)
|
|
27
|
+
parts.push(`${highCount} high`);
|
|
28
|
+
if (medCount > 0)
|
|
29
|
+
parts.push(`${medCount} medium`);
|
|
30
|
+
lines.push(chalk.yellow(`⚖ License scan: ${parts.join(", ")} (informational)`));
|
|
31
|
+
if (opts.limitedToDirectOnly) {
|
|
32
|
+
lines.push(chalk.gray("Note: license data not available for transitive packages in pnpm/Yarn/Bun - direct dependencies only."));
|
|
33
|
+
}
|
|
34
|
+
return lines.join("\n");
|
|
35
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { aggregateMultiFolderCompleteness } from "../scan/completeness.js";
|
|
4
|
-
import { REPORT_STYLES, escapeHtml, openInBrowser, renderFindingRow, renderFixPlan, renderCompletenessBanner, serializeHtmlFinding, } from "./html-reporter.js";
|
|
4
|
+
import { REPORT_STYLES, escapeHtml, openInBrowser, renderFindingRow, renderFixPlan, renderCompletenessBanner, serializeHtmlFinding, renderPriorityLegendHtml, } from "./html-reporter.js";
|
|
5
5
|
import { renderOverrideFindingsHtml } from "./override-findings-html.js";
|
|
6
6
|
import { renderMaintenanceFindingsHtml } from "./maintenance-findings-html.js";
|
|
7
|
+
import { renderLicenseFindingsHtml } from "./license-findings-html.js";
|
|
7
8
|
import { loadLogoDataUri } from "./logos.js";
|
|
8
9
|
import { pluralize } from "../utils/string.js";
|
|
9
10
|
export function buildMultiFolderReportData(params) {
|
|
@@ -45,12 +46,12 @@ function renderFolderNotices(coverage) {
|
|
|
45
46
|
if (coverage.length === 0)
|
|
46
47
|
return "";
|
|
47
48
|
const items = coverage.map(n => `<li>${escapeHtml(n)}</li>`).join("\n");
|
|
48
|
-
return `<div class="scan-notes" style="margin:16px 32px
|
|
49
|
+
return `<div class="scan-notes" style="margin:16px 32px">
|
|
49
50
|
<button class="scan-notes-toggle" onclick="toggleNotes(this)"><span class="arrow">▶</span> Scan notes (${coverage.length})</button>
|
|
50
51
|
<div class="scan-notes-body"><ul>${items}</ul></div>
|
|
51
52
|
</div>`;
|
|
52
53
|
}
|
|
53
|
-
function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRoot, includeOverrides, includeMaintenance) {
|
|
54
|
+
function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRoot, includeOverrides, includeMaintenance, includeLicenses) {
|
|
54
55
|
const counts = { critical: 0, high: 0, medium: 0, low: 0, unknown: 0 };
|
|
55
56
|
for (const f of result.sorted) {
|
|
56
57
|
const sev = f.severity;
|
|
@@ -67,7 +68,6 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
67
68
|
const findingRowsHtml = serialized.map((f, i) => renderFindingRow(f, idxOffset + i)).join("\n");
|
|
68
69
|
const fixPlanHtml = renderFixPlan(result.suggestedFixCommands);
|
|
69
70
|
const noticesHtml = renderFolderNotices(result.coverage);
|
|
70
|
-
const completenessBannerHtml = renderCompletenessBanner(result.completeness);
|
|
71
71
|
const folderAbs = path.join(projectRoot, result.subfolder);
|
|
72
72
|
const overrideHtml = includeOverrides
|
|
73
73
|
? renderOverrideFindingsHtml(result.overrideFindings, folderAbs)
|
|
@@ -75,8 +75,11 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
75
75
|
const maintenanceHtml = includeMaintenance
|
|
76
76
|
? renderMaintenanceFindingsHtml(result.maintenanceFindings)
|
|
77
77
|
: "";
|
|
78
|
+
const licenseHtml = includeLicenses
|
|
79
|
+
? renderLicenseFindingsHtml(result.licenseFindings, { limitedToDirectOnly: result.licenseLimitedToDirectOnly })
|
|
80
|
+
: "";
|
|
78
81
|
const emptyRow = result.sorted.length === 0
|
|
79
|
-
? `<tr><td colspan="
|
|
82
|
+
? `<tr><td colspan="9" style="text-align:center;padding:24px;color:#8b949e">No findings</td></tr>`
|
|
80
83
|
: "";
|
|
81
84
|
return `
|
|
82
85
|
<details class="folder-section"${isOpen ? " open" : ""}>
|
|
@@ -88,7 +91,6 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
88
91
|
<span class="folder-counts">${escapeHtml(summaryText)}</span>
|
|
89
92
|
</summary>
|
|
90
93
|
<div class="folder-body">
|
|
91
|
-
${completenessBannerHtml}
|
|
92
94
|
${fixPlanHtml}
|
|
93
95
|
${noticesHtml}
|
|
94
96
|
<div class="findings-section" style="margin:16px 32px 32px">
|
|
@@ -112,6 +114,8 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
112
114
|
<th onclick="sortBy('package',${fi})">Package <span class="sort-arrow">↕</span></th>
|
|
113
115
|
<th>Fix available</th>
|
|
114
116
|
<th onclick="sortBy('severity',${fi})" class="sorted">Severity <span class="sort-arrow" style="color:#58a6ff">↓</span></th>
|
|
117
|
+
<th title="Exploit Prediction Scoring System - likelihood of exploitation in the next 30 days, relative to all CVEs (FIRST.org)">EPSS</th>
|
|
118
|
+
<th>EPSS Priority</th>
|
|
115
119
|
<th onclick="sortBy('relationship',${fi})">Type <span class="sort-arrow">↕</span></th>
|
|
116
120
|
<th>Root</th>
|
|
117
121
|
<th>CVE / Advisory</th>
|
|
@@ -119,12 +123,13 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
119
123
|
</thead>
|
|
120
124
|
<tbody id="findings-tbody-${fi}" data-offset="${idxOffset}">
|
|
121
125
|
${emptyRow}${findingRowsHtml}
|
|
122
|
-
<tr id="no-results-row-${fi}" style="display:none"><td colspan="
|
|
126
|
+
<tr id="no-results-row-${fi}" style="display:none"><td colspan="9" class="no-results">No findings match your search.</td></tr>
|
|
123
127
|
</tbody>
|
|
124
128
|
</table>
|
|
125
129
|
</div>
|
|
126
130
|
${overrideHtml}
|
|
127
131
|
${maintenanceHtml}
|
|
132
|
+
${licenseHtml}
|
|
128
133
|
</div>
|
|
129
134
|
</details>`;
|
|
130
135
|
}
|
|
@@ -147,6 +152,7 @@ export async function writeMultiFolderHtmlReport(params) {
|
|
|
147
152
|
cliVersion: params.cliVersion,
|
|
148
153
|
includeOverrides: params.includeOverrides,
|
|
149
154
|
includeMaintenance: params.includeMaintenance,
|
|
155
|
+
includeLicenses: params.includeLicenses,
|
|
150
156
|
});
|
|
151
157
|
// Compact per-folder findings for JavaScript (only fields needed for filter/sort/search)
|
|
152
158
|
const folderFindingsJson = JSON.stringify(allSerialized.map(findings => findings.map(f => ({
|
|
@@ -163,7 +169,7 @@ export async function writeMultiFolderHtmlReport(params) {
|
|
|
163
169
|
let idxOffset = 0;
|
|
164
170
|
const folderSectionsHtml = params.results
|
|
165
171
|
.map((r, fi) => {
|
|
166
|
-
const html = renderFolderSection(r, fi, idxOffset, allSerialized[fi], params.projectPath, params.includeOverrides, params.includeMaintenance);
|
|
172
|
+
const html = renderFolderSection(r, fi, idxOffset, allSerialized[fi], params.projectPath, params.includeOverrides, params.includeMaintenance, params.includeLicenses);
|
|
167
173
|
idxOffset += r.sorted.length;
|
|
168
174
|
return html;
|
|
169
175
|
})
|
|
@@ -235,6 +241,8 @@ ${aggregateBannerHtml}
|
|
|
235
241
|
|
|
236
242
|
${folderSectionsHtml}
|
|
237
243
|
|
|
244
|
+
${renderPriorityLegendHtml(reportData.findings)}
|
|
245
|
+
|
|
238
246
|
<div class="report-footer">
|
|
239
247
|
<span>Generated by <strong>cve-lite v${escapeHtml(params.cliVersion)}</strong></span>
|
|
240
248
|
<span>${folderCount} ${pluralize(folderCount, "folder")} · ${totalFindings} findings · ${totalCVEs} CVEs</span>
|
package/dist/output/printers.js
CHANGED
|
@@ -7,6 +7,8 @@ import { formatSeverityLabel } from "../utils/severity.js";
|
|
|
7
7
|
import { pluralize } from "../utils/string.js";
|
|
8
8
|
import { hasMaliciousAdvisory } from "../utils/vuln.js";
|
|
9
9
|
import { selectFindingsForCompact } from "./finding-display.js";
|
|
10
|
+
import { computePrioritySignal, PRIORITY_SIGNAL_LABELS, PRIORITY_SIGNAL_TABLE_LABELS, PRIORITY_SIGNAL_DESCRIPTIONS } from "../utils/priority-signal.js";
|
|
11
|
+
import { renderLicenseFindings } from "./license-terminal.js";
|
|
10
12
|
import { getCompletenessImpact } from "../scan/completeness.js";
|
|
11
13
|
import { MAL_PRIVATE_REGISTRY_COMPACT_MESSAGE, MAL_PRIVATE_REGISTRY_LEGEND_MESSAGE, MAL_GIT_SOURCE_PINNED_MESSAGE, MAL_GIT_SOURCE_FLOATING_MESSAGE, MAL_GIT_SOURCE_COMPACT_MESSAGE, MAL_GIT_SOURCE_LEGEND_MESSAGE, MAL_GIT_SOURCE_PINNED_DISPLAY, MAL_GIT_SOURCE_FLOATING_DISPLAY, OVERRIDES_COMMAND, } from "../constants.js";
|
|
12
14
|
export function printSummary(findings, packageCount, scanInput) {
|
|
@@ -20,7 +22,8 @@ export function printSummary(findings, packageCount, scanInput) {
|
|
|
20
22
|
return;
|
|
21
23
|
}
|
|
22
24
|
const totalCVEs = countUniqueAdvisories(findings);
|
|
23
|
-
const
|
|
25
|
+
const uniquePkgCount = new Set(findings.map(f => `${f.pkg.name}@${f.pkg.version}`)).size;
|
|
26
|
+
const pkgLabel = uniquePkgCount === 1 ? "package" : "packages";
|
|
24
27
|
const cveLabel = totalCVEs === 1 ? "CVE" : "CVEs";
|
|
25
28
|
const counts = {
|
|
26
29
|
critical: findings.filter(f => f.severity === "critical").length,
|
|
@@ -29,7 +32,7 @@ export function printSummary(findings, packageCount, scanInput) {
|
|
|
29
32
|
low: findings.filter(f => f.severity === "low").length,
|
|
30
33
|
unknown: findings.filter(f => f.severity === "unknown").length
|
|
31
34
|
};
|
|
32
|
-
console.log(chalk.redBright(`✗ Found ${
|
|
35
|
+
console.log(chalk.redBright(`✗ Found ${uniquePkgCount} ${pkgLabel} (${totalCVEs} ${cveLabel}) with known OSV matches from ${scanInput.source}`));
|
|
33
36
|
console.log(renderSeverityTable(counts));
|
|
34
37
|
}
|
|
35
38
|
export function printActionSummary(findings, overrideCount = 0, packageManager) {
|
|
@@ -192,8 +195,21 @@ export function printSkippedDependencies(skipped) {
|
|
|
192
195
|
console.log(`${chalk.yellow("•")} ...and ${skipped.length - 10} more`);
|
|
193
196
|
}
|
|
194
197
|
}
|
|
198
|
+
function formatPrioritySignal(signal) {
|
|
199
|
+
if (!signal)
|
|
200
|
+
return chalk.gray("-");
|
|
201
|
+
const label = PRIORITY_SIGNAL_TABLE_LABELS[signal];
|
|
202
|
+
if (signal === "fix_now")
|
|
203
|
+
return chalk.red(label);
|
|
204
|
+
if (signal === "fix_soon")
|
|
205
|
+
return chalk.yellow(label);
|
|
206
|
+
if (signal === "monitor")
|
|
207
|
+
return chalk.blue(label);
|
|
208
|
+
return chalk.gray(label);
|
|
209
|
+
}
|
|
195
210
|
export function printTable(findings, threshold, skippedKeys) {
|
|
196
|
-
const headers = ["Package", "Version", "Severity", "Type", "Root", "Usage", "Fixed", "IDs"];
|
|
211
|
+
const headers = ["Package", "Version", "Severity", "Type", "Root", "Usage", "Fixed", "EPSS", "EPSS Priority", "IDs"];
|
|
212
|
+
const rowSignals = [];
|
|
197
213
|
const rawRows = findings.map(f => {
|
|
198
214
|
let usageText = "n/a";
|
|
199
215
|
if (f.usage) {
|
|
@@ -220,6 +236,15 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
220
236
|
else {
|
|
221
237
|
fixedDisplay = chalk.yellow("⚠ no fix");
|
|
222
238
|
}
|
|
239
|
+
let epssDisplay = "-";
|
|
240
|
+
let signal = null;
|
|
241
|
+
if (f.epssScores && f.epssScores.length > 0) {
|
|
242
|
+
const best = f.epssScores.slice().sort((a, b) => b.percentile - a.percentile)[0];
|
|
243
|
+
epssDisplay = `${(best.epss * 100).toFixed(1)}%`;
|
|
244
|
+
signal = computePrioritySignal(f.severity, f.epssScores);
|
|
245
|
+
}
|
|
246
|
+
rowSignals.push(signal);
|
|
247
|
+
const priorityDisplay = signal ? PRIORITY_SIGNAL_TABLE_LABELS[signal] : "-";
|
|
223
248
|
return [
|
|
224
249
|
f.pkg.name,
|
|
225
250
|
f.pkg.version,
|
|
@@ -228,6 +253,8 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
228
253
|
formatRootDependencySummary(f),
|
|
229
254
|
usageText,
|
|
230
255
|
fixedDisplay,
|
|
256
|
+
epssDisplay,
|
|
257
|
+
priorityDisplay,
|
|
231
258
|
f.vulnerabilities.map(v => v.id).join(", ")
|
|
232
259
|
];
|
|
233
260
|
});
|
|
@@ -240,7 +267,7 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
240
267
|
console.log(line("┌", "┬", "┐"));
|
|
241
268
|
console.log(renderRow(headers, widths));
|
|
242
269
|
console.log(line("├", "┼", "┤"));
|
|
243
|
-
|
|
270
|
+
rawRows.forEach((row, idx) => {
|
|
244
271
|
let usageDecorated = String(row[5]);
|
|
245
272
|
if (usageDecorated.includes("file(s)"))
|
|
246
273
|
usageDecorated = chalk.red(usageDecorated);
|
|
@@ -256,10 +283,12 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
256
283
|
row[4],
|
|
257
284
|
usageDecorated,
|
|
258
285
|
row[6],
|
|
259
|
-
row[7]
|
|
286
|
+
chalk.gray(String(row[7])),
|
|
287
|
+
formatPrioritySignal(rowSignals[idx] ?? null),
|
|
288
|
+
row[9],
|
|
260
289
|
];
|
|
261
290
|
console.log(renderRow(decorated, widths));
|
|
262
|
-
}
|
|
291
|
+
});
|
|
263
292
|
console.log(line("└", "┴", "┘"));
|
|
264
293
|
const maliciousFindings = findings.filter(f => hasMaliciousAdvisory(f.vulnerabilities));
|
|
265
294
|
if (maliciousFindings.length > 0) {
|
|
@@ -433,6 +462,17 @@ export function printCompactOutput(findings, scanInput, options) {
|
|
|
433
462
|
}
|
|
434
463
|
console.log(`${formatSeverityLabel(sevLabel)} ${chalk.whiteBright(finding.pkg.name)}@${finding.pkg.version}`);
|
|
435
464
|
console.log(` ${typeLabel}${usageContext}`);
|
|
465
|
+
if (finding.epssScores && finding.epssScores.length > 0) {
|
|
466
|
+
const best = finding.epssScores.slice().sort((a, b) => b.percentile - a.percentile)[0];
|
|
467
|
+
const pct = (best.epss * 100).toFixed(1);
|
|
468
|
+
const top = ((1 - best.percentile) * 100);
|
|
469
|
+
const topStr = top < 0.01 ? "<0.01" : top < 1 ? top.toFixed(2) : top.toFixed(1);
|
|
470
|
+
console.log(` ${chalk.gray(`EPSS: ${pct}% exploitation probability - ${best.cve} (top ${topStr}% of all CVEs)`)}`);
|
|
471
|
+
const priority = computePrioritySignal(finding.severity, finding.epssScores);
|
|
472
|
+
if (priority === "fix_now") {
|
|
473
|
+
console.log(` ${chalk.red(PRIORITY_SIGNAL_LABELS.fix_now)} - ${PRIORITY_SIGNAL_DESCRIPTIONS[priority]}`);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
436
476
|
const isMalicious = hasMaliciousAdvisory(finding.vulnerabilities);
|
|
437
477
|
if (isMalicious) {
|
|
438
478
|
if (finding.maliciousUnverifiable) {
|
|
@@ -511,6 +551,11 @@ export function printCompactOutput(findings, scanInput, options) {
|
|
|
511
551
|
}
|
|
512
552
|
}
|
|
513
553
|
}
|
|
554
|
+
if (options?.licenseFindings) {
|
|
555
|
+
console.log(renderLicenseFindings(options.licenseFindings, { limitedToDirectOnly: !!options.licenseLimitedToDirectOnly }));
|
|
556
|
+
console.log("");
|
|
557
|
+
console.log("");
|
|
558
|
+
}
|
|
514
559
|
// Summary
|
|
515
560
|
console.log("────────────────────────────────");
|
|
516
561
|
console.log("Summary");
|
|
@@ -545,6 +590,16 @@ export function printCompactOutput(findings, scanInput, options) {
|
|
|
545
590
|
console.log(`${chalk.cyan(String(direct))} ${chalk.white("direct")}` +
|
|
546
591
|
`${chalk.gray(" · ")}` +
|
|
547
592
|
`${chalk.cyan(String(transitive))} ${chalk.white("transitive")}`);
|
|
593
|
+
if (options?.licenseFindings && options.licenseFindings.length > 0) {
|
|
594
|
+
const lHigh = options.licenseFindings.filter(f => f.severity === "high").length;
|
|
595
|
+
const lMed = options.licenseFindings.filter(f => f.severity === "medium").length;
|
|
596
|
+
const lParts = [];
|
|
597
|
+
if (lHigh > 0)
|
|
598
|
+
lParts.push(chalk.red(`${lHigh} high`));
|
|
599
|
+
if (lMed > 0)
|
|
600
|
+
lParts.push(chalk.yellow(`${lMed} medium`));
|
|
601
|
+
console.log(chalk.gray("⚖ Licenses: ") + lParts.join(chalk.gray(" · ")) + chalk.gray(" (informational)"));
|
|
602
|
+
}
|
|
548
603
|
const maliciousCompact = findings.filter(f => hasMaliciousAdvisory(f.vulnerabilities));
|
|
549
604
|
if (maliciousCompact.length > 0 && !options?.all) {
|
|
550
605
|
console.log("");
|
|
@@ -585,13 +640,13 @@ export function printCompactOutput(findings, scanInput, options) {
|
|
|
585
640
|
else {
|
|
586
641
|
console.log(chalk.yellow(`▲ Scan complete. ${findings.length} ${pluralize(findings.length, "issue")} found.`));
|
|
587
642
|
}
|
|
588
|
-
|
|
589
|
-
console.log(chalk.gray(`Run with ${chalk.whiteBright("--verbose")} for fix plan, paths, and full table.`));
|
|
590
|
-
}
|
|
643
|
+
printIncompleteDiagnostics(options?.completeness);
|
|
591
644
|
if (hasRemediationGap) {
|
|
592
645
|
console.log(chalk.yellow("⚠ Remediation guidance is incomplete."));
|
|
593
646
|
}
|
|
594
|
-
|
|
647
|
+
if (!options?.all) {
|
|
648
|
+
console.log(chalk.gray(`Run with ${chalk.whiteBright("--verbose")} for fix plan, paths, and full table.`));
|
|
649
|
+
}
|
|
595
650
|
if (options?.completeness?.complete !== false) {
|
|
596
651
|
console.log("");
|
|
597
652
|
}
|
|
@@ -599,12 +654,12 @@ export function printCompactOutput(findings, scanInput, options) {
|
|
|
599
654
|
export function printIncompleteDiagnostics(completeness) {
|
|
600
655
|
if (!completeness || completeness.complete)
|
|
601
656
|
return;
|
|
602
|
-
console.log("");
|
|
603
657
|
for (const diag of completeness.diagnostics) {
|
|
604
|
-
const
|
|
605
|
-
console.log(
|
|
658
|
+
const color = diag.impact === "detection" ? chalk.yellow : chalk.gray;
|
|
659
|
+
console.log(color(`⚠ ${diag.message}`));
|
|
606
660
|
}
|
|
607
|
-
console.log(
|
|
661
|
+
console.log("");
|
|
662
|
+
console.log(chalk.gray("Resolve the issues above and re-run the scan."));
|
|
608
663
|
}
|
|
609
664
|
function renderSeverityTable(counts) {
|
|
610
665
|
const labels = ["Critical", "High", "Medium", "Low", "Unknown"];
|