Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display npm audit vulnerabilities in html format

Is there a way to display the npm audit report as an html page?

At the moment i can only see the option to output the report in json format, using this command:

npm audit --json

like image 447
Marcs Avatar asked May 28 '18 15:05

Marcs


2 Answers

I wrote an NPM package that does this for you.

You can use it by running the following:

// first install it
npm i -g npm-audit-html

// then pipe npm audit to it
npm audit --json | npm-audit-html
like image 147
Noah Prail Avatar answered Sep 28 '22 01:09

Noah Prail


npm-audit-html is a good package, just used it.

npm install -g npm-audit-html
npm audit --json | npm-audit-html --output report.html

If you are getting the "No Input" response when running through powershell or VS Code Terminal just run it with the command prompt

like image 28
FabianDev Avatar answered Sep 28 '22 01:09

FabianDev