Skip to content

Update npm lockfile to fix npm audit advisories - #1620

Merged
KodeStar merged 2 commits into
2.xfrom
fix/npm-audit
Oct 29, 2026
Merged

KodeStar merged 2 commits into
2.xfrom
fix/npm-audit

Conversation

@KodeStar

@KodeStar KodeStar commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

npm audit reported 33 advisories on 2.x (3 critical, 15 high). All of them are in build-time dependencies of laravel-mix and webpack, none of which ship in the app. This clears 25 of them.

What changed

  • Ran npm audit fix, which only changes package-lock.json. It fixes proxy-addr, shell-quote and websocket-driver (critical), plus fast-uri, postcss, svgo, body-parser, compression, js-yaml, launch-editor, nanoid, node-forge, brace-expansion, browserslist, source-map-js and others.
  • Pinned webpack to ~5.105.4. npm audit fix raised it to 5.112.2, which breaks laravel-mix 6 in two ways: 5.106.0 started rejecting the extra ProgressPlugin options that webpackbar passes, and 5.107.0 removed webpack/lib/SizeFormatHelpers. 5.105.4 is the newest release that builds, and it already includes the fixes for both webpack advisories (patched in 5.104.1). The first commit pinned 5.106.2, which failed CI; the second commit fixes that.
  • follow-redirects is now 1.16.2, so this supersedes Bump follow-redirects from 1.16.0 to 1.16.1 in package-lock.json #1618 (thanks katsugtgz).

Checks

  • From a clean npm ci, npm run dev builds successfully and npm run lint passes.
  • Compared with a build from the old lockfile, public/js/app.js is byte-identical. public/css/app.css differs in one line: autoprefixer no longer adds -webkit-backdrop-filter, because the newer browser-support data says current Safari handles the unprefixed property. This PR doesn't rebuild public/, so the shipped assets don't change.

Left over (8 advisories)
These have no fix while we're on laravel-mix 6:

  • elliptic → browserify-sign / create-ecdh → crypto-browserify → node-libs-browser (all low). No patched elliptic exists, and none of it ends up in public/js/app.js, because the scripts are concatenated and run through Babel, not bundled.
  • webpack-dev-server 4 and webpack-dev-middleware (high). laravel-mix pins ^4, and they're only used by npm run hot.

Clearing these means moving off laravel-mix, for example to Vite with laravel-vite-plugin. I'll handle that separately.

npm audit reported 33 advisories (3 critical, 15 high), all in
transitive build-time dependencies of laravel-mix and webpack.
Ran npm audit fix, which clears 25 of them, including proxy-addr,
shell-quote, websocket-driver, fast-uri, postcss, svgo and
follow-redirects (now 1.16.2, which supersedes PR #1618 by
katsugtgz).

webpack is pinned to ~5.106.2. npm audit fix moved it to 5.112.2,
but 5.107.0 removed webpack/lib/SizeFormatHelpers, which
laravel-mix 6 requires, so the build failed. 5.106.2 is the last
release that still ships it, and it includes the fixes for both
webpack advisories (patched in 5.104.1).

A fresh npm run dev now produces output byte-identical to the
committed public/ assets.

The remaining 8 advisories have no fix within laravel-mix 6:
elliptic and its parents (no patched elliptic exists, and it is not
bundled into public/js/app.js), and webpack-dev-server 4 /
webpack-dev-middleware, which laravel-mix pins and which are only
used by npm run hot.
5.106.2 has SizeFormatHelpers, but 5.106.0 started rejecting the
extra ProgressPlugin options webpackbar passes, so npm run dev fails.
5.105.4 is the newest release that builds, and it still includes the
fixes for both webpack advisories (patched in 5.104.1).
@KodeStar
KodeStar merged commit efb2fb6 into 2.x Oct 29, 2026
1 check passed
@LinuxServer-CI LinuxServer-CI moved this from PRs to Done in Issue & PR Tracker Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant