cve-lite-cli 1.17.3 → 1.18.1

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 CHANGED
@@ -210,6 +210,10 @@ CVE Lite CLI has been evaluated against real open-source projects to verify that
210
210
  - [NestJS](https://owasp.org/cve-lite-cli/docs/case-studies/nestjs) — working through a real transitive dependency remediation sequence across a widely-used Node.js framework
211
211
  - [Analog](https://owasp.org/cve-lite-cli/docs/case-studies/analog) — scanning a modern pnpm v9 Angular monorepo (3,367 packages) with unexpected toolchain vulnerabilities
212
212
  - [Ghost](https://owasp.org/cve-lite-cli/docs/case-studies/ghost) — 26 vulnerable packages across 4,447 resolved in a professionally maintained CMS — every one transitive, including a critical XSS in the library responsible for making user content safe
213
+ - [Astro](https://owasp.org/cve-lite-cli/docs/case-studies/astro) — verified baseline scan of a modern pnpm monorepo (2,228 packages, 34 findings at revision `221bb4b`) with a critical transitive SDK chain and four generated fix command groups
214
+ - [Turborepo](https://owasp.org/cve-lite-cli/docs/case-studies/turborepo) — verified baseline scan of a build-system pnpm monorepo (1,776 packages, 13 findings at revision `c85d410`) with a critical no-fix sandbox beta, all-transitive risk, and zero auto-generated fix commands on this snapshot
215
+
216
+ In-repo lockfile fixtures for Astro and Turborepo live under [`examples/`](examples/readme.md) — clone the repo and scan immediately without downloading full upstream checkouts.
213
217
 
214
218
  These are not demos. They are documented scans against real codebases with real findings, recorded before and after applying fix commands.
215
219
 
@@ -217,6 +221,14 @@ If you maintain an open-source JavaScript or TypeScript project and want CVE Lit
217
221
 
218
222
  ## Press
219
223
 
224
+ - **[OWASP Adopts CVE Lite CLI to Boost Dependency Scanning](https://devops.com/owasp-adopts-cve-lite-cli-to-boost-dependency-scanning/)** — DevOps.com, May 2026
225
+ - **[CVE Lite CLI repère les dépendances à risque](https://www.lemondeinformatique.fr/actualites/lire-cve-lite-cli-repere-les-dependances-a-risque-100270.html)** — Le Monde Informatique (France), May 2026
226
+ - **[Lieferketten-Angriff: 5.500 GitHub-Repos in 6 Stunden kompromittiert](https://www.ad-hoc-news.de/wissenschaft/lieferketten-angriff-5-500-github-repos-in-6-stunden-kompromittiert/69418833)** — ad-hoc-news (Germany), May 2026 (references CVE Lite CLI)
227
+ - **[AIがコーディングを加速する中、CVE Lite CLIはセキュリティを意図的にAI無しに保つ](https://blackhatnews.tokyo/archives/104903)** — TokyoBlackHatNews (Japan), May 2026
228
+ - **[The postcss That Would Not Die, and How CVE Lite Ended My Override Grind](https://labs.hexaxia.tech/blog/hexops-cve-lite-integration/)** — Hexaxia Labs (Aaron Lamb), May 2026
229
+ - **[As AI speeds coding, CVE Lite CLI keeps security deliberately AI-free](https://www.csoonline.com/article/4176701/as-ai-speeds-coding-cve-lite-cli-keeps-security-deliberately-ai-free.html)** — CSO Online (Shweta Sharma), May 2026
230
+ - **[CVE Lite CLI: The Dependency Scanner That Actually Tells You What to Run](https://medium.com/@techlatest.net/cve-lite-cli-the-dependency-scanner-that-actually-tells-you-what-to-run-not-just-whats-broken-f6b518199981)** — Medium (TechLatest.Net), May 2026
231
+ - **[AI Security Is Changing Fast — These 6 Open-Source Tools Prove It](https://medium.com/@techlatest.net/ai-security-is-changing-fast-these-6-open-source-tools-prove-it-5c5c9081cff7)** — Medium (TechLatest.Net), May 2026
220
232
  - **[CVE Lite CLI: Open-source dependency vulnerability scanner](https://www.helpnetsecurity.com/2026/05/20/cve-lite-cli-open-source-dependency-vulnerability-scanner/)** — Help Net Security, May 2026
221
233
  - **[Review of CVE Lite CLI](https://developmentcurated.com/testing-and-security/review-of-cve-lite-cli/)** — Development Curated (Sebastian Raiffen, IT Security Consultant), April 2026
222
234
 
@@ -407,6 +419,8 @@ It is a good fit for:
407
419
 
408
420
  See the [CI and Workflow Integration guide](https://owasp.org/cve-lite-cli/docs/ci-integration) for concrete patterns across these scenarios.
409
421
 
422
+ Using CVE Lite CLI at your company or in your projects? [Share your use case in the community thread](https://github.com/OWASP/cve-lite-cli/discussions/481) - we'd love to hear about it.
423
+
410
424
  ## Current limitations
411
425
 
412
426
  - does not detect malicious packages before they appear in advisory data
@@ -3,6 +3,7 @@ import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { unzipSync } from "fflate";
5
5
  import { LocalAdvisoryDatabase } from "./local-db.js";
6
+ import { pluralize } from "../utils/string.js";
6
7
  const DEFAULT_OSV_NPM_DUMP_URL = "https://storage.googleapis.com/osv-vulnerabilities/npm/all.zip";
7
8
  export const ADVISORY_DB_STALE_AFTER_MS = 7 * 24 * 60 * 60 * 1000;
8
9
  export function getDefaultAdvisoryDbPath(outputPath) {
@@ -61,7 +62,7 @@ export async function syncOsvAdvisories(options = {}) {
61
62
  phase: "extract",
62
63
  totalEntries: Object.keys(archiveEntries).length,
63
64
  advisoryEntries: advisoryEntries.length,
64
- message: `Archive loaded. Processing ${advisoryEntries.length} advisory record${advisoryEntries.length === 1 ? "" : "s"}`,
65
+ message: `Archive loaded. Processing ${advisoryEntries.length} advisory ${pluralize(advisoryEntries.length, "record")}`,
65
66
  });
66
67
  await yieldToEventLoop();
67
68
  const db = new LocalAdvisoryDatabase(dbPath);
@@ -104,7 +105,7 @@ export async function syncOsvAdvisories(options = {}) {
104
105
  phase: "complete",
105
106
  advisoryCount,
106
107
  dbPath,
107
- message: `Sync complete. Stored ${advisoryCount} advisory record${advisoryCount === 1 ? "" : "s"} in ${dbPath}`,
108
+ message: `Sync complete. Stored ${advisoryCount} advisory ${pluralize(advisoryCount, "record")} in ${dbPath}`,
108
109
  });
109
110
  return { advisoryCount, dbPath, sourceUrl };
110
111
  }
package/dist/cli/args.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { ConfigAction, ConfigKey } from "./config.js";
1
2
  export function parseArgs(argv) {
2
3
  const options = {
3
4
  failOn: "critical",
@@ -24,8 +25,23 @@ export function parseArgs(argv) {
24
25
  options.output = arg.slice("--output=".length);
25
26
  continue;
26
27
  }
27
- if (arg.startsWith("-"))
28
+ if (arg === "--ca-cert") {
29
+ const val = argv[++i];
30
+ if (!val)
31
+ throw new Error("--ca-cert requires a path argument");
32
+ options.caCert = val;
33
+ continue;
34
+ }
35
+ if (arg.startsWith("--ca-cert=")) {
36
+ const val = arg.slice("--ca-cert=".length);
37
+ if (!val)
38
+ throw new Error("--ca-cert requires a path argument");
39
+ options.caCert = val;
40
+ continue;
41
+ }
42
+ if (arg.startsWith("-")) {
28
43
  throw new Error(`Unknown option: ${arg}`);
44
+ }
29
45
  throw new Error(`Unexpected argument: ${arg}`);
30
46
  }
31
47
  return { command: "advisories-sync", options };
@@ -37,12 +53,35 @@ export function parseArgs(argv) {
37
53
  options.help = true;
38
54
  continue;
39
55
  }
40
- if (arg.startsWith("-"))
56
+ if (arg.startsWith("-")) {
41
57
  throw new Error(`Unknown option: ${arg}`);
58
+ }
42
59
  throw new Error(`Unexpected argument: ${arg}`);
43
60
  }
44
61
  return { command: "install-skill", options };
45
62
  }
63
+ if (argv[0] === "config") {
64
+ const sub = argv[1];
65
+ if (sub === ConfigAction.Show) {
66
+ return { command: "config", options, configSubcommand: { action: ConfigAction.Show } };
67
+ }
68
+ if (sub === ConfigAction.Set) {
69
+ const key = argv[2];
70
+ const value = argv[3];
71
+ if (key !== ConfigKey.CaCert)
72
+ throw new Error(`Unknown config key: ${key ?? "(none)"}. Valid keys: ${ConfigKey.CaCert}`);
73
+ if (!value)
74
+ throw new Error(`cve-lite config set ${ConfigKey.CaCert} requires a path argument`);
75
+ return { command: "config", options, configSubcommand: { action: ConfigAction.Set, key: ConfigKey.CaCert, value } };
76
+ }
77
+ if (sub === ConfigAction.Unset) {
78
+ const key = argv[2];
79
+ if (key !== ConfigKey.CaCert)
80
+ throw new Error(`Unknown config key: ${key ?? "(none)"}. Valid keys: ${ConfigKey.CaCert}`);
81
+ return { command: "config", options, configSubcommand: { action: ConfigAction.Unset, key: ConfigKey.CaCert } };
82
+ }
83
+ throw new Error(`Unknown config subcommand: ${sub ?? "(none)"}. Use: ${ConfigAction.Set}, ${ConfigAction.Unset}, ${ConfigAction.Show}`);
84
+ }
46
85
  let projectArg;
47
86
  for (let i = 0; i < argv.length; i++) {
48
87
  const arg = argv[i];
@@ -174,6 +213,17 @@ export function parseArgs(argv) {
174
213
  options.noCache = true;
175
214
  continue;
176
215
  }
216
+ if (arg === "--ca-cert") {
217
+ const val = argv[++i];
218
+ if (!val)
219
+ throw new Error("--ca-cert requires a path argument");
220
+ options.caCert = val;
221
+ continue;
222
+ }
223
+ if (arg.startsWith("--ca-cert=")) {
224
+ options.caCert = arg.slice("--ca-cert=".length);
225
+ continue;
226
+ }
177
227
  if (arg === "--sarif") {
178
228
  options.sarif = true;
179
229
  continue;
@@ -182,8 +232,9 @@ export function parseArgs(argv) {
182
232
  options.cdx = true;
183
233
  continue;
184
234
  }
185
- if (arg.startsWith("-"))
235
+ if (arg.startsWith("-")) {
186
236
  throw new Error(`Unknown option: ${arg}`);
237
+ }
187
238
  if (!projectArg) {
188
239
  projectArg = arg;
189
240
  continue;
@@ -0,0 +1,40 @@
1
+ import { chalk } from "../utils/chalk.js";
2
+ import { readConfig, writeConfig, getConfigPath, validateCaCertFile, ConfigAction, ConfigKey } from "./config.js";
3
+ export function runConfigCommand(sub) {
4
+ if (sub.action === ConfigAction.Show) {
5
+ const config = readConfig();
6
+ const keys = Object.keys(config);
7
+ if (keys.length === 0) {
8
+ console.log("No configuration set.");
9
+ console.log(chalk.gray(`Config file: ${getConfigPath()}`));
10
+ return;
11
+ }
12
+ console.log(chalk.gray(`Config file: ${getConfigPath()}`));
13
+ console.log("");
14
+ if (config.caCert) {
15
+ console.log(` ${chalk.bold(ConfigKey.CaCert)} ${chalk.cyan(config.caCert)}`);
16
+ }
17
+ return;
18
+ }
19
+ if (sub.action === ConfigAction.Set && sub.key === ConfigKey.CaCert) {
20
+ validateCaCertFile(sub.value);
21
+ const config = readConfig();
22
+ config.caCert = sub.value;
23
+ writeConfig(config);
24
+ console.log(`${chalk.green("✔")} Saved: ${chalk.bold(ConfigKey.CaCert)} = ${chalk.cyan(sub.value)}`);
25
+ console.log(chalk.gray(`Config file: ${getConfigPath()}`));
26
+ return;
27
+ }
28
+ if (sub.action === ConfigAction.Unset && sub.key === ConfigKey.CaCert) {
29
+ const config = readConfig();
30
+ if (!config.caCert) {
31
+ console.log(`${chalk.bold(ConfigKey.CaCert)} is not set.`);
32
+ return;
33
+ }
34
+ delete config.caCert;
35
+ writeConfig(config);
36
+ console.log(`${chalk.green("✔")} Removed: ${chalk.bold(ConfigKey.CaCert)}`);
37
+ console.log(chalk.gray(`Config file: ${getConfigPath()}`));
38
+ return;
39
+ }
40
+ }
@@ -0,0 +1,66 @@
1
+ import fs from "node:fs";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ export const ConfigAction = {
5
+ Set: "set",
6
+ Unset: "unset",
7
+ Show: "show",
8
+ };
9
+ export const ConfigKey = {
10
+ CaCert: "ca-cert",
11
+ };
12
+ export function getConfigDir() {
13
+ return path.join(os.homedir(), ".cve-lite-cli");
14
+ }
15
+ export function getConfigPath() {
16
+ return path.join(getConfigDir(), "config.json");
17
+ }
18
+ export function readConfig() {
19
+ const configPath = getConfigPath();
20
+ try {
21
+ const raw = fs.readFileSync(configPath, "utf8");
22
+ const parsed = JSON.parse(raw);
23
+ if (typeof parsed !== "object" || parsed === null)
24
+ return {};
25
+ const config = {};
26
+ if (typeof parsed.caCert === "string") {
27
+ config.caCert = parsed.caCert;
28
+ }
29
+ return config;
30
+ }
31
+ catch {
32
+ return {};
33
+ }
34
+ }
35
+ export function validateCaCertFile(filePath) {
36
+ let stat;
37
+ try {
38
+ stat = fs.statSync(filePath);
39
+ }
40
+ catch {
41
+ throw new Error(`cannot read file: ${filePath}`);
42
+ }
43
+ if (!stat.isFile()) {
44
+ throw new Error(`not a file: ${filePath}`);
45
+ }
46
+ let content;
47
+ try {
48
+ content = fs.readFileSync(filePath, "utf8");
49
+ }
50
+ catch {
51
+ throw new Error(`cannot read file: ${filePath}`);
52
+ }
53
+ if (content.trim().length === 0) {
54
+ throw new Error(`file is empty: ${filePath}`);
55
+ }
56
+ if (!content.trimStart().startsWith("-----BEGIN")) {
57
+ throw new Error(`not a valid PEM certificate (expected file to start with -----BEGIN): ${filePath}`);
58
+ }
59
+ }
60
+ export function writeConfig(config) {
61
+ const configDir = getConfigDir();
62
+ if (!fs.existsSync(configDir)) {
63
+ fs.mkdirSync(configDir, { recursive: true });
64
+ }
65
+ fs.writeFileSync(getConfigPath(), JSON.stringify(config, null, 2) + "\n", "utf8");
66
+ }
package/dist/cli/help.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { chalk } from "../utils/chalk.js";
2
2
  import { getCliVersion } from "../utils/version-info.js";
3
+ import { checkForUpdate } from "../utils/update-check.js";
3
4
  const CLI_VERSION = getCliVersion();
4
5
  const CLI_BANNER = [
5
6
  `${chalk.green(">_")} ${chalk.bold.whiteBright(`CVE Lite CLI (${CLI_VERSION})`)}`,
@@ -15,6 +16,7 @@ export function printBanner(options) {
15
16
  return;
16
17
  console.log(CLI_BANNER);
17
18
  console.log("");
19
+ checkForUpdate(options);
18
20
  }
19
21
  export function printHelp() {
20
22
  printBanner();
@@ -29,6 +31,7 @@ export function printHelp() {
29
31
  " cve-lite [projectPath] [options]",
30
32
  " cve-lite advisories sync [options]",
31
33
  " cve-lite install-skill",
34
+ " cve-lite config <set|unset|show> [key] [value]",
32
35
  "",
33
36
  "Scan options:",
34
37
  " --json Save scan results to a timestamped JSON file",
@@ -38,6 +41,7 @@ export function printHelp() {
38
41
  " --no-open Don't auto-open the report in the browser",
39
42
  " --fix Apply validated direct dependency fixes and rescan",
40
43
  " --osv-url <url> Use a custom OSV-compatible advisory endpoint",
44
+ " --ca-cert <path> Path to a CA certificate file for corporate SSL proxies",
41
45
  " --verbose Show detailed output with fix plan, paths, and full table",
42
46
  " --prod-only Exclude dev dependencies where available",
43
47
  " --fail-on <severity> Exit non-zero at or above severity (default: critical)",
@@ -59,6 +63,10 @@ export function printHelp() {
59
63
  " install-skill Install AI assistant skill files for Claude Code,",
60
64
  " Codex CLI, Gemini CLI, Cursor, and GitHub Copilot",
61
65
  "",
66
+ " config set ca-cert <path> Save a CA certificate path to ~/.cve-lite-cli/config.json",
67
+ " config unset ca-cert Remove the saved CA certificate path",
68
+ " config show Show current configuration",
69
+ "",
62
70
  " -v, --version Show the CLI version",
63
71
  " -h, --help Show this help message"
64
72
  ];
@@ -0,0 +1,31 @@
1
+ import { validateCaCertFile } from "./config.js";
2
+ export function validateOptions(options) {
3
+ if ((options.offline || options.offlineDb) && options.osvUrl) {
4
+ throw new Error("--offline/--offline-db cannot be used with --osv-url");
5
+ }
6
+ if (options.noCache && (options.offline || options.offlineDb)) {
7
+ throw new Error("--no-cache cannot be used with --offline or --offline-db");
8
+ }
9
+ if (options.osvUrl) {
10
+ try {
11
+ new URL(options.osvUrl);
12
+ }
13
+ catch {
14
+ throw new Error(`Invalid value for --osv-url: ${options.osvUrl}`);
15
+ }
16
+ }
17
+ if (options.fix && options.json) {
18
+ throw new Error("--fix cannot be used with --json");
19
+ }
20
+ if (options.report && options.json) {
21
+ throw new Error("--report cannot be used with --json");
22
+ }
23
+ if (options.caCert) {
24
+ try {
25
+ validateCaCertFile(options.caCert);
26
+ }
27
+ catch (err) {
28
+ throw new Error(`--ca-cert: ${err instanceof Error ? err.message : String(err)}`);
29
+ }
30
+ }
31
+ }
package/dist/constants.js CHANGED
@@ -6,6 +6,8 @@ export const severityOrder = {
6
6
  critical: 4,
7
7
  unknown: 1
8
8
  };
9
+ export const DEFAULT_BATCH_SIZE = 100;
10
+ export const DEFAULT_SEARCH_DEPTH = 4;
9
11
  export const EXCLUDED_DIRS = new Set([
10
12
  ".git",
11
13
  "node_modules",