Repository navigation
Fix vulnerable dependencies - #22
Merged
Merged
Conversation
Fix all the 57 open Dependabot alerts and the 26 packages reported by npm audit, all in development dependencies: - update the locked transitive dependencies within their ranges (npm audit fix, express 4.22.3 for qs) - move the metro packages to 0.83.8, which no longer depend on the vulnerable image-size - override uuid (for sockjs) and minimatch (for nodemon): no patched release fits the ranges of their dependents - bump babel-plugin-reactylon to ^1.3.6: 1.3.1 declares a Babylon.js <= 8 peer, which made any re-resolution fail with ERESOLVE
The workspace still resolved @babylonjs/gui 8.56.2, installed before the upgrade to Babylon.js 9, whose peer dependency requires @babylonjs/core ^8. Pin it to the version of core (9.0.0), so tests and the generator use the same GUI major as users. The generated declarations don't change. Core and GUI must stay on the same version, so update them together.
lodash-es up to 4.17.23 is affected by GHSA-r5fr-rjxr-66jc and GHSA-f23m-r3pf-42rh. Reactylon doesn't use the affected functions and bundles lodash-es, but the previous range let consumers keep a vulnerable copy, which their npm audit reports.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR fixes all the 57 open Dependabot alerts (24 packages) and the 26 vulnerable packages reported by
npm audit. After it,npm auditreports 0 vulnerabilities.Summary
All the vulnerable packages are development dependencies:
@babylonjs/react-nativeThe built bundles (
index.js,web/index.js,mobile/index.js) are byte-for-byte identical. The only change that reaches consumers is thelodash-esrange.Changes
npm audit fix), plusexpress4.22.3, which brings the patchedqs.metropackages move to 0.83.8, still within the range required by react-native 0.82.1. This release no longer depends on the vulnerableimage-size.overridescover the two packages that have no patched release within the ranges of their dependents:uuid^11.1.1forsockjs. webpack-dev-server 5.2.7 is the latest 5.x and still depends onsockjs.sockjsonly callsrequire('uuid').v4, which the uuid 11 CommonJS build still provides. webpack-dev-server 6 dropssockjs, but it requires Node.js >= 22.15.0, above the declared^22.11.0.minimatch^11.0.1fornodemon. 3.1.14 is the latest and requires^10.2.1; it only uses the namedminimatchfunction.babel-plugin-reactylonmoves to^1.3.6. 1.3.1 declares@babylonjs/core ^7 || ^8as a peer, so any re-resolution of the tree (npm install,npm audit fix) failed withERESOLVEagainst Babylon.js 9.@babylonjs/guiis pinned to9.0.0, the version of@babylonjs/core. The workspace still resolved 8.56.2, installed before the upgrade to Babylon.js 9, whose peer dependency requires core^8. The generated declarations don't change. Core and GUI must stay on the same version.lodash-esis now required as^4.18.1. Versions up to 4.17.23 are affected by GHSA-r5fr-rjxr-66jc and GHSA-f23m-r3pf-42rh. Reactylon doesn't use the affected functions and bundles lodash-es, but the old range let consumers keep a vulnerable copy that theirnpm auditreports.Dependabot
The dependency graph of this repository is stale. For example, it still reports lodash 4.17.21 and handlebars 4.7.8, while
mainhas locked 4.18.1 and 4.7.9 since 8cadfd3. Because of this, 13 of the 57 alerts (7 packages) were already fixed onmain.I checked all 57 alerts against the new lockfile: none of the locked versions is in a vulnerable range anymore. The alerts should close once the dependency graph processes
mainafter the merge.Testing
EBADENGINEwarnings, these all pass:npm cinpm run buildof the workspaces (generator output unchanged)tscand Prettierengines.noderange that excludes 22.11.0, 24.11.0 or 26.13.0.commit-and-tag-version --dry-run,nodemonwatch and restart,sockjswith uuid 11,webpack serve.is-unsafe,anynum,@isaacs/nonrecursive-glob-match) come from the maintainers of the packages that require them (fast-xml-parser/strnum and minimatch).