Skip to content

chore: update vulnerable client build dependencies - #30

Merged
andresvillenas merged 1 commit into
mainfrom
chore/npm-audit-fix
Sep 24, 2026
Merged

andresvillenas merged 1 commit into
mainfrom
chore/npm-audit-fix

Conversation

@andresvillenas

Copy link
Copy Markdown
Collaborator

Summary

Clears the high-severity npm audit finding, and three moderate ones, in the administration client's build tooling. It runs npm audit fix without --force, which bumps four transitive packages:

Package From To Pulled in by Severity
fast-uri 3.1.5 3.1.8 webpack → terser-webpack-plugin → schema-utils → ajv high
qs 6.15.3 6.16.0 webpack-dev-server → express / body-parser moderate
express 4.22.2 4.22.3 webpack-dev-server moderate
body-parser 1.20.6 1.20.8 webpack-dev-server moderate

Only package-lock.json changes; package.json is untouched. The lockfile is marked -diff in .gitattributes, so GitHub doesn't render its diff. A package-by-package comparison of packages against main shows exactly the four version changes above and nothing else.

None of these reach consumers. The shipped admin module (Client/dist, about 16 KB) only imports react, @kentico/xperience-admin-base and @kentico/xperience-admin-components, which the host's Xperience admin provides at runtime. It contains no code from any audited package, and it is byte-identical after this change.

Remaining findings (7 moderate), left as they are

  • uuid < 11.1.1 (webpack-dev-server → sockjs, local npm start only): the advisory covers v3, v5 and v6 called with a buffer argument. sockjs only calls uuidv4() with no arguments (sockjs/lib/transport.js). Clearing it needs webpack-dev-server 6, a major upgrade that isn't justified for a finding that doesn't apply.
  • react-router 6.30.1 (via @kentico/xperience-admin-* 30.11.0): these packages are pinned to the minimum supported Xperience version on purpose, so CI builds the client against it. The audit's suggested fix is 31.8.4, which would break that check and wouldn't change what customers run. The bundle doesn't include react-router; the customer's own admin supplies it, and updating Xperience fixes it for them.

Test plan

  • npm audit: 11 findings (1 high, 10 moderate) → 7 moderate.
  • npm run typecheck passes. npm test: 17/17 pass. npm run build output is byte-identical (same bundle hash).

npm audit fix, without --force, bumps four transitive packages used only
by the client build and the local dev server:

- fast-uri 3.1.5 -> 3.1.8 (high; via webpack's schema validation)
- qs 6.15.3 -> 6.16.0
- express 4.22.2 -> 4.22.3
- body-parser 1.20.6 -> 1.20.8 (via webpack-dev-server)

The built admin bundle is byte-identical. The seven remaining moderate
findings are left as they are: uuid only reaches the local dev server
through sockjs, which calls v4() without a buffer, so the advisory does
not apply; and react-router comes from the minimum-version Kentico admin
packages, which the bundle does not include because the host admin
provides them at runtime.
@andresvillenas
andresvillenas merged commit 90e42b3 into main Sep 24, 2026
3 checks passed
@andresvillenas
andresvillenas deleted the chore/npm-audit-fix branch September 24, 2026 04:51
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