-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npm audit does not exit with exit code 1 if a vulnerability is found #2868
Comments
I can confirm this issue is also happening on npm 7.6.0 and doesn't seem to be related to severity since |
We also experienced this issue. We were using Obviously we are now using |
Can confirm, this is a problem. Prioritizing accordingly |
Current Behavior:
Running npm audit in a reposity with a vulnerable package will give the correct report output, but will not exit with status code 1.
Expected Behavior:
Same as in NPM V6 and as stated in the V7 Docs: "By default, the audit command will exit with a non-zero code if any vulnerability is found."
Steps To Reproduce:
I don't know if this problem applies only to lo severity findings. Our workaround currently is to use
npm audit --audit-level=low
which will exit correctly with 1.Environment:
The text was updated successfully, but these errors were encountered: