npm-audit-report
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -18,7 +18,5 @@ 'use strict' | ||
for (const [name, vuln] of Object.entries(data.vulnerabilities)) { | ||
if (printed.has(vuln)) | ||
continue | ||
printed.add(vuln) | ||
output.push(printVuln(vuln, c, data.vulnerabilities, printed)) | ||
// only print starting from the top-level advisories | ||
if (vuln.via.filter(v => typeof v !== 'string').length !== 0) | ||
output.push(printVuln(vuln, c, data.vulnerabilities)) | ||
} | ||
@@ -31,3 +29,7 @@ | ||
const printVuln = (vuln, c, vulnerabilities, printed, indent = '') => { | ||
const printVuln = (vuln, c, vulnerabilities, printed = new Set(), indent = '') => { | ||
if (printed.has(vuln)) | ||
return null | ||
printed.add(vuln) | ||
const output = [] | ||
@@ -74,7 +76,5 @@ | ||
const vuln = vulnerabilities[effect] | ||
// still print it again if it has its own advisory as well | ||
if (vuln.via.filter(v => typeof v !== 'string').length === 0) | ||
printed.add(vuln) | ||
const e = printVuln(vuln, c, vulnerabilities, printed, ' ') | ||
output.push(...e.split('\n')) | ||
if (e) | ||
output.push(...e.split('\n')) | ||
} | ||
@@ -81,0 +81,0 @@ |
{ | ||
"name": "npm-audit-report", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "Given a response from the npm security api, render it into a variety of security reports", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14661