Skip to content

Fix vulnerable dependencies - #22

Merged
simonedevit merged 4 commits into
mainfrom
fix-vulnerable-dependencies
Nov 28, 2026
Merged

simonedevit merged 4 commits into
mainfrom
fix-vulnerable-dependencies

Conversation

@simonedevit

@simonedevit simonedevit commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

This PR fixes all the 57 open Dependabot alerts (24 packages) and the 26 vulnerable packages reported by npm audit. After it, npm audit reports 0 vulnerabilities.

Built on top of #21. This branch includes the commits of #21, so the dependency updates run on the new Node.js 22/24/26 CI matrix. Merge #21 first; after that, this PR shows only its own commit.

Summary

All the vulnerable packages are development dependencies:

  • webpack-dev-server and its server stack
  • Jest/jsdom
  • release and commit tooling
  • Babel
  • the React Native tooling installed as peers of @babylonjs/react-native

The built bundles (index.js, web/index.js, mobile/index.js) are byte-for-byte identical. The only change that reaches consumers is the lodash-es range.

Changes

  • Locked transitive dependencies are updated within their semver ranges (npm audit fix), plus express 4.22.3, which brings the patched qs.
  • The metro packages move to 0.83.8, still within the range required by react-native 0.82.1. This release no longer depends on the vulnerable image-size.
  • overrides cover the two packages that have no patched release within the ranges of their dependents:
    • uuid ^11.1.1 for sockjs. webpack-dev-server 5.2.7 is the latest 5.x and still depends on sockjs. sockjs only calls require('uuid').v4, which the uuid 11 CommonJS build still provides. webpack-dev-server 6 drops sockjs, but it requires Node.js >= 22.15.0, above the declared ^22.11.0.
    • minimatch ^11.0.1 for nodemon. 3.1.14 is the latest and requires ^10.2.1; it only uses the named minimatch function.
  • babel-plugin-reactylon moves to ^1.3.6. 1.3.1 declares @babylonjs/core ^7 || ^8 as a peer, so any re-resolution of the tree (npm install, npm audit fix) failed with ERESOLVE against Babylon.js 9.
  • @babylonjs/gui is pinned to 9.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-es is 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 their npm audit reports.

Dependabot

The dependency graph of this repository is stale. For example, it still reports lodash 4.17.21 and handlebars 4.7.8, while main has locked 4.18.1 and 4.7.9 since 8cadfd3. Because of this, 13 of the 57 alerts (7 packages) were already fixed on main.

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 main after the merge.

Testing

  • On Node.js 22.11.0, 22.23.5, 24.11.0, 24.22.3, 26.13.0 and 26.13.1, with 0 EBADENGINE warnings, these all pass:
    • npm ci
    • Jest (30/30)
    • the production build
    • the full npm run build of the workspaces (generator output unchanged)
    • commitlint, tsc and Prettier
  • No locked package declares an engines.node range that excludes 22.11.0, 24.11.0 or 26.13.0.
  • Tooling smoke tests on Node.js 22.11.0 and 26.13.1: commit-and-tag-version --dry-run, nodemon watch and restart, sockjs with uuid 11, webpack serve.
  • Re-resolving the lockfile with npm 11.19.1 and 11.20.0 doesn't change it.
  • The three new transitive packages (is-unsafe, anynum, @isaacs/nonrecursive-glob-match) come from the maintainers of the packages that require them (fast-xml-parser/strnum and minimatch).

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.
@sonarqubecloud

Copy link
Copy Markdown

@simonedevit
simonedevit merged commit e69cbe6 into main Nov 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant