cve-lite-cli 1.0.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +267 -0
  3. package/dist/index.js +1324 -0
  4. package/package.json +43 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,267 @@
1
+ # CVE Lite CLI
2
+
3
+ Fast, developer-friendly vulnerability scanning for JavaScript and TypeScript projects.
4
+
5
+ **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.
6
+
7
+ ## What it looks like
8
+
9
+ Below is a real example of the console experience. In a terminal, the severity labels, summaries, and section headers are colorized for readability.
10
+
11
+ ![Image 1](image-1.png)
12
+ ![Image 2](image-2.png)
13
+
14
+ That is the core idea: install it, point it at your project, and immediately get a practical fix plan instead of a wall of raw advisories.
15
+
16
+ The final status line also gives the scan a clear ending, which makes terminal use and screenshots easier to read.
17
+
18
+ ## Why this tool exists
19
+
20
+ A lot of developers want to ship safely, but they do not want to:
21
+ - pay for a full security platform just to run a dependency scan
22
+ - fight through noisy output that does not explain what to fix first
23
+ - depend on a tool that feels heavier than the app they are building
24
+
25
+ CVE Lite CLI focuses on a simple goal:
26
+
27
+ **Give developers a fast, understandable way to find known dependency vulnerabilities and take action before release.**
28
+
29
+ ## What makes it stand out
30
+
31
+ CVE Lite CLI is designed to be:
32
+
33
+ - **easy to run**
34
+ Point it at a project and scan.
35
+
36
+ - **easy to understand**
37
+ It does not just dump advisories. It highlights priorities, explains direct vs transitive findings, and suggests what to fix first.
38
+
39
+ - **developer-first**
40
+ It is optimized for developers working with npm, pnpm, and Yarn lockfiles.
41
+
42
+ - **budget-friendly**
43
+ It is intended for developers and teams who want useful security checks without paying for a large commercial product.
44
+
45
+ - **local-first**
46
+ It reads your project locally and uses package/version matching against OSV advisories.
47
+
48
+ - **release-focused**
49
+ It is especially useful before a release, in CI, or during final dependency cleanup.
50
+
51
+ ## Core features
52
+
53
+ ### 1. Lockfile-based scanning
54
+
55
+ CVE Lite CLI scans resolved dependency versions from:
56
+
57
+ - `package-lock.json`
58
+ - `pnpm-lock.yaml`
59
+ - `yarn.lock`
60
+
61
+ It also supports a limited `package.json` fallback for exact pinned direct dependencies.
62
+
63
+ ### 2. Clear vulnerability output
64
+
65
+ Instead of only showing advisory IDs, the CLI reports:
66
+
67
+ - package name and version
68
+ - severity
69
+ - direct vs transitive relationship
70
+ - fixed-version hint when available
71
+ - advisory IDs
72
+ - dependency path hints
73
+
74
+ ### 3. Top priority fixes
75
+
76
+ The CLI highlights the most important issues first, so developers can focus on the findings most likely to matter immediately.
77
+
78
+ ### 4. Suggested fix plan
79
+
80
+ CVE Lite CLI organizes likely remediation work into a practical sequence, such as:
81
+
82
+ - direct critical and high issues first
83
+ - urgent transitive issues next
84
+ - medium direct cleanup after that
85
+ - duplicated vulnerable packages to consolidate
86
+
87
+ ### 5. Parent package hints for transitive issues
88
+
89
+ For transitive vulnerabilities, the tool can point to the likely parent dependency to review. That makes the output more actionable than simply saying a nested package is vulnerable.
90
+
91
+ ### 6. JSON output
92
+
93
+ Structured JSON output makes it easier to integrate with scripts, logs, or pipeline artifacts.
94
+
95
+ ### 7. SARIF output
96
+
97
+ CVE Lite CLI supports SARIF (Static Analysis Results Interchange Format) output for security tooling and code-scanning workflows. SARIF is a standardized JSON-based format for security and code analysis results, which means CI systems, scanners, and code analysis platforms can all understand the same output without custom adapters. This is important because it makes CVE Lite CLI more than just a terminal tool: you can export findings into a format that fits modern DevSecOps workflows, archive results as build artifacts, and integrate vulnerability scans into automated release pipelines. For developers and teams, SARIF support helps security results travel cleanly from a local scan into CI/CD and other tooling, instead of being trapped in plain console output.
98
+
99
+ Example:
100
+
101
+ ```bash
102
+ cve-lite /path/to/project --sarif --output reports/scan.sarif
103
+ ```
104
+
105
+ ### 8. CI-friendly behavior
106
+
107
+ The CLI can be used in CI/CD pipelines and can fail builds based on severity thresholds.
108
+
109
+ ### 9. Local cache
110
+
111
+ It caches advisory detail results locally so repeated scans are faster and make fewer repeated requests.
112
+
113
+ ### 10. Clear final scan status
114
+
115
+ 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.
116
+
117
+ ### 11. Small runtime footprint
118
+
119
+
120
+ This project intentionally keeps runtime dependencies minimal to reduce attack surface and keep the tool easier to review.
121
+
122
+ ## Example use cases
123
+
124
+ CVE Lite CLI is a good fit for:
125
+
126
+ - independent developers shipping side projects
127
+ - startups watching every tool budget
128
+ - consultants doing release checks for client projects
129
+ - teams that want a lightweight dependency scan in CI
130
+ - developers who want a second opinion alongside other tools
131
+ - OSS maintainers who need a practical scan before publishing
132
+
133
+ ## Install
134
+
135
+ ### Global install
136
+
137
+ ```bash
138
+ npm install -g cve-lite-cli
139
+ ```
140
+
141
+ Then run:
142
+
143
+ ```bash
144
+ cve-lite /path/to/project
145
+ ```
146
+
147
+ ### One-off run with npx
148
+
149
+ ```bash
150
+ npx cve-lite-cli /path/to/project
151
+ ```
152
+
153
+ ## Quick start
154
+
155
+ Basic scan:
156
+
157
+ ```bash
158
+ cve-lite /path/to/project
159
+ ```
160
+
161
+ Show all findings:
162
+
163
+ ```bash
164
+ cve-lite /path/to/project --all
165
+ ```
166
+
167
+ Focus only on urgent findings:
168
+
169
+ ```bash
170
+ cve-lite /path/to/project --min-severity high
171
+ ```
172
+
173
+ Fail a build on high severity and above:
174
+
175
+ ```bash
176
+ cve-lite /path/to/project --fail-on high
177
+ ```
178
+
179
+ JSON output:
180
+
181
+ ```bash
182
+ cve-lite /path/to/project --json
183
+ ```
184
+
185
+ SARIF output:
186
+
187
+ ```bash
188
+ cve-lite /path/to/project --sarif --output reports/scan.sarif
189
+ ```
190
+
191
+ ## Supported workflows
192
+
193
+ ### Local development
194
+
195
+ Run it before a release, during dependency cleanup, or after a major package upgrade.
196
+
197
+ ### CI/CD
198
+
199
+ Use it as a release gate in CI:
200
+
201
+ ```bash
202
+ cve-lite . --fail-on high
203
+ ```
204
+
205
+ Export SARIF in CI:
206
+
207
+ ```bash
208
+ cve-lite . --sarif --output reports/scan.sarif
209
+ ```
210
+
211
+ ### Scripted automation
212
+
213
+ Use JSON output for custom reporting:
214
+
215
+ ```bash
216
+ cve-lite . --json > cve-lite-report.json
217
+ ```
218
+
219
+ ## Philosophy
220
+
221
+ CVE Lite CLI is not trying to be everything.
222
+
223
+ It is trying to be **one of the easiest and most useful tools for developers who need a practical CVE scan right now**.
224
+
225
+ That means:
226
+
227
+ - fast setup
228
+ - understandable output
229
+ - useful remediation guidance
230
+ - low friction
231
+ - realistic adoption for developers without enterprise budgets
232
+
233
+ ## Current limitations
234
+
235
+ To keep the project honest, here is what it does **not** do in the current version:
236
+
237
+ - it does not prove exploitability
238
+ - it does not verify runtime reachability
239
+ - it does not scan container images, binaries, secrets, or IaC
240
+ - it does not replace a full application security program
241
+ - it is currently focused on JS/TS dependency scanning
242
+
243
+ ## Positioning
244
+
245
+ CVE Lite CLI is best described as:
246
+
247
+ **A fast, developer-friendly dependency vulnerability scanner for JavaScript and TypeScript projects, built for teams that want actionable results without the cost and complexity of a full security platform.**
248
+
249
+ ## Roadmap ideas
250
+
251
+ Planned or possible future improvements include:
252
+
253
+ - richer remediation guidance
254
+ - stronger CI examples
255
+ - broader export improvements
256
+ - improved caching options
257
+ - better package grouping and deduplication insights
258
+ - publishable npm release polish
259
+ - GitHub Action or container workflow support
260
+
261
+ ## Contributing
262
+
263
+ This project is being shaped around real-world developer usability. Feedback on output clarity, remediation guidance, ecosystem coverage, and CI usage is especially valuable.
264
+
265
+ ## License
266
+
267
+ MIT