-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update yargs
dependency for @wordpress/env
to fix CVE-2021-3807.
#37601
Conversation
## 4.1.3 (2021-11-07) | ||
|
||
### Bug Fix | ||
|
||
- Fix Xdebug installation code to ensure it would fail gracefully | ||
- Fix Xdebug installation code to ensure it would fail gracefully |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These spaces were inserted automatically by the pre-commit formatting/linting.
Size Change: 0 B Total Size: 1.13 MB ℹ️ View Unchanged
|
d8a8b83
to
588c901
Compare
Fixes minor vulnerability in dependency tree: https://nvd.nist.gov/vuln/detail/CVE-2021-3807
588c901
to
a8d29db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tested well for me. I was able to run wp-env start --xdebug
and connect to xdebug successfully, and then running wp-env start
turned it back off again. Including parameters, eg. --xdebug=profile,trace,debug
also worked, but unknown params --xdebug=santa
caused an error. New tests also passed.
@glendaviesnz Thanks for the quick test! 🚀 |
Description
I noticed while working on another project that there was a minor vulnerability in my dependency tree:
The cause was
@wordpress/env
using an outdated version ofyargs
which meant it was indirectly relying on an outdated version ofansi-regex
, which had a minor regex vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2021-3807I have no clue if the issue is even relevant to
@wordpress/env
, but it annoyed me to see the issue when I would runnpm audit
on my own project, so I decided to whip up a fix real quick.How has this been tested?
It hasn't. I'm not sure if I can test
wp-env
since I've had trouble in the past getting it to even work normally. If anyone could properly test this for me, that would be very helpful.I did take a look at the only file using
yargs
(packages/env/lib/cli.js
), and I found that thecoerce
callbacks are now receivingundefined
values, so I updatedparseXdebugMode
to account for that.Types of changes
Updated dependency to fix minor vulnerability.
Checklist:
*.native.js
files for terms that need renaming or removal).