You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+130-9Lines changed: 130 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,29 @@
27
27
28
28
**CVE Lite CLI** helps developers scan their projects for known package vulnerabilities without signing up for an expensive platform. It is built for the moment right before release, when you want a clear answer, a practical fix plan, and a tool you can actually afford to use.
29
29
30
+
## New: Offline advisory DB support
31
+
32
+
CVE Lite CLI now supports a local advisory database workflow for teams that cannot allow runtime outbound advisory API calls.
33
+
34
+
That means you can:
35
+
36
+
- sync advisory data ahead of time
37
+
- scan projects fully offline
38
+
- use the tool in restricted, enterprise, or air-gapped environments more easily
- top-priority fixes and a suggested remediation plan
147
179
- JSON and SARIF output for automation
180
+
- offline scanning through a local advisory database
148
181
- configurable advisory endpoint support via `--osv-url` for internal proxies or mirrors
149
182
- a small, reviewable runtime footprint
150
183
@@ -166,19 +199,73 @@ This section is here to make the scope clear. CVE Lite CLI aims to complement th
166
199
167
200
## Network behavior and privacy
168
201
169
-
CVE Lite CLI is a local-first scanner. It parses dependency information locally, uses local caching to reduce repeated lookups, and in standard mode queries OSV for advisory data needed for matching.
202
+
CVE Lite CLI is a local-first scanner. It parses dependency information locally, uses local caching to reduce repeated lookups, and in standard mode queries OSV for advisory data needed for matching. It also now supports a local advisory database workflow for offline scans with zero runtime advisory API calls.
170
203
171
204
It does not require a hosted account, cloud dashboard, or source code upload.
172
205
173
206
For the full explanation, see [Network Behavior and Privacy](https://github.com/sonukapoor/cve-lite-cli/blob/main/src/docs/network-and-privacy.md).
174
207
175
-
### Planned support for stricter environments
208
+
### Offline workflow
209
+
210
+
For teams in controlled or restricted environments, the intended model is:
211
+
212
+
1. sync advisory data into a local database
213
+
2. distribute that database as needed
214
+
3. scan projects using the local DB instead of runtime OSV API calls
Support for stricter network-controlled environments is planned on the roadmap, including:
236
+
```bash
237
+
cve-lite . --offline-db /path/to/advisories.db
238
+
```
239
+
240
+
Keep the local advisory DB fresh with a scheduled job when needed. For example, teams can run a cron job, CI job, or other scheduler to refresh the advisory DB periodically:
The local advisory DB is only as current as the last successful sync.
257
+
258
+
For now, the recommended model is:
178
259
179
-
- offline scanning mode with zero outbound calls
180
-
- custom advisory endpoint support for internal mirrors or proxies
181
-
- local advisory database input for controlled or air-gapped workflows
260
+
- sync the advisory DB on a schedule using cron, CI, or another automation system
261
+
- distribute the refreshed DB where needed
262
+
- run offline scans against that updated DB
263
+
264
+
A future improvement is to add built-in advisory DB freshness metadata, such as:
265
+
266
+
- last sync timestamp reporting
267
+
- a TTL-style warning when the DB is older than a recommended threshold
268
+
- clearer CLI guidance when a local advisory DB should be refreshed
182
269
183
270
## Detecting malicious package incidents
184
271
@@ -209,6 +296,7 @@ CVE Lite CLI is designed as a **local-first, metadata-only** scanner. Unlike tra
209
296
***Lockfile-Driven Accuracy:** By parsing `package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`, the tool avoids the "it works on my machine" discrepancy. It scans the *exact* dependency tree that will be deployed.
210
297
***Intelligent Triage:** The Analysis engine utilizes the lockfile's graph structure to distinguish between dependencies you manage directly and those brought in by third-party packages (transitive). This allows for a "Fix the Root" strategy rather than chasing individual nested vulnerabilities.
211
298
***Performance Optimization:** A local TTL (Time-To-Live) cache stores advisory results. This ensures that subsequent scans—common in iterative development or CI/CD retry loops—are near-instant and respect external API rate limits.
299
+
***Offline-Capable Advisory Flow:** Advisory data can be synced into a local SQLite database and reused for offline scans with zero runtime advisory API calls.
212
300
***Standards-Based Output:** Results are natively available in **SARIF (Static Analysis Results Interchange Format)** and **JSON**, ensuring compatibility with modern DevSecOps dashboards and IDE integrations.
213
301
214
302
## What makes it stand out
@@ -225,6 +313,8 @@ CVE Lite CLI is designed as a **local-first, metadata-only** scanner. Unlike tra
225
313
It is intended for developers and teams who want useful security checks without paying for a large commercial product.
226
314
-**local-first**
227
315
It reads your project locally and uses package/version matching against OSV advisories.
316
+
-**offline-capable**
317
+
It can sync and scan against a local advisory database for zero-runtime-network workflows.
228
318
-**release-focused**
229
319
It is especially useful before a release, in CI, or during final dependency cleanup.
The CLI can be used in CI/CD pipelines and can fail builds based on severity thresholds.
291
381
292
-
### 9. Local cache
382
+
### 9. Offline advisory DB support
383
+
384
+
The CLI can sync the official OSV npm advisory dump into a local SQLite advisory database and scan against it later with zero runtime advisory API calls.
385
+
386
+
That makes it more practical for:
387
+
388
+
- enterprise environments
389
+
- restricted CI systems
390
+
- air-gapped workflows
391
+
- teams that want explicit local advisory control
392
+
393
+
### 10. Local cache
293
394
294
395
It caches advisory detail results locally so repeated scans are faster and make fewer repeated requests.
295
396
296
-
### 10. Clear final scan status
397
+
### 11. Clear final scan status
297
398
298
399
At the end of each run, CVE Lite CLI prints a short final status line so users immediately know whether the scan was clean or whether they should start with the priority fixes above.
299
400
300
-
### 11. Small runtime footprint
401
+
### 12. Small runtime footprint
301
402
302
403
This project intentionally keeps runtime dependencies minimal to reduce attack surface and keep the tool easier to review.
303
404
@@ -308,6 +409,8 @@ CVE Lite CLI is intentionally designed with a very small dependency surface.
308
409
**Runtime dependencies**
309
410
-`yaml`
310
411
-`yarn-lockfile`
412
+
-`better-sqlite3`
413
+
-`fflate`
311
414
312
415
**Development dependencies**
313
416
-`@types/node`
@@ -326,13 +429,21 @@ CVE Lite CLI is a good fit for:
326
429
- teams that want a lightweight dependency scan in CI
327
430
- developers who want a second opinion alongside other tools
328
431
- OSS maintainers who need a practical scan before publishing
432
+
- teams that need offline or controlled-network dependency scanning
329
433
330
434
## Supported workflows
331
435
332
436
### Local development
333
437
334
438
Run it before a release, during dependency cleanup, or after a major package upgrade.
335
439
440
+
For offline-capable local workflows:
441
+
442
+
```bash
443
+
cve-lite advisories sync
444
+
cve-lite . --offline
445
+
```
446
+
336
447
### CI/CD
337
448
338
449
This repository also uses CVE Lite CLI in its own GitHub Actions workflow to scan itself as part of CI. See [`self-scan.yml`](https://github.com/sonukapoor/cve-lite-cli/blob/main/.github/workflows/self-scan.yml).
@@ -359,6 +470,13 @@ Use JSON output for custom reporting:
359
470
cve-lite . --json > cve-lite-report.json
360
471
```
361
472
473
+
Use an offline local advisory DB in controlled environments:
CVE Lite CLI is not trying to be everything for everyone. It is designed to be one of the easiest and most actionable vulnerability scanners for JavaScript and TypeScript developers who want fast release-time checks without the cost and complexity of a full security platform.
@@ -376,6 +494,7 @@ Compared with other tools in this space, CVE Lite CLI focuses on:
376
494
- support for **npm**, **pnpm**, and **Yarn** lockfiles
377
495
-**SARIF** and **JSON** output for CI and automation
378
496
- a **lightweight**, **security-conscious** dependency footprint
497
+
-**offline local advisory DB support** for controlled environments
379
498
- a **developer-friendly** option for teams that want useful **CVE scanning without paying for a larger commercial product**
380
499
381
500
### At a glance
@@ -451,6 +570,7 @@ To keep the project honest, here is what it does **not** do in the current versi
451
570
- it does not scan container images, binaries, secrets, or IaC
452
571
- it does not replace a full application security program
453
572
- it is currently focused on JS/TS dependency scanning
573
+
- local advisory sync performance will need continued optimization as the advisory dataset grows
454
574
455
575
## Positioning
456
576
@@ -471,6 +591,7 @@ CVE Lite CLI is evolving from a vulnerability scanner into a comprehensive remed
471
591
***Official GitHub Action:** Create a dedicated Action for one-line setup in CI/CD pipelines.
472
592
***Expanded Lockfile Support:** Introduce parsers for emerging JS/TS ecosystems, including `bun.lockb`.
473
593
***IDE Integration:** Develop a lightweight extension to highlight vulnerable packages directly within the code editor.
594
+
***Workflow Integration Guidance:** Expand official workflow patterns for local scripts, hooks, CI, and offline developer adoption.
474
595
475
596
### Phase 3: Maturity & Compliance (Long-Term)
476
597
***Standardized SBOM Support:** Add the ability to export findings as an **SBOM (Software Bill of Materials)** in CycloneDX or SPDX formats.
0 commit comments