Closed
Description
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:
- npm install [email protected]
- npm audit
- echo $?
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:
- OS: Ubuntu 20.04
- Node: v14.16.0
- npm: 7.6.3