nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.75k stars 1.3k forks source link

chore: updating mocha from 10.2.0 -> 10.3.0 to remove CVE-2022-3517 #4199

Closed athammer closed 1 month ago

athammer commented 2 months ago

PR to update mocha version to remove CVE-2022-3517 found in the minimatch package that's a dependency of mocha <= 10.2.0.

Tests passed, assuming this one didn't just due to my local env, looks like just a few __ are missing. Screenshot 2024-04-29 at 2 26 50 PM

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 2 months ago

Status

garg3133 commented 1 month ago

While updating mocha to v10.3.0 seems okay, I don't see how it removes the CVE-2022-3517 vulnerability. This vulnerability is non-existent in Nightwatch v3.6.1 (latest one).

This vulnerability was fixed in minimatch v3.0.5 and if you check the package-lock.json for Nightwatch, all the minimatch versions installed are above v3.0.5. The glob dependency of minimatch does mention minimatch version as ^3.0.4 but due to the ^ sign used, the actual version installed is v3.1.2.

But anyways, this PR looks good to me.

garg3133 commented 1 month ago

Merged, thanks!

athammer commented 1 month ago

oh interesting, was following our package-lock file and we were installing that minimatch version due to the mocha version in nightwatch. Wondering if it's due to our own internal registry, either way this will fix it for us and hopefully others in our situation. So thank you!