Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check for only high vulnerabilities when using "npm audit"?

When you I execute npm install using new npm 6 i got a messages that tell me I have some vulnerabilities :

[!] 75 vulnerabilities found [4867 packages audited]

Severity: 66 Low | 4 Moderate | 5 High

Run npm audit for more detail

I ran npm audit but got a truncated list of vulnerabilities.

How I can check for only High vulnerabilities list ?

Thanks

like image 394
Wajih Avatar asked May 13 '18 08:05

Wajih


People also ask

How do I manually review npm vulnerabilities?

You can also run npm audit manually on your locally installed packages to conduct a security audit of the package and produce a report of dependency vulnerabilities and, if available, suggested patches. On the command line, navigate to your package directory by typing cd path/to/your-package-name and pressing Enter.


2 Answers

Not the answer you are looking for, but it will do the same:

npm audit | grep -B 1 -A 10 High 
like image 190
neo post modern Avatar answered Sep 29 '22 03:09

neo post modern


This one worked for me:

Show High Only

npm audit | grep -E "(High)" -B3 -A10 

Show both Critical and High Issues

npm audit | grep -E "(High | Critical)" -B3 -A10 

Look at the issue discussion where this solution is proposed.

like image 33
stayingcool Avatar answered Sep 29 '22 05:09

stayingcool