tsdx icon indicating copy to clipboard operation
tsdx copied to clipboard

Vulnerable version of node-notifier in dependency tree

Open gjgd opened this issue 3 years ago • 6 comments

I got a security notice for node-notifier in my project that uses [email protected] (see screenshot below)

This is the output of npm ls node-notifier:

➜ npm ls node-notifier

└─┬ [email protected]
  └─┬ [email protected]
    └─┬ @jest/[email protected]
      └─┬ @jest/[email protected]
        └── [email protected]

Looks like updating the version of jest to 26.0.0 would fix this issue

Screenshot

Screenshot 2020-12-24 at 12 00 51

gjgd avatar Dec 24 '20 11:12 gjgd

Thanks for reporting this, I see the same issue here. I'm not sure if the vulnerable code path actually affects us though.

Looks like updating the version of jest to 26.0.0 would fix this issue

Unfortunately that is easier said than done given that it would require a breaking change.

The patch in node-notifier is quite small, so I would think that would be simple to backport to v6 as well.

Jest 26 was also vulnerable until a backport was made for v8.

agilgur5 avatar Dec 24 '20 14:12 agilgur5

Hi @agilgur5, thank you for commenting. Are you planning to upgrade in the near future? :thinking:

balazser avatar Mar 22 '21 09:03 balazser

Hope that the outdated internal dependencies such as Jest can be either updated soon too! 🤞 Or maybe it would make more sense for them to be completely removed (and make users install their own dependencies 100% of the time), given the maintenance level here.

But for the meantime, a workaround that may help for some people is to force upgrade of the transitive dependency via Yarn Resolutions (add to package.json if you're using Yarn and run yarn):

  "resolutions": {
    "tsdx/**/node-notifier": "10.0.0"
  }

karlhorky avatar Jun 05 '21 13:06 karlhorky

@karlhorky @agilgur5 Any way us non-yarn users can sort this security alert out without having to add yet another dependency to add resolutions support to npm via a third party package?

zeusdeux avatar Aug 06 '21 13:08 zeusdeux

Not at the moment - tsdx would need to upgrade and publish a release. If you don't want to use yarn or pnpm, eventually npm will have this feature (it will be called Overrides)

karlhorky avatar Aug 06 '21 13:08 karlhorky

Gotcha. Thanks @karlhorky! And appreciate the quick response! 🙏🏼

zeusdeux avatar Aug 06 '21 14:08 zeusdeux