-
-
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
Update dependencies to non-vulnerable versions #10491
Comments
When evaluating whether something is a vulnerability, you have to look at the attack vector and the respective cost of upgrading. The first one,
It's depended on by three paths.
We do intend to upgrade to Similarly,
Not going to explain it further but all of these are dev dependencies. As a closing remark, https://overreacted.io/npm-audit-broken-by-design/ is worth a read on why you should generally not worry about dependabot alerts in Docusaurus projects. We build a static website and the attack vector is extremely narrow, if it even exists. |
Partial output of
Note
This advisory states that an update to version 3.3.0 is available. Apparently, npm does not know that this version is available. A manual install can be performed: After this, the newly installed files need to be moved to Once this is done for several vulnerable packages |
@Josh-Cena Thank you for your thorough reply. 😺 |
I'd like to bring up a different side, even though I understand that it's an intentional decision not to update development dependencies. This issue in question has caused all my projects that depend on a cron (not an external bot), to stop working, because For now, I think the only way is to ignore the exit code, but it could allow automatic commits for different errors. @Josh-Cena, although this issue was closed as unplanned, if PRs are welcome, it would be great to know 🙋🏻♂️ Regardless, thanks in advance for your attention and for Docusaurus 🦖💙 For context: |
@wellwelwel we do accept PRs to fix warnings yes. Just don't overestimate the work it might require just to fix an harmless warning. If we don't fix it immediately, the reason is usually because it's not trivial at all, likely because the dependency is transitive and can't be upgraded without handling breaking changes of another larger library. You want to fix a small warning and often end up upgrading Webpack or something similar to the next major, requiring a Docusaurus breaking change and a new major version. |
@Josh-Cena |
They are dev dependencies to you—that is they won't be executed in the production environment. But they are real dependencies to us—that is they need to be transitively installed when you install the package. Dev dependencies declared in package.json won't be installed when published. |
If First, we don't particularly recommend using Second, So it's technically impossible that even if you tried to DOS yourself using this vulnerability you'd succeed to do it without modifying our internal code. For this reason, we don't consider this kind of vulnerability to be worth fixing. At least we don't prioritize them unless proven dangerous. DOS vulnerabilities for a SSG are usually harmless because there's no runtime once the build succeeded. At best your CI job will fail due to the vulnerability. |
Hi @slorber - I hope this message finds you well. First, I would like to express our gratitude for your hard work in maintaining I completely understand your point about the low risk posed by the vulnerability in question, especially given that it's a "dev" dependency and should not be deployed in production environments. However, I would like to offer some perspective from our end, as an organization that must adhere to strict compliance and security standards. Like many organizations today, we rely heavily on automated security and compliance tooling to ensure the integrity of our software supply chain. These tools often flag any vulnerabilities in our dependencies, whether dev or production, without allowing for much distinction in risk level. Unfortunately, this can place us in a difficult position, as we are obligated to address these flags to meet internal and external security policies. While the actual risk of this particular issue might be minimal, having a clean security slate across all dependencies—even those only used in development—makes it significantly easier for us to maintain our compliance posture, which is becoming an increasingly important requirement for SaaS platforms like ours. I kindly ask if you might reconsider updating the sub dependency in question. While I understand this may seem like a minor or low-priority task, this change could make a meaningful difference for organizations in heavily regulated sectors like ours. Thank you again for your hard work, and I hope you understand our position. We look forward to continuing to use and support |
Consider either resolving the dependency to a different version and hoping it works, patching the package locally, or sending a PR to us to update it. As we said, we have priorities and we are not going to invest extra time ourselves simply because some companies have bad security models. We will get to it one day, but the driving force of fixing issues caused by your workflow is ultimately you. |
@ryanv-knack I understand your point of view, but we have limited bandwidth and have to arbitrate between shipping meaningful improvements for all Docusaurus users, or investing time fixing warnings for those companies that have strict security requirements like yours. Your company has strict security requirements and inflexible policies that do not acknowledge the fact a vulnerability could actually be harmless. That's your company's problem, not ours. Instead of penalizing the Docusaurus ecosystem by reducing our bandwidth to implement new features and useful bug fixes, you should advocate for your company to change its security policies. I understand that's not what you want to hear, but we don't plan to redirect our efforts to fixing those harmless warnings. Don't underestimate the cost for us to fix all the security warnings we have. Even if they are harmless, fixing all of them could take months, freeze the development of Docusaurus, and lead us to release breaking changes. If you still want to use Docusaurus and don't plan to fix the inflexible security policies, there are options:
It turns out that companies in regulated sectors that have such security policies are usually well-funded and can afford to contribute to the OSS software they use. |
Caution What if the dev environment got compromised, which lead to a compromise of the developer's laptop, which further lead to the compromise of the production environment. High profile cases like this have already happened. FreeBSD comes to mind.
That's probably the attitude that leads to these type of break-ins. And it doesn't make sense coming from a company with a $1.5 trillion dollar market capitalization. Perhaps it's time to bring this topic up at the next major security-related event. |
If a dev environment can be compromised, we'll consider it a top priority to fix. That's not the case here, unless proven otherwise. As far as I know, the reported vulnerabilities are RegExp DOS that can at best slow down / freeze the dev environment, not compromising it. And in most cases you'd have to DDOS yourself or have a malicious teammate trying to annoy you. If you have a malicious teammate with Git access, this is more scary than having a local DDOS.
You misunderstand how Meta allocates budget to OSS projects, and what it means to adopt MIT-licensed projects. Let's remind you: https://github.com/facebook/docusaurus/blob/main/LICENSE
If these terms do not satisfy you, try another software with paid support and SLAs. |
Note serve-handler published v6.1.6 which upgrades path-to-regexp from v2 to v3 and remove one of those "vulnerable" dependencies (path-to-regexp v2). We'll force all projects to upgrade in Docusaurus v3.6 but you can still upgrade this transitive dep independently. See also #10587 |
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
Two packages required by docusaurus are outdated and are throwing security warnings in dependabot.
Please update:
Reproducible demo
No response
Steps to reproduce
This is a dependabot alert. It tries to upgrade dependent packages to non-vulnerable versions.
Expected behavior
Docusaurus packages would be secure and updated.
Actual behavior
Security alerts
Your environment
Self-service
The text was updated successfully, but these errors were encountered: