-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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] yarn npm audit doesn't report all vulnerabilities #2507
Comments
This issue reproduces on master:
|
Quick & dirty plugin i'm using in meantime (since i'm using yarn workspaces i can't fallback to npm)
With the package.json used in the repro case and then use this command:
immer vulnerability is reported as expected |
Yarn reports no vulnerabilities (or rather, "YN0001: No audit suggestions") on our whole tree of dependencies, no matter if we pass it various options, while NPM reports 329 vulnerabilities (3 low, 324 moderate, 2 high). It's enough to prevent us from migrating from npm for the time being. Looking forward to |
Same here:
Adding the
(the suggested |
I can reproduce this in a project in our company |
Same for me. Will it be fixed? Impossible to audit vulnerabilities |
This issue still occurs. |
Describe the bug
yarn npm audit -R
(yarn2) doesn't report some vulnerabilities which are detected withnpm audit
andyarn audit
(yarn1)In my case when a dependencies is present with 2 different version, only the newer one seems to be taken into consideration, which hide the vulnerabilities of the older one
To Reproduce
Reproduction
package.json
With yarn2, no vulnerability is found
With npm, a vulnerability related to
immer
is reportedWith yarn1, the same vulnerability to
immer
is reportedEven with yarn2,
immer
dependency 1.10.0 is present in the dependency tree and should have been reported. Note that in that caseimmer
is present in two version, 1.10.0 which is vulnerable and 8.0.1 which is not vulnerable/Removing
react-scripts
dependency frompackage.json
and now theimmer
vulnerability is reported with yarn2 too (still as with npm and yarn1):So it seems that when a dependency is present with 2 different versions, only the newer one is used for the audit command which is a flaw in the vulnerability detection.
yarn npm audit feature has been added in #1892
Environment if relevant (please complete the following information):
The text was updated successfully, but these errors were encountered: