cve-lite-cli 1.29.0 → 1.31.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/README.md +2 -1
- package/dist/advisory/osv-advisory-source.js +3 -0
- package/dist/cli/help.js +3 -2
- package/dist/cli/validate.js +12 -12
- package/dist/constants.js +1 -0
- package/dist/index.js +29 -2
- package/dist/output/formatters.js +19 -7
- package/dist/output/html-reporter.js +22 -14
- package/dist/output/multi-folder-html-reporter.js +3 -2
- package/dist/output/override-findings-html.js +6 -5
- package/dist/output/override-findings-terminal.js +2 -1
- package/dist/output/printers.js +16 -14
- package/dist/overrides/detectors/oa001-orphaned-target.js +2 -1
- package/dist/overrides/detectors/oa002-floating-tag.js +2 -1
- package/dist/overrides/detectors/oa003-wrong-section.js +2 -1
- package/dist/overrides/detectors/oa004-surpassed-pin.js +2 -1
- package/dist/overrides/detectors/oa005-nested-ineffective.js +2 -1
- package/dist/overrides/detectors/oa006-coupled-platform-binary.js +2 -1
- package/dist/overrides/detectors/oa007-frozen-latest.js +2 -1
- package/dist/overrides/detectors/oa009-stale-floor.js +2 -1
- package/dist/parsers/pnpm-lock.js +22 -7
- package/dist/remediation/fix-commands.js +43 -12
- package/dist/remediation/npm-transitive-resolution.js +5 -6
- package/dist/remediation/package-path-lookup.js +29 -0
- package/dist/remediation/parent-upgrade.js +2 -22
- package/dist/scan/multi-folder-scan.js +18 -3
- package/dist/scanner.js +26 -2
- package/dist/utils/finding.js +28 -0
- package/dist/utils/fix-runner.js +87 -50
- package/dist/utils/severity.js +2 -0
- package/dist/utils/version.js +13 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -329,10 +329,11 @@ CVE Lite CLI is used in production across organizations and independent develope
|
|
|
329
329
|
|
|
330
330
|
Notable adopters include:
|
|
331
331
|
|
|
332
|
+
- **SolidJS** - the framework's creator, Ryan Carniato, added CVE Lite CLI directly to its CI, scanning every change with results reported to GitHub Code Scanning
|
|
332
333
|
- **DINUM** (France) - integrated across four French government digital service repositories, including official AI training infrastructure for civil servants
|
|
333
334
|
- **DGAFP** (France) - Ministry for Civil Service, used as a pre-commit hook on a public-sector HR chatbot
|
|
334
335
|
- **Government of British Columbia** (Canada) - running as a required merge gate alongside Trivy at the Ministry of Citizens' Services
|
|
335
|
-
- **Valibot** and **
|
|
336
|
+
- **Valibot** and **Formisch** - integrated as a GitHub Action and dev script with branch protection
|
|
336
337
|
|
|
337
338
|
|
|
338
339
|
## Current limitations
|
|
@@ -59,6 +59,9 @@ export class OsvAdvisorySource {
|
|
|
59
59
|
throw new Error(`OSV batch query failed: ${response.status} ${response.statusText}`);
|
|
60
60
|
}
|
|
61
61
|
const data = await response.json();
|
|
62
|
+
if (!Array.isArray(data?.results)) {
|
|
63
|
+
throw new Error('OSV batch query returned a 200 response with no "results" array');
|
|
64
|
+
}
|
|
62
65
|
return data.results.map((r, i) => ({
|
|
63
66
|
package: packages[i].name,
|
|
64
67
|
version: packages[i].version,
|
package/dist/cli/help.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { chalk } from "../utils/chalk.js";
|
|
2
2
|
import { getCliVersion } from "../utils/version-info.js";
|
|
3
3
|
import { checkForUpdate } from "../utils/update-check.js";
|
|
4
|
+
import { OVERRIDES_COMMAND } from "../constants.js";
|
|
4
5
|
const CLI_VERSION = getCliVersion();
|
|
5
6
|
const CLI_BANNER = [
|
|
6
7
|
`${chalk.green(">_")} ${chalk.bold.whiteBright(`CVE Lite CLI (${CLI_VERSION})`)}`,
|
|
@@ -27,7 +28,7 @@ export function printHelp() {
|
|
|
27
28
|
" cve-lite advisories init [options]",
|
|
28
29
|
" cve-lite install-skill",
|
|
29
30
|
" cve-lite config <set|unset|show> [key] [value]",
|
|
30
|
-
|
|
31
|
+
` ${OVERRIDES_COMMAND} [path] [flags]`,
|
|
31
32
|
"",
|
|
32
33
|
"Scan options:",
|
|
33
34
|
" --json Save scan results to a timestamped JSON file",
|
|
@@ -91,7 +92,7 @@ export function printHelp() {
|
|
|
91
92
|
export function printOverridesHelp() {
|
|
92
93
|
printBanner();
|
|
93
94
|
const lines = [
|
|
94
|
-
|
|
95
|
+
`${OVERRIDES_COMMAND} [path] [flags]`,
|
|
95
96
|
"",
|
|
96
97
|
"Audit package.json overrides and phantom dependency imports (OA001-OA009, PD001-PD002).",
|
|
97
98
|
"",
|
package/dist/cli/validate.js
CHANGED
|
@@ -2,13 +2,13 @@ import { validateCaCertFile } from "./config.js";
|
|
|
2
2
|
import { validateOsvUrl } from "../utils/validate-url.js";
|
|
3
3
|
export async function validateOptions(options) {
|
|
4
4
|
if (options.allowPrivateOsvUrl && !options.osvUrl) {
|
|
5
|
-
throw new Error("--allow-private-osv-url requires --osv-url");
|
|
5
|
+
throw new Error("--allow-private-osv-url requires --osv-url. Provide a custom OSV endpoint with --osv-url, or remove --allow-private-osv-url.");
|
|
6
6
|
}
|
|
7
7
|
if ((options.offline || options.offlineDb) && options.osvUrl) {
|
|
8
|
-
throw new Error("--offline/--offline-db cannot be used with --osv-url");
|
|
8
|
+
throw new Error("--offline/--offline-db cannot be used with --osv-url. Choose offline mode (local DB) or online mode (custom OSV endpoint), not both.");
|
|
9
9
|
}
|
|
10
10
|
if (options.noCache && (options.offline || options.offlineDb)) {
|
|
11
|
-
throw new Error("--no-cache cannot be used with --offline or --offline-db");
|
|
11
|
+
throw new Error("--no-cache cannot be used with --offline or --offline-db. Offline mode uses the local advisory DB directly; --no-cache only applies to online scans.");
|
|
12
12
|
}
|
|
13
13
|
let ssrfWarning;
|
|
14
14
|
if (options.osvUrl) {
|
|
@@ -21,26 +21,26 @@ export async function validateOptions(options) {
|
|
|
21
21
|
// SSRF defense: validate scheme, IP, and allow-private flag
|
|
22
22
|
ssrfWarning = await validateOsvUrl(options.osvUrl, !!options.allowPrivateOsvUrl);
|
|
23
23
|
}
|
|
24
|
+
if (options.createPr && options.json) {
|
|
25
|
+
throw new Error("--create-pr cannot be used with --json. Use --create-pr to open a pull request for applied fixes, or --json to save scan results as JSON, not both.");
|
|
26
|
+
}
|
|
24
27
|
if (options.fix && options.json) {
|
|
25
|
-
throw new Error("--fix cannot be used with --json");
|
|
28
|
+
throw new Error("--fix cannot be used with --json. Use --fix to apply validated fixes and rescan, or --json to save scan results as JSON, not both.");
|
|
26
29
|
}
|
|
27
30
|
if (options.fix && options.sarif) {
|
|
28
|
-
throw new Error("--fix cannot be used with --sarif");
|
|
31
|
+
throw new Error("--fix cannot be used with --sarif. Use --fix to apply validated fixes and rescan, or --sarif to save scan results as SARIF, not both.");
|
|
29
32
|
}
|
|
30
33
|
if (options.fix && options.cdx) {
|
|
31
|
-
throw new Error("--fix cannot be used with --cdx");
|
|
34
|
+
throw new Error("--fix cannot be used with --cdx. Use --fix to apply validated fixes and rescan, or --cdx to save a CycloneDX SBOM, not both.");
|
|
32
35
|
}
|
|
33
36
|
if (options.createPr && !options.fix) {
|
|
34
|
-
throw new Error("--create-pr requires --fix");
|
|
35
|
-
}
|
|
36
|
-
if (options.createPr && options.json) {
|
|
37
|
-
throw new Error("--create-pr cannot be used with --json");
|
|
37
|
+
throw new Error("--create-pr requires --fix. Add --fix to apply validated fixes before opening a pull request, or remove --create-pr.");
|
|
38
38
|
}
|
|
39
39
|
if (options.prBase && !options.createPr) {
|
|
40
|
-
throw new Error("--base can only be used with --create-pr");
|
|
40
|
+
throw new Error("--base can only be used with --create-pr. Add --create-pr to select its target branch, or remove --base.");
|
|
41
41
|
}
|
|
42
42
|
if (options.report && options.json) {
|
|
43
|
-
throw new Error("--report cannot be used with --json");
|
|
43
|
+
throw new Error("--report cannot be used with --json. Use --report to generate an HTML report, or --json to save scan results as JSON, not both.");
|
|
44
44
|
}
|
|
45
45
|
if (options.caCert) {
|
|
46
46
|
try {
|
package/dist/constants.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { loadPackages, buildNoPackagesMessage } from "./parsers/index.js";
|
|
|
9
9
|
import { scanPackages, buildCoverageNotes, createAdvisorySource } from "./scanner.js";
|
|
10
10
|
import { syncOsvAdvisories } from "./advisory/osv-sync.js";
|
|
11
11
|
import { normalizeSeverity } from "./osv/severity.js";
|
|
12
|
-
import { DEFAULT_BATCH_SIZE, DEFAULT_SEARCH_DEPTH } from "./constants.js";
|
|
12
|
+
import { DEFAULT_BATCH_SIZE, DEFAULT_SEARCH_DEPTH, OVERRIDES_COMMAND } from "./constants.js";
|
|
13
13
|
import { chalk } from "./utils/chalk.js";
|
|
14
14
|
import { createSpinner } from "./output/spinner.js";
|
|
15
15
|
import { createDebugLogger } from "./output/debug.js";
|
|
@@ -40,6 +40,7 @@ import { hasRootLockfile, findNestedLockfiles } from "./parsers/multi-package.js
|
|
|
40
40
|
import { handleMultiFolderScan } from "./scan/multi-folder-scan.js";
|
|
41
41
|
import { collectAdvisoryIdsForPackage, createPullRequestForFixes, } from "./utils/create-pr.js";
|
|
42
42
|
import { readBaseline, writeBaseline, filterNewFindings, ratchetOutcome } from "./utils/baseline.js";
|
|
43
|
+
import { formatDiagnosticMessage, getCompletenessImpact } from "./scan/completeness.js";
|
|
43
44
|
let parsedArgs = null;
|
|
44
45
|
try {
|
|
45
46
|
parsedArgs = parseArgs(process.argv.slice(2));
|
|
@@ -469,6 +470,7 @@ if (parsedArgs) {
|
|
|
469
470
|
// the nothing-to-fix case without parsing stdout.
|
|
470
471
|
const fixResultJson = {
|
|
471
472
|
appliedFixCount: fixResult?.appliedFixCount ?? 0,
|
|
473
|
+
appliedWithinRangeRefreshCount: fixResult?.appliedWithinRangeRefreshCount ?? 0,
|
|
472
474
|
findingsBeforeFix,
|
|
473
475
|
findingsAfterFix: scanState.sorted.length,
|
|
474
476
|
applied: (fixResult?.applied ?? []).map(entry => ({
|
|
@@ -477,6 +479,11 @@ if (parsedArgs) {
|
|
|
477
479
|
to: entry.to,
|
|
478
480
|
advisories: collectAdvisoryIdsForPackage(findingsBeforeFixList, entry.package),
|
|
479
481
|
})),
|
|
482
|
+
notAutoApplied: {
|
|
483
|
+
parentUpgradeCount: fixResult?.parentUpgradeCount ?? 0,
|
|
484
|
+
breakingUpgradeCount: fixResult?.breakingUpgradeCount ?? 0,
|
|
485
|
+
noFixCount: fixResult?.noFixCount ?? 0,
|
|
486
|
+
},
|
|
480
487
|
};
|
|
481
488
|
writeFixResultJson(fixResultJson, projectPath);
|
|
482
489
|
if (options.createPr && fixResult) {
|
|
@@ -516,13 +523,33 @@ if (parsedArgs) {
|
|
|
516
523
|
// baseline. Re-saving here would silently absorb a new vulnerability into a
|
|
517
524
|
// fresh baseline, so a ratcheted CI job could never fail on a regression.
|
|
518
525
|
if (options.ratchet) {
|
|
526
|
+
const { hasDetectionGap } = getCompletenessImpact(scanState.completeness);
|
|
527
|
+
if (hasDetectionGap) {
|
|
528
|
+
console.log(chalk.red("Scan data is incomplete. Refusing to create or evaluate a baseline from partial detection data."));
|
|
529
|
+
for (const diagnostic of scanState.completeness.diagnostics) {
|
|
530
|
+
if (diagnostic.impact !== "detection")
|
|
531
|
+
continue;
|
|
532
|
+
console.log(chalk.red(` ${formatDiagnosticMessage(diagnostic.code, diagnostic.count, diagnostic.affectedPackageCount)}`));
|
|
533
|
+
}
|
|
534
|
+
auditLogHandle.emit({
|
|
535
|
+
ts: new Date().toISOString(),
|
|
536
|
+
type: "scan.finished",
|
|
537
|
+
schemaVersion: 1,
|
|
538
|
+
durationMs: Date.now() - scanStartTime,
|
|
539
|
+
findingsCount: scanState.sorted.length,
|
|
540
|
+
exitCode: EXIT_ERROR,
|
|
541
|
+
});
|
|
542
|
+
auditLogHandle.close();
|
|
543
|
+
process.exit(EXIT_ERROR);
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
519
546
|
const outcome = ratchetOutcome(baseline, scanState.sorted);
|
|
520
547
|
if (outcome.action === "save") {
|
|
521
548
|
writeBaseline(projectArg ?? ".", scanState.sorted);
|
|
522
549
|
const count = scanState.sorted.length;
|
|
523
550
|
console.log(chalk.green(`✓ Baseline saved to .cve-lite/baseline.json with ${count} ${count === 1 ? "finding" : "findings"}. Future scans will only report findings above this baseline.`));
|
|
524
551
|
if (options.checkOverrides) {
|
|
525
|
-
console.log(chalk.gray(
|
|
552
|
+
console.log(chalk.gray(`Note: override hygiene (--check-overrides) is not part of the ratchet baseline; run \`${OVERRIDES_COMMAND}\` to audit overrides.`));
|
|
526
553
|
}
|
|
527
554
|
auditLogHandle.emit({
|
|
528
555
|
ts: new Date().toISOString(),
|
|
@@ -3,7 +3,7 @@ import { chalk } from "../utils/chalk.js";
|
|
|
3
3
|
import { severityOrder, MAL_PRIVATE_REGISTRY_MESSAGE, MAL_GIT_SOURCE_PINNED_MESSAGE, MAL_GIT_SOURCE_FLOATING_MESSAGE, } from "../constants.js";
|
|
4
4
|
import { loadCache } from "../osv/cache.js";
|
|
5
5
|
import { inferSeverity } from "../osv/severity.js";
|
|
6
|
-
import { getPrimaryParent } from "../utils/finding.js";
|
|
6
|
+
import { getPrimaryParent, getRootDependencies } from "../utils/finding.js";
|
|
7
7
|
import { calculatePathCoverage, formatDependencyPath } from "../utils/path-coverage.js";
|
|
8
8
|
import { pluralize } from "../utils/string.js";
|
|
9
9
|
import { hasMaliciousAdvisory } from "../utils/vuln.js";
|
|
@@ -18,6 +18,16 @@ export function formatRelLabel(finding) {
|
|
|
18
18
|
const base = finding.relationship;
|
|
19
19
|
return finding.pkg.dev === true ? `${base} · dev` : base;
|
|
20
20
|
}
|
|
21
|
+
// Compact form for the terminal table, where column width is limited: shows
|
|
22
|
+
// the first root dependency plus a count of additional ones (e.g. "app +2").
|
|
23
|
+
export function formatRootDependencySummary(finding) {
|
|
24
|
+
const roots = getRootDependencies(finding);
|
|
25
|
+
if (roots.length === 0)
|
|
26
|
+
return "-";
|
|
27
|
+
if (roots.length === 1)
|
|
28
|
+
return roots[0];
|
|
29
|
+
return `${roots[0]} +${roots.length - 1}`;
|
|
30
|
+
}
|
|
21
31
|
export function formatAdvisorySourceLine(sourceLabel) {
|
|
22
32
|
const match = sourceLabel.match(/^(.*) \((.*)\)$/);
|
|
23
33
|
if (!match) {
|
|
@@ -38,6 +48,11 @@ export function formatHintLines(lines) {
|
|
|
38
48
|
function isMaliciousAdvisory(finding) {
|
|
39
49
|
return hasMaliciousAdvisory(finding.vulnerabilities);
|
|
40
50
|
}
|
|
51
|
+
function transitiveRiskMessage(packageName, complete) {
|
|
52
|
+
return complete
|
|
53
|
+
? `Transitive issue. A specific parent upgrade target was found for ${packageName}.`
|
|
54
|
+
: `Transitive issue. A path-specific parent upgrade target was found for ${packageName}; run it, rescan, and review remaining paths separately.`;
|
|
55
|
+
}
|
|
41
56
|
export function getRecommendedAction(finding) {
|
|
42
57
|
if (isMaliciousAdvisory(finding)) {
|
|
43
58
|
if (finding.maliciousUnverifiable) {
|
|
@@ -107,15 +122,11 @@ export function summarizeRisk(finding) {
|
|
|
107
122
|
}
|
|
108
123
|
else if (finding.relationship === "transitive" && finding.recommendedNpmTransitiveRemediation?.kind === "upgrade-parent-to-version") {
|
|
109
124
|
const coverage = calculatePathCoverage(finding.dependencyPaths, finding.recommendedNpmTransitiveRemediation.viaPath);
|
|
110
|
-
risk = coverage.coverage === "complete"
|
|
111
|
-
? `Transitive issue. A specific parent upgrade target was found for ${finding.recommendedNpmTransitiveRemediation.package}.`
|
|
112
|
-
: `Transitive issue. A path-specific parent upgrade target was found for ${finding.recommendedNpmTransitiveRemediation.package}; run it, rescan, and review remaining paths separately.`;
|
|
125
|
+
risk = transitiveRiskMessage(finding.recommendedNpmTransitiveRemediation.package, coverage.coverage === "complete");
|
|
113
126
|
}
|
|
114
127
|
else if (finding.relationship === "transitive" && finding.recommendedParentUpgrade) {
|
|
115
128
|
const coverage = calculatePathCoverage(finding.dependencyPaths, finding.recommendedParentUpgrade.viaPath);
|
|
116
|
-
risk = coverage.coverage === "complete"
|
|
117
|
-
? `Transitive issue. A specific parent upgrade target was found for ${finding.recommendedParentUpgrade.package}.`
|
|
118
|
-
: `Transitive issue. A path-specific parent upgrade target was found for ${finding.recommendedParentUpgrade.package}; run it, rescan, and review remaining paths separately.`;
|
|
129
|
+
risk = transitiveRiskMessage(finding.recommendedParentUpgrade.package, coverage.coverage === "complete");
|
|
119
130
|
}
|
|
120
131
|
else if (finding.relationship === "transitive" && (finding.validatedFirstFixedVersion ?? finding.firstFixedVersion)) {
|
|
121
132
|
const target = finding.validatedFirstFixedVersion ?? finding.firstFixedVersion;
|
|
@@ -226,6 +237,7 @@ export function serializeFinding(finding, plan) {
|
|
|
226
237
|
recommendedAction: getRecommendedAction(finding),
|
|
227
238
|
runnableFixCommand: plan ? findSuggestedCommandForFinding(plan, finding) : null,
|
|
228
239
|
primaryParent: getPrimaryParent(finding),
|
|
240
|
+
rootDependencies: getRootDependencies(finding),
|
|
229
241
|
recommendedParentUpgrade: finding.recommendedParentUpgrade,
|
|
230
242
|
recommendedNpmTransitiveRemediation: finding.recommendedNpmTransitiveRemediation ?? null,
|
|
231
243
|
cves: finding.cveAliases,
|
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { serializeFinding, summarizeNextAction, summarizeRisk, formatFixCommandWithPublishDates, formatCooldownWarning } from "./formatters.js";
|
|
5
5
|
import { loadLogoDataUri } from "./logos.js";
|
|
6
|
-
import {
|
|
6
|
+
import { isBreakingUpgrade } from "../utils/version.js";
|
|
7
7
|
import { pluralize } from "../utils/string.js";
|
|
8
8
|
import { MAL_GIT_SOURCE_PINNED_DISPLAY, MAL_GIT_SOURCE_FLOATING_DISPLAY, severityOrder } from "../constants.js";
|
|
9
9
|
import { hasMaliciousAdvisory } from "../utils/vuln.js";
|
|
@@ -136,6 +136,8 @@ button.header-link:hover{color:var(--link);border-color:var(--link)}
|
|
|
136
136
|
.rel-badge.transitive{color:#e3b341;background:#e3b34122}
|
|
137
137
|
.rel-badge.unknown{color:#8b949e;background:#8b949e22}
|
|
138
138
|
.rel-badge.dev{color:#a371f7;background:#6e40c922;border:1px solid #6e40c955}
|
|
139
|
+
.root-dep{font-size:11px;font-family:monospace;color:var(--text)}
|
|
140
|
+
.root-dep-none{font-size:11px;color:var(--text-3)}
|
|
139
141
|
.cve-link{font-size:11px;color:var(--link);font-family:monospace;text-decoration:none;border-bottom:1px dotted var(--link)}
|
|
140
142
|
.cve-link:hover{color:var(--link-h)}
|
|
141
143
|
.fix-hint{font-size:11px;color:var(--green);font-family:monospace}
|
|
@@ -317,12 +319,13 @@ ${duplicatePackagesHtml}
|
|
|
317
319
|
<th>Fix available</th>
|
|
318
320
|
<th onclick="sortBy('severity')" class="sorted">Severity <span class="sort-arrow" style="color:var(--link)">↓</span></th>
|
|
319
321
|
<th onclick="sortBy('relationship')">Type <span class="sort-arrow">↕</span></th>
|
|
322
|
+
<th>Root</th>
|
|
320
323
|
<th>CVE / Advisory</th>
|
|
321
324
|
</tr>
|
|
322
325
|
</thead>
|
|
323
326
|
<tbody id="findings-tbody">
|
|
324
327
|
${findingRowsHtml}
|
|
325
|
-
<tr id="no-results-row" style="display:none"><td colspan="
|
|
328
|
+
<tr id="no-results-row" style="display:none"><td colspan="7" class="no-results">No findings match your search.</td></tr>
|
|
326
329
|
</tbody>
|
|
327
330
|
</table>
|
|
328
331
|
</div>
|
|
@@ -506,7 +509,7 @@ export function renderFindingRow(finding, idx, skippedKeys) {
|
|
|
506
509
|
const depPathHtml = finding.dependencyPaths.length > 0
|
|
507
510
|
? finding.dependencyPaths[0].map((node, i, arr) => {
|
|
508
511
|
const isLast = i === arr.length - 1;
|
|
509
|
-
return `<
|
|
512
|
+
return `<a href="https://www.npmjs.com/package/${encodeURIComponent(node)}" target="_blank" rel="noopener noreferrer" class="dep-node${isLast ? " vulnerable" : ""}">${escapeHtml(node)}</a>${isLast ? "" : '<span class="dep-arrow">→</span>'}`;
|
|
510
513
|
}).join("")
|
|
511
514
|
: `<span class="dep-node">${escapeHtml(finding.package)}</span>`;
|
|
512
515
|
const description = finding.vulnerabilities[0]?.summary ?? "";
|
|
@@ -520,16 +523,20 @@ export function renderFindingRow(finding, idx, skippedKeys) {
|
|
|
520
523
|
const contextColHtml = finding.relationship === "transitive"
|
|
521
524
|
? renderTransitiveContextCol(finding)
|
|
522
525
|
: "";
|
|
523
|
-
|
|
526
|
+
const rootDepsHtml = finding.rootDependencies.length > 0
|
|
527
|
+
? finding.rootDependencies.map(name => `<span class="root-dep">${escapeHtml(name)}</span>`).join(", ")
|
|
528
|
+
: `<span class="root-dep-none">-</span>`;
|
|
529
|
+
return `<tr id="row-${idx}" data-skipped="${isSkipped ? '1' : '0'}" onclick="toggleRow(${idx})">
|
|
524
530
|
<td><span class="expand-icon" id="icon-${idx}">▶</span></td>
|
|
525
|
-
<td><div class="pkg-name">${escapeHtml(finding.package)}</div><div class="pkg-version">${escapeHtml(finding.version)}</div></td>
|
|
531
|
+
<td><div class="pkg-name"><a href="https://www.npmjs.com/package/${encodeURIComponent(finding.package)}" target="_blank" rel="noopener noreferrer">${escapeHtml(finding.package)}</a></div><div class="pkg-version">${escapeHtml(finding.version)}</div></td>
|
|
526
532
|
<td>${fixHtml}</td>
|
|
527
533
|
<td><span class="sev-badge ${escapeHtml(finding.severity)}">${escapeHtml(finding.severity)}</span></td>
|
|
528
534
|
<td>${renderRelBadge(finding)}</td>
|
|
535
|
+
<td>${rootDepsHtml}</td>
|
|
529
536
|
<td>${cveLinks}</td>
|
|
530
537
|
</tr>
|
|
531
538
|
<tr id="detail-${idx}" class="detail-row">
|
|
532
|
-
<td colspan="
|
|
539
|
+
<td colspan="7">
|
|
533
540
|
<div class="expanded-inner">
|
|
534
541
|
<div class="detail-col" style="max-width:320px">
|
|
535
542
|
<h4>Description</h4>
|
|
@@ -556,21 +563,22 @@ function renderTransitiveContextCol(finding) {
|
|
|
556
563
|
const hasFixAvailable = finding.runnableFixCommand != null ||
|
|
557
564
|
finding.recommendedNpmTransitiveRemediation != null ||
|
|
558
565
|
finding.recommendedParentUpgrade != null;
|
|
566
|
+
const rootNames = finding.rootDependencies.join(", ");
|
|
559
567
|
if (hasFixAvailable) {
|
|
560
|
-
const
|
|
561
|
-
? `<p style="font-size:12px;color:var(--text-2);margin-top:4px">
|
|
568
|
+
const rootLine = rootNames
|
|
569
|
+
? `<p style="font-size:12px;color:var(--text-2);margin-top:4px">Root: ${escapeHtml(rootNames)}</p>`
|
|
562
570
|
: "";
|
|
563
571
|
return `<div class="detail-col" style="max-width:200px">
|
|
564
572
|
<h4>Context</h4>
|
|
565
573
|
<span class="tier-ok">✓ Fix available</span>
|
|
566
|
-
${
|
|
574
|
+
${rootLine}
|
|
567
575
|
</div>`;
|
|
568
576
|
}
|
|
569
|
-
if (
|
|
577
|
+
if (rootNames) {
|
|
570
578
|
return `<div class="detail-col" style="max-width:200px">
|
|
571
579
|
<h4>Context</h4>
|
|
572
580
|
<span class="tier-warn">⚠ No safe version identified</span>
|
|
573
|
-
<p style="font-size:12px;color:var(--text-2);margin-top:4px">
|
|
581
|
+
<p style="font-size:12px;color:var(--text-2);margin-top:4px">Root: ${escapeHtml(rootNames)}</p>
|
|
574
582
|
</div>`;
|
|
575
583
|
}
|
|
576
584
|
return `<div class="detail-col" style="max-width:200px">
|
|
@@ -727,8 +735,8 @@ export function renderFixPlan(plan) {
|
|
|
727
735
|
const skippedCount = plan.skipped.length;
|
|
728
736
|
const commandRows = plan.sections.map(section => {
|
|
729
737
|
const targetRows = section.targets.map(t => {
|
|
730
|
-
const displayVersion = t.
|
|
731
|
-
const isMajor = t.currentVersion ?
|
|
738
|
+
const displayVersion = t.targetVersion;
|
|
739
|
+
const isMajor = t.currentVersion ? isBreakingUpgrade(t.currentVersion, t.targetVersion) : false;
|
|
732
740
|
const breakBadge = isMajor ? ` <span class="break-badge">⚠ breaking</span>` : "";
|
|
733
741
|
const versionHtml = t.currentVersion
|
|
734
742
|
? `<span class="fix-target-pkg">${escapeHtml(t.package)}@${escapeHtml(t.currentVersion)}</span><span class="fix-target-arrow">→</span><span class="fix-target-to">${escapeHtml(displayVersion)}</span>`
|
|
@@ -750,7 +758,7 @@ export function renderFixPlan(plan) {
|
|
|
750
758
|
: "";
|
|
751
759
|
const chainProofHtml = t.chainProof && t.chainSafeVersion
|
|
752
760
|
? (() => {
|
|
753
|
-
const hops = t.chainProof.map(h =>
|
|
761
|
+
const hops = t.chainProof.map(h => `<a href="https://www.npmjs.com/package/${encodeURIComponent(h.name)}" target="_blank" rel="noopener noreferrer">${escapeHtml(h.name)}</a>@${escapeHtml(h.version)}`);
|
|
754
762
|
const safe = escapeHtml(t.chainSafeVersion);
|
|
755
763
|
const proofText = hops.length > 0
|
|
756
764
|
? `resolves via ${hops.join(" -> ")} -> ${safe} (safe)`
|
|
@@ -76,7 +76,7 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
76
76
|
? renderMaintenanceFindingsHtml(result.maintenanceFindings)
|
|
77
77
|
: "";
|
|
78
78
|
const emptyRow = result.sorted.length === 0
|
|
79
|
-
? `<tr><td colspan="
|
|
79
|
+
? `<tr><td colspan="7" style="text-align:center;padding:24px;color:#8b949e">No findings</td></tr>`
|
|
80
80
|
: "";
|
|
81
81
|
return `
|
|
82
82
|
<details class="folder-section"${isOpen ? " open" : ""}>
|
|
@@ -113,12 +113,13 @@ function renderFolderSection(result, folderIdx, idxOffset, serialized, projectRo
|
|
|
113
113
|
<th>Fix available</th>
|
|
114
114
|
<th onclick="sortBy('severity',${fi})" class="sorted">Severity <span class="sort-arrow" style="color:#58a6ff">↓</span></th>
|
|
115
115
|
<th onclick="sortBy('relationship',${fi})">Type <span class="sort-arrow">↕</span></th>
|
|
116
|
+
<th>Root</th>
|
|
116
117
|
<th>CVE / Advisory</th>
|
|
117
118
|
</tr>
|
|
118
119
|
</thead>
|
|
119
120
|
<tbody id="findings-tbody-${fi}" data-offset="${idxOffset}">
|
|
120
121
|
${emptyRow}${findingRowsHtml}
|
|
121
|
-
<tr id="no-results-row-${fi}" style="display:none"><td colspan="
|
|
122
|
+
<tr id="no-results-row-${fi}" style="display:none"><td colspan="7" class="no-results">No findings match your search.</td></tr>
|
|
122
123
|
</tbody>
|
|
123
124
|
</table>
|
|
124
125
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { relative } from "node:path";
|
|
2
2
|
import { SEVERITY_ORDER } from "../utils/severity.js";
|
|
3
|
+
import { OVERRIDES_COMMAND } from "../constants.js";
|
|
3
4
|
function esc(s) {
|
|
4
5
|
return s
|
|
5
6
|
.replace(/&/g, "&")
|
|
@@ -29,11 +30,11 @@ export function renderOverrideFindingsHtml(findings, projectPath) {
|
|
|
29
30
|
: esc(f.location.file);
|
|
30
31
|
const relPath = projectPath ? relative(process.cwd(), projectPath) : "";
|
|
31
32
|
const projectInfix = relPath && relPath !== "." ? ` ${relPath}` : "";
|
|
32
|
-
const
|
|
33
|
-
? f.fix.runnableCommand.replace(
|
|
34
|
-
:
|
|
35
|
-
const fixHtml =
|
|
36
|
-
? `<div class="fix-cmd-inline" style="margin-top:6px"><code>${esc(
|
|
33
|
+
const fixCommand = f.fix && f.fix.runnableCommand
|
|
34
|
+
? f.fix.runnableCommand.replace(OVERRIDES_COMMAND, `cve-lite${projectInfix} overrides`)
|
|
35
|
+
: null;
|
|
36
|
+
const fixHtml = fixCommand
|
|
37
|
+
? `<div class="fix-cmd-inline" style="margin-top:6px"><code>${esc(fixCommand)}</code><button class="copy-btn" data-cmd="${esc(fixCommand)}">Copy</button></div>`
|
|
37
38
|
: "";
|
|
38
39
|
return (` <tr class="finding ${esc(f.severity)}">` +
|
|
39
40
|
`<td><span class="dep-node">${esc(f.ruleId)}</span></td>` +
|
|
@@ -2,6 +2,7 @@ import { relative } from "node:path";
|
|
|
2
2
|
import { chalk, stripAnsi } from "../utils/chalk.js";
|
|
3
3
|
import { formatSeverityLabel, SEVERITY_ORDER } from "../utils/severity.js";
|
|
4
4
|
import { pluralize } from "../utils/string.js";
|
|
5
|
+
import { OVERRIDES_COMMAND } from "../constants.js";
|
|
5
6
|
const COL_RULE_MAX = 8;
|
|
6
7
|
const COL_PKG_MAX = 30;
|
|
7
8
|
const COL_MSG_MAX = 50;
|
|
@@ -62,7 +63,7 @@ export function renderOverrideFindings(findings, options) {
|
|
|
62
63
|
if (f.fix?.runnableCommand && !seenRules.has(f.ruleId)) {
|
|
63
64
|
seenRules.add(f.ruleId);
|
|
64
65
|
const cmd = projectInfix
|
|
65
|
-
? f.fix.runnableCommand.replace(
|
|
66
|
+
? f.fix.runnableCommand.replace(OVERRIDES_COMMAND, `cve-lite${projectInfix} overrides`)
|
|
66
67
|
: f.fix.runnableCommand;
|
|
67
68
|
lines.push(chalk.bold.cyan(`> ${cmd}`));
|
|
68
69
|
}
|
package/dist/output/printers.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { chalk, stripAnsi } from "../utils/chalk.js";
|
|
2
2
|
import { buildSuggestedFixCommandPlan, UNVERIFIED_PARENT_UPGRADE_NOTE } from "../remediation/fix-commands.js";
|
|
3
|
-
import {
|
|
3
|
+
import { isBreakingUpgrade } from "../utils/version.js";
|
|
4
4
|
import { getPrimaryParent } from "../utils/finding.js";
|
|
5
|
-
import { countUniqueAdvisories, formatRelationshipLabel, formatRelLabel, formatFixCommandWithPublishDates, formatCooldownWarning, } from "./formatters.js";
|
|
5
|
+
import { countUniqueAdvisories, formatRelationshipLabel, formatRelLabel, formatRootDependencySummary, formatFixCommandWithPublishDates, formatCooldownWarning, } from "./formatters.js";
|
|
6
6
|
import { formatSeverityLabel } from "../utils/severity.js";
|
|
7
7
|
import { pluralize } from "../utils/string.js";
|
|
8
8
|
import { hasMaliciousAdvisory } from "../utils/vuln.js";
|
|
9
9
|
import { selectFindingsForCompact } from "./finding-display.js";
|
|
10
10
|
import { getCompletenessImpact } from "../scan/completeness.js";
|
|
11
|
-
import { MAL_PRIVATE_REGISTRY_COMPACT_MESSAGE, MAL_PRIVATE_REGISTRY_LEGEND_MESSAGE, MAL_GIT_SOURCE_PINNED_MESSAGE, MAL_GIT_SOURCE_FLOATING_MESSAGE, MAL_GIT_SOURCE_COMPACT_MESSAGE, MAL_GIT_SOURCE_LEGEND_MESSAGE, MAL_GIT_SOURCE_PINNED_DISPLAY, MAL_GIT_SOURCE_FLOATING_DISPLAY, } from "../constants.js";
|
|
11
|
+
import { MAL_PRIVATE_REGISTRY_COMPACT_MESSAGE, MAL_PRIVATE_REGISTRY_LEGEND_MESSAGE, MAL_GIT_SOURCE_PINNED_MESSAGE, MAL_GIT_SOURCE_FLOATING_MESSAGE, MAL_GIT_SOURCE_COMPACT_MESSAGE, MAL_GIT_SOURCE_LEGEND_MESSAGE, MAL_GIT_SOURCE_PINNED_DISPLAY, MAL_GIT_SOURCE_FLOATING_DISPLAY, OVERRIDES_COMMAND, } from "../constants.js";
|
|
12
12
|
export function printSummary(findings, packageCount, scanInput) {
|
|
13
13
|
if (findings.length === 0) {
|
|
14
14
|
if (scanInput.mode === "manifest-fallback") {
|
|
@@ -46,8 +46,8 @@ export function printActionSummary(findings, overrideCount = 0, packageManager)
|
|
|
46
46
|
console.log(`- ${chalk.gray("Package manager:")} ${packageManager}`);
|
|
47
47
|
}
|
|
48
48
|
if (findings.length > 0) {
|
|
49
|
-
console.log(`- ${chalk.green(String(direct))} vulnerable ${pluralize(direct, "package")} look directly fixable in this project.`);
|
|
50
|
-
console.log(`- ${chalk.yellow(String(transitive))} ${pluralize(transitive, "issue")} come through other dependencies.`);
|
|
49
|
+
console.log(`- ${chalk.green(String(direct))} vulnerable ${pluralize(direct, "package")} ${direct === 1 ? "looks" : "look"} directly fixable in this project.`);
|
|
50
|
+
console.log(`- ${chalk.yellow(String(transitive))} ${pluralize(transitive, "issue")} ${transitive === 1 ? "comes" : "come"} through other dependencies.`);
|
|
51
51
|
if (unknown > 0) {
|
|
52
52
|
console.log(`- ${chalk.magenta(String(unknown))} ${pluralize(unknown, "package")} could not be clearly classified as direct or transitive.`);
|
|
53
53
|
}
|
|
@@ -55,7 +55,7 @@ export function printActionSummary(findings, overrideCount = 0, packageManager)
|
|
|
55
55
|
console.log(`- ${chalk.blue(String(fixable))} ${pluralize(fixable, "package")} include a fixed-version hint from OSV.`);
|
|
56
56
|
}
|
|
57
57
|
if (overrideCount > 0) {
|
|
58
|
-
console.log(`- ${chalk.yellow(String(overrideCount))} override hygiene ${pluralize(overrideCount, "issue")} found. Run ${chalk.white(
|
|
58
|
+
console.log(`- ${chalk.yellow(String(overrideCount))} override hygiene ${pluralize(overrideCount, "issue")} found. Run ${chalk.white(`${OVERRIDES_COMMAND} --fix`)} to address ${pluralize(overrideCount, "it", "them")}.`);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
function printCooldownWarning(target) {
|
|
@@ -193,7 +193,7 @@ export function printSkippedDependencies(skipped) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
export function printTable(findings, threshold, skippedKeys) {
|
|
196
|
-
const headers = ["Package", "Version", "Severity", "Type", "Usage", "Fixed", "IDs"];
|
|
196
|
+
const headers = ["Package", "Version", "Severity", "Type", "Root", "Usage", "Fixed", "IDs"];
|
|
197
197
|
const rawRows = findings.map(f => {
|
|
198
198
|
let usageText = "n/a";
|
|
199
199
|
if (f.usage) {
|
|
@@ -225,6 +225,7 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
225
225
|
f.pkg.version,
|
|
226
226
|
f.severity,
|
|
227
227
|
formatRelLabel(f),
|
|
228
|
+
formatRootDependencySummary(f),
|
|
228
229
|
usageText,
|
|
229
230
|
fixedDisplay,
|
|
230
231
|
f.vulnerabilities.map(v => v.id).join(", ")
|
|
@@ -240,7 +241,7 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
240
241
|
console.log(renderRow(headers, widths));
|
|
241
242
|
console.log(line("├", "┼", "┤"));
|
|
242
243
|
for (const row of rawRows) {
|
|
243
|
-
let usageDecorated = String(row[
|
|
244
|
+
let usageDecorated = String(row[5]);
|
|
244
245
|
if (usageDecorated.includes("file(s)"))
|
|
245
246
|
usageDecorated = chalk.red(usageDecorated);
|
|
246
247
|
else if (usageDecorated.includes("unused"))
|
|
@@ -252,9 +253,10 @@ export function printTable(findings, threshold, skippedKeys) {
|
|
|
252
253
|
row[1],
|
|
253
254
|
formatSeverityLabel(String(row[2])),
|
|
254
255
|
formatRelationshipLabel(String(row[3])),
|
|
256
|
+
row[4],
|
|
255
257
|
usageDecorated,
|
|
256
|
-
row[
|
|
257
|
-
row[
|
|
258
|
+
row[6],
|
|
259
|
+
row[7]
|
|
258
260
|
];
|
|
259
261
|
console.log(renderRow(decorated, widths));
|
|
260
262
|
}
|
|
@@ -686,7 +688,7 @@ function printDirectTargetsTable(targets, remainingNotes, validationSummary, wid
|
|
|
686
688
|
remainingNotes.push(target.adjustmentNote);
|
|
687
689
|
}
|
|
688
690
|
}
|
|
689
|
-
const isBreaking = !!target.currentVersion &&
|
|
691
|
+
const isBreaking = !!target.currentVersion && isBreakingUpgrade(target.currentVersion, target.targetVersion);
|
|
690
692
|
let usageText = chalk.gray("n/a");
|
|
691
693
|
if (target.usage) {
|
|
692
694
|
usageText = target.usage.imported ? chalk.red(`${target.usage.files.length} file(s)`) : chalk.green("unused");
|
|
@@ -743,7 +745,7 @@ function printParentUpgradeTargetsTable(targets, widthsOverride) {
|
|
|
743
745
|
return [
|
|
744
746
|
target.package,
|
|
745
747
|
target.currentVersion ?? "-",
|
|
746
|
-
chalk.cyan(target.
|
|
748
|
+
chalk.cyan(target.targetVersion),
|
|
747
749
|
usageText,
|
|
748
750
|
chalk.gray(target.reason),
|
|
749
751
|
];
|
|
@@ -777,7 +779,7 @@ function computeSharedDirectTableWidths(sections) {
|
|
|
777
779
|
const rows = [];
|
|
778
780
|
for (const section of directSections) {
|
|
779
781
|
for (const target of section.targets) {
|
|
780
|
-
const isBreaking = !!target.currentVersion &&
|
|
782
|
+
const isBreaking = !!target.currentVersion && isBreakingUpgrade(target.currentVersion, target.targetVersion);
|
|
781
783
|
let usageText = "n/a";
|
|
782
784
|
if (target.usage) {
|
|
783
785
|
usageText = target.usage.imported ? `${target.usage.files.length} file(s)` : "unused";
|
|
@@ -815,7 +817,7 @@ function computeSharedParentUpgradeTableWidths(sections) {
|
|
|
815
817
|
rows.push([
|
|
816
818
|
target.package,
|
|
817
819
|
target.currentVersion ?? "-",
|
|
818
|
-
target.
|
|
820
|
+
target.targetVersion,
|
|
819
821
|
usageText,
|
|
820
822
|
target.reason,
|
|
821
823
|
]);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsonPointer } from "../parsing/json-pointer.js";
|
|
2
|
+
import { OVERRIDES_COMMAND } from "../../constants.js";
|
|
2
3
|
const RULE_ID = "OA001";
|
|
3
4
|
export function detect(ctx) {
|
|
4
5
|
if (ctx.skippedDetectors.some((s) => s.ruleId === RULE_ID))
|
|
@@ -25,7 +26,7 @@ export function detect(ctx) {
|
|
|
25
26
|
fix: {
|
|
26
27
|
type: "rfc6902",
|
|
27
28
|
patch: [{ op: "remove", path: jsonPointer(entry.path) }],
|
|
28
|
-
runnableCommand:
|
|
29
|
+
runnableCommand: `${OVERRIDES_COMMAND} --fix --rule OA001`,
|
|
29
30
|
},
|
|
30
31
|
references: [
|
|
31
32
|
"https://github.com/OWASP/cve-lite-cli/blob/main/docs/rules/OA001.md",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsonPointer } from "../parsing/json-pointer.js";
|
|
2
2
|
import { isValidRange } from "../../utils/version.js";
|
|
3
|
+
import { OVERRIDES_COMMAND } from "../../constants.js";
|
|
3
4
|
const RULE_ID = "OA002";
|
|
4
5
|
const FLOATING = new Set(['latest', 'next', '*', 'x', '']);
|
|
5
6
|
export function detect(ctx) {
|
|
@@ -31,7 +32,7 @@ export function detect(ctx) {
|
|
|
31
32
|
finding.fix = {
|
|
32
33
|
type: 'rfc6902',
|
|
33
34
|
patch: [{ op: 'replace', path: jsonPointer(entry.path), value: floor }],
|
|
34
|
-
runnableCommand:
|
|
35
|
+
runnableCommand: `${OVERRIDES_COMMAND} --fix --rule OA002`,
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
findings.push(finding);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsonPointer } from "../parsing/json-pointer.js";
|
|
2
|
+
import { OVERRIDES_COMMAND } from "../../constants.js";
|
|
2
3
|
const RULE_ID = "OA003";
|
|
3
4
|
const EXPECTED_CONTAINER = {
|
|
4
5
|
npm: "overrides",
|
|
@@ -37,7 +38,7 @@ export function detect(ctx) {
|
|
|
37
38
|
from: jsonPointer(entry.path),
|
|
38
39
|
path: jsonPointer(destination),
|
|
39
40
|
}],
|
|
40
|
-
runnableCommand:
|
|
41
|
+
runnableCommand: `${OVERRIDES_COMMAND} --fix --rule OA003`,
|
|
41
42
|
},
|
|
42
43
|
references: [
|
|
43
44
|
"https://github.com/OWASP/cve-lite-cli/blob/main/docs/rules/OA003.md",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsonPointer } from "../parsing/json-pointer.js";
|
|
2
2
|
import { compareVersions, looksLikeVersion, majorVersion } from "../../utils/version.js";
|
|
3
|
+
import { OVERRIDES_COMMAND } from "../../constants.js";
|
|
3
4
|
const RULE_ID = "OA004";
|
|
4
5
|
export function detect(ctx) {
|
|
5
6
|
if (ctx.skippedDetectors.some((s) => s.ruleId === RULE_ID))
|
|
@@ -40,7 +41,7 @@ export function detect(ctx) {
|
|
|
40
41
|
finding.fix = {
|
|
41
42
|
type: "rfc6902",
|
|
42
43
|
patch: [{ op: "remove", path: jsonPointer(entry.path) }],
|
|
43
|
-
runnableCommand:
|
|
44
|
+
runnableCommand: `${OVERRIDES_COMMAND} --fix --rule OA004`,
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
findings.push(finding);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsonPointer } from "../parsing/json-pointer.js";
|
|
2
2
|
import { readInstalledManifest } from "../parsing/node-modules.js";
|
|
3
3
|
import { satisfiesRange, isValidRange } from "../../utils/version.js";
|
|
4
|
+
import { OVERRIDES_COMMAND } from "../../constants.js";
|
|
4
5
|
const RULE_ID = "OA005";
|
|
5
6
|
/**
|
|
6
7
|
* OA005-NESTED-INEFFECTIVE - nested overrides in two shapes:
|
|
@@ -74,7 +75,7 @@ function classify(args) {
|
|
|
74
75
|
fix: {
|
|
75
76
|
type: "rfc6902",
|
|
76
77
|
patch: [{ op: "remove", path: jsonPointer(entryPath) }],
|
|
77
|
-
runnableCommand:
|
|
78
|
+
runnableCommand: `${OVERRIDES_COMMAND} --fix --rule OA005`,
|
|
78
79
|
},
|
|
79
80
|
}
|
|
80
81
|
: {}),
|