cve-lite-cli 1.34.0 → 1.35.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/dist/cli/advisories-init.js +13 -0
- package/dist/cli/advisories-sync.js +30 -0
- package/dist/cli/config-command.js +15 -0
- package/dist/cli/config.js +29 -0
- package/dist/cli/help.js +4 -4
- package/dist/cli/overrides.js +10 -1
- package/dist/constants.js +52 -0
- package/dist/index.js +25 -719
- package/dist/output/cyclonedx.js +12 -0
- package/dist/output/html-reporter.js +73 -38
- package/dist/output/multi-folder-html-reporter.js +16 -10
- package/dist/output/multi-folder-printer.js +1 -1
- package/dist/output/override-findings-sarif.js +1 -0
- package/dist/output/printers.js +427 -270
- package/dist/output/sarif.js +17 -1
- package/dist/output/sbom-dependency-edges.js +29 -19
- package/dist/overrides/admitted-scan.js +158 -0
- package/dist/overrides/api.js +16 -0
- package/dist/overrides/context-builder.js +4 -0
- package/dist/overrides/context.js +8 -1
- package/dist/overrides/detectors/index.js +2 -0
- package/dist/overrides/detectors/oa010-vulnerable-floor.js +123 -0
- package/dist/overrides/parsing/registry.js +53 -0
- package/dist/parsers/bun-lock-graph.js +182 -0
- package/dist/parsers/bun-lock.js +93 -132
- package/dist/parsers/index.js +75 -149
- package/dist/parsers/multi-package.js +5 -6
- package/dist/parsers/pnpm-lock-graph.js +94 -0
- package/dist/parsers/pnpm-lock.js +5 -5
- package/dist/parsers/yarn-lock-graph.js +148 -0
- package/dist/parsers/yarn-lock.js +3 -3
- package/dist/remediation/fix-commands.js +48 -7
- package/dist/scan/completeness.js +1 -1
- package/dist/scan/single-scan.js +643 -0
- package/dist/utils/file.js +11 -14
- package/dist/utils/version.js +10 -0
- package/package.json +1 -1
package/dist/utils/version.js
CHANGED
|
@@ -199,6 +199,16 @@ export function satisfiesRange(version, range) {
|
|
|
199
199
|
if (!v)
|
|
200
200
|
return false;
|
|
201
201
|
const trimmedRange = range.trim();
|
|
202
|
+
// Compound range: space-separated comparators are ANDed, so `>=5.7.0 <6`
|
|
203
|
+
// means both. Operators may carry a space before their operand (`>= 5.7.0`),
|
|
204
|
+
// so glue those back on before splitting. Without this the first comparator
|
|
205
|
+
// won and every ceiling was silently discarded, which made `>=5.7.0 <6`
|
|
206
|
+
// accept 99.0.0.
|
|
207
|
+
const glued = trimmedRange.replace(/([<>]=?|=|\^|~)\s+/g, "$1");
|
|
208
|
+
if (/\s/.test(glued)) {
|
|
209
|
+
const parts = glued.split(/\s+/).filter(Boolean);
|
|
210
|
+
return parts.every((part) => satisfiesRange(version, part));
|
|
211
|
+
}
|
|
202
212
|
// Exact match (no operator)
|
|
203
213
|
if (/^\d/.test(trimmedRange)) {
|
|
204
214
|
return compareVersions(v, coerceVersion(trimmedRange) ?? "") === 0;
|