Skip to content
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

Npm audit failing for jest 24.8.0 with severity high on 26k+ dependencies #8682

Closed
lmammino opened this issue Jul 12, 2019 · 15 comments · May be fixed by joseroubert08/jest#34 or joseroubert08/jest#76
Closed

Comments

@lmammino
Copy link

lmammino commented Jul 12, 2019

🐛 Bug Report

Npm audit failing for jest 24.8.0 with severity high on 26k+ dependencies

To Reproduce

mkdir new-project && cd new-project
npm init -y
npm install --save [email protected]
npm audit

Should produce the following output:

+ [email protected]
added 547 packages from 362 contributors and audited 873711 packages in 15.659s
found 12675 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

Also see attached npm audit report in JSON format

🍕npm_audit_output.json.zip

Expected behavior

N/D

Link to repl or repo (highly encouraged)

N/D

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.4.0 - ~/n/bin/node
    npm: 6.9.2 - ~/n/bin/npm
  npmPackages:
    jest: ^24.8.0 => 24.8.0
@randytorres
Copy link

Same issue here

@ghost
Copy link

ghost commented Jul 12, 2019

It looks like the offending package down the dependency tree is set-value.

I ran this command npm audit --json | npm-audit-html and got the following report attached.
npm-audit.html.zip

@dgowrie
Copy link

dgowrie commented Jul 12, 2019

Seems unpatched versions of mixin-deep and set-value are the source of most (all?) of these vulnerabilities.

mixin-deep advisory here https://www.npmjs.com/advisories/1013

Please update to version 2.0.1 or later, a critical bug was fixed in that version.

set-value advisory here https://www.npmjs.com/advisories/1012

Please update to version 3.0.1 or later, a critical bug was fixed in that version.

@tinoqq
Copy link

tinoqq commented Jul 12, 2019

BUMP

@nzacca
Copy link

nzacca commented Jul 12, 2019

Would it be possible to upgrade micromatch to version ^4? Seems this version removes a dependency on snapdragon which has mixin-deep in its chain. Seems there are a lot of jest-* packages that have micromatch 3 as a dependency though.

Edit: Might not be able to since micromatch 4 requires node 8.

@jeysal
Copy link
Contributor

jeysal commented Jul 12, 2019

Upgrading micromatch to v4 (breaking) is planned for Jest 25, for performance reasons as well

@dacevedo12
Copy link

Same here, set-value has been reported as vulnerable since past friday

@lmammino
Copy link
Author

@jeysal, is there an estimate release date for v25?

@jeysal
Copy link
Contributor

jeysal commented Jul 12, 2019

@lmammino There'll be at least one more minor release soon before the phase of landing breaking changes for 25 starts

@lucaurso
Copy link

npm audit fix fixes the problem

@omeraha
Copy link

omeraha commented Jul 15, 2019

Same for me - npm audit fix fixed the problem

@SimenB
Copy link
Member

SimenB commented Jul 15, 2019

If npm audit fix fixes the problem, it means all fixed packages are within semver range of Jest and its dependencies. So I think we can close this.

(Happy to take PRs increasing the minimum version of Jest's deps if it helps pull in upstream fixes when we do make a release)

@SimenB SimenB closed this as completed Jul 15, 2019
@lmammino
Copy link
Author

lmammino commented Jul 15, 2019

Great to see the community moved so fast on this! Thanks to everyone involved

@SimenB
Copy link
Member

SimenB commented Jul 16, 2019

(Happy to take PRs increasing the minimum version of Jest's deps if it helps pull in upstream fixes when we do make a release)

Both mixin-deep and set-value originates from braces which comes in through micromatch. So not much we can bump on our side beyond micromatch 4 (which is a breaking change, as mentioned above) to bubble up fixed versions.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
10 participants