Skip to content

chore(frontend): modernize, fix vulns, retire deprecated config - #36

Merged
alparamonov merged 1 commit into
mainfrom
chore/frontend-modernization
May 14, 2026
Merged

chore(frontend): modernize, fix vulns, retire deprecated config#36
alparamonov merged 1 commit into
mainfrom
chore/frontend-modernization

Conversation

@alparamonov

Copy link
Copy Markdown
Contributor

Closes the open Dependabot PR (#35) and gets the frontend onto current minors with a clean npm audit.

Why CI was failing

The audit gate (npm audit --omit=dev) flags two findings on next@16.1.5:

  1. The 12 advisories patched in next@16.2.6 (proxy bypass, RSC DoS, SSRF via WS upgrade, XSS via CSP nonces, etc.).
  2. A transitive postcss < 8.5.10 (GHSA-qx2v-qp2m-jg93, XSS via unescaped </style>).

Dependabot's PR #35 only fixes #1, so audit still fails on #2 -- which is why the bot keeps re-opening it without ever going green. The fix is a package.json overrides block that dedupes postcss to a patched version. Same pattern that unblocked websocket-sessions-management.

Changes

  • next 16.1.5 -> 16.2.6
  • bootstrap 5.3.2 -> 5.3.8
  • react / react-dom ^18 -> ^18.3.1 (staying on 18 for react-bootstrap@2.x peer compat; v3 is still alpha)
  • react-bootstrap 2.10.0 -> 2.10.10
  • react-use-websocket 4.5.0 -> 4.13.0
  • Add overrides: { postcss: "^8.5.10" }
  • Drop swcMinify: true from next.config.mjs (removed in Next 15+; option is now invalid -- SWC minify is the default).
  • Drop the lint: "next lint" script (the next lint subcommand was removed in Next 16; not referenced by CI).
  • Bump actions/checkout@v3 -> @v4 in CI (v3 runs on the EOL Node 16 runner).

Verified locally (Node 22.22.2)

  • npm audit --omit=dev -> 0 vulnerabilities
  • npm run build -> Next 16.2.6 Turbopack, static export, 3/3 pages
  • npm run dev -> HTTP 200 on /, no warnings, ready in 288 ms

Out of scope

None -- backend (template.yml, handlers/) is untouched.

- Bump next 16.1.5 -> 16.2.6 (closes Dependabot PR #35; fixes 12 advisories incl. proxy bypass, RSC DoS, SSRF, XSS).
- Pin all deps to current minors:
  - bootstrap 5.3.2 -> 5.3.8
  - react / react-dom 18.x -> 18.3.1 (stay on 18 for react-bootstrap 2.x peer compat)
  - react-bootstrap 2.10.0 -> 2.10.10
  - react-use-websocket 4.5.0 -> 4.13.0
- Add 'overrides: { postcss: ^8.5.10 }' to dedupe transitive postcss
  (GHSA-qx2v-qp2m-jg93 XSS via unescaped </style>). This is the CI gate
  ('npm audit --omit=dev'); without the override, individual Dependabot
  PRs cannot pass because each only fixes one of the two findings.
- Drop swcMinify from next.config.mjs (removed in Next 15+; SWC minify is
  the default and the option is now invalid).
- Drop 'lint': 'next lint' (the 'next lint' subcommand was removed in
  Next 16). Not used by CI.
- Bump actions/checkout v3 -> v4 (v3 reaches EOL; runs on the deprecated
  Node 16 runner image).

Verified locally on Node 22:
- npm audit --omit=dev -> 0 vulnerabilities
- npm run build -> success (Next 16.2.6 Turbopack, static export, 3/3 pages)
- npm run dev -> HTTP 200 on /, no warnings
@alparamonov
alparamonov merged commit 178a9f4 into main May 14, 2026
6 checks passed
@alparamonov
alparamonov deleted the chore/frontend-modernization branch May 14, 2026 20:27
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.

2 participants