-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Replace wait-on dependency #9537
Comments
Please see #6394 (comment) for our stance on security bugs. This one in particular has exactly zero impact because our usage of |
@Josh-Cena would you accept a contribution changing the dep? I fully agree with your assessment on the lack of a real-world security risk associated with this warning (or most other JS CVEs). Though some teams and companies do still try to keep clean regardless. I think I could avoid work for those folks if I changed this at the library level, instead of for a single repo’s resolutions consuming Docusarus. E.g. Metas infrastructure pinged me as RN oncall about even a medium level GitHub vulnerability on React Native Website. It will ping other owners of OSS Docusaurus repoes at Meta at the same time to fix it, so N people now get separate issues to fix this, because the policy is set at a greater organizational level. |
Sure, if you want to work on a fix, PRs are definitely welcome. I'll re-open the issue for now so you could track it. I certainly would like to see a library that's more maintained and significantly smaller (without all the observables/HTTP dependencies). |
axios
< 1.6.0 triggering GitHub vulnerability warningsFixes facebook#9537 This change removes usage of `wait-on`, and replaces it with an effective copy of the algorithm it ends up taking for our use case. 1. `wait-on` sees a file as present when `fs.stat` on the path stops throwing 2. It polls on a timer (which WaitPlugin sets to 300ms) 3. It waits until a time has passed without file size changing (defaults to 750ms) 4. `wait-on` defaults to no timout, so we poll forever. See https://github.com/jeffbski/wait-on/blob/master/lib/wait-on.js for reference
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
@docusaurus/core
depends onwait-on@^7.0.1
, which in turn depends onaxios@^0.27.2
. This version will now trigger GitHub vulnerability warnings due to axios/axios#6006 effectingaxios
before1.6.0
.The newest version of
wait-on
still depends on old version of axios. Docusaurus only uses it in a single place, so it seems reasonable to remove or replace the dependency with something else.docusaurus/packages/docusaurus/src/webpack/plugins/WaitPlugin.ts
Line 10 in b464545
Reproducible demo
No response
Steps to reproduce
yarn audit
Docusaurus appExpected behavior
Audit is clean
Actual behavior
Audit shows vulns from axios
Your environment
No response
Self-service
The text was updated successfully, but these errors were encountered: