- Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Running npm audit (seemingly) always exists with a 0 exit code, even if a vulnerability is found (with a severity higher than configured by the audit-level).
In contrast, npm@8.15.0 (node@18.7.0) exits with a 1 if a vulnerability is found (with a severity higher than configured by the audit-level).
Expected Behavior
Per the Exit Code section:
[...]
If vulnerabilities were found the exit code will depend on the
audit-levelconfig.
Steps To Reproduce
- Clone https://github.com/ericcornelissen/shescape/tree/dbaa0fd36af4fd0439af87548ce710468f25cb18
- Run
npm audit - Observe a warning for (at least) the high severity vulnerability GHSA-9c47-m6qq-7p4h
- Run
echo $? - Observe a
0being printed
Environment
- npm: 9.6.5
- Node.js: v20.0.0
- OS Name: Ubuntu 22.04.2 LTS
- System Model Name: custom
- npm config:
; "user" config from ~/.npmrc update-notifier = false ; "project" config from ~/workspace/shescape/.npmrc lockfile-version = "3" save-exact = true save-prefix = "" ; node bin location = ~/.nvm/versions/node/v20.0.0/bin/node ; node version = v20.0.0 ; npm local prefix = ~/Documents/workspace/shescape ; npm version = 9.6.5 ; cwd = ~/Documents/workspace/shescape ; HOME = ~ ; Run `npm config ls -l` to show all defaults.darthmaim, anushkadoyan, chbdetta, romainmenke, screendriver and 8 more
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release