faq labelnode node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you _not_ install Mocha globally.When adding Mocha to a project for the first time or regenerating package-json for a project, the following warning appears:
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
$ mkdir test1
$ cd test1
$ npm init
(just press enter for each prompt)
$ npm install mocha --save-dev
Expected behavior: [What you expect to happen]
npm adds mocha to the project without any deprecation warning.
Actual behavior: [What actually happens]
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
- [email protected]
added 101 packages from 51 contributors and audited 102 packages in 9.219s16 packages are looking for funding
runnpm fundfor detailsfound 0 vulnerabilities
Reproduces how often: [What percentage of the time does it reproduce?]
100%
8.2.1
mocha --version and node node_modules/.bin/mocha --version: 8.2.1 (local) , no global version installednode --version: v12.20.0it looks from the issue that it should only affect those who are using unsanitized input from a user
it looks from the issue that it should only affect those who are using unsanitized input from a user
Like the following?
https://github.com/mochajs/mocha/blob/v8.2.1/lib/cli/cli.js#L38
I believe we don't use %o with user input now.
debug team said like:
You are only affected if you pass un-sanitized, long user input to debug(ns)(...) - specifically, by way of the %o formatter - in Node.js. All other cases are unaffected.
https://github.com/mochajs/mocha/blob/v8.2.1/lib/cli/cli.js#L38 doesn't look that case.
Not sure why this was closed. The deprecation message is still shown when installing mocha, security vulnerability or not.
@outsideris The issue isn't necessarily that there might be an open attack vector in mocha. The issue is an out-of-the-box Warning popping up that Mocha is using deprecated and vulnerable dependencies. We can not ship code to clients if the first thing that they see during the deployment is a warning about the usage of deprecated software with known vulnerabilities.
Can you please reopen this issue and resolve it when the version of debug has been updated? Thank you!
Installation time its getting above same kind error with Loopback framework.
I've closed it because I can't find an attack vector in real and we cannot release new versions right after upgrading debug module.
However, I understood how annoying the warning messages are.
Most helpful comment
I've closed it because I can't find an attack vector in real and we cannot release new versions right after upgrading debug module.
However, I understood how annoying the warning messages are.