cve-lite-cli 1.5.3 → 1.5.4

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.
@@ -19,6 +19,9 @@ export function inferSeverity(vuln) {
19
19
  }
20
20
  const db = vuln.database_specific;
21
21
  const dbSeverity = String(db?.severity ?? "").toLowerCase();
22
+ // OSV uses "MODERATE" where our label is "medium".
23
+ if (dbSeverity === "moderate")
24
+ return "medium";
22
25
  if (["critical", "high", "medium", "low"].includes(dbSeverity)) {
23
26
  return dbSeverity;
24
27
  }
@@ -130,7 +130,8 @@ export function printSuggestedFixCommands(findings, scanInput) {
130
130
  for (const section of plan.sections) {
131
131
  console.log("");
132
132
  console.log(colorFixSectionTitle(section.severity, section.title));
133
- if (section.kind === "direct" || section.kind === "direct-adjusted") {
133
+ const hasDirectTargets = section.targets.some(t => t.kind === "direct");
134
+ if (section.kind === "direct" || section.kind === "direct-adjusted" || (section.kind === "urgent" && hasDirectTargets)) {
134
135
  const validationSummary = summarizeAdjustedValidation(section.targets);
135
136
  const remainingNotes = [];
136
137
  printDirectTargetsTable(section.targets, remainingNotes, validationSummary, sharedDirectTableWidths);
@@ -149,7 +150,10 @@ export function printSuggestedFixCommandSkips(findings, scanInput) {
149
150
  if (!plan || plan.skipped.length === 0)
150
151
  return;
151
152
  const unpublishable = plan.skipped.filter(skipped => skipped.reason.includes("not published on npm"));
152
- const remaining = plan.skipped.filter(skipped => !skipped.reason.includes("not published on npm"));
153
+ // Only surface direct-dependency skips here. Transitive findings without an
154
+ // auto-fix path are already covered by the fix plan step 2 ("Review these urgent
155
+ // transitive issues"), so repeating them here creates confusing duplication.
156
+ const remaining = plan.skipped.filter(skipped => !skipped.reason.includes("not published on npm") && skipped.relationship === "direct");
153
157
  if (unpublishable.length > 0) {
154
158
  console.log("");
155
159
  console.log(chalk.gray("Unpublishable fixed-version hints:"));
@@ -162,7 +166,7 @@ export function printSuggestedFixCommandSkips(findings, scanInput) {
162
166
  }
163
167
  if (remaining.length > 0) {
164
168
  console.log("");
165
- console.log(chalk.gray("Not included automatically:"));
169
+ console.log(chalk.gray("No auto-fix command available for these direct dependencies:"));
166
170
  for (const skipped of remaining.slice(0, 5)) {
167
171
  console.log(`- ${skipped.package}@${skipped.version}: ${skipped.reason}`);
168
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cve-lite-cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Developer-friendly CLI for scanning JS/TS projects for dependency vulnerabilities using local lockfiles and OSV",
5
5
  "type": "module",
6
6
  "bin": {