Skip to content

chore: reduce CVE surface in npm deps#7

Open
dsimansk wants to merge 3 commits into
openshift:masterfrom
dsimansk:pr/bump-deps
Open

chore: reduce CVE surface in npm deps#7
dsimansk wants to merge 3 commits into
openshift:masterfrom
dsimansk:pr/bump-deps

Conversation

@dsimansk

@dsimansk dsimansk commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • Reduce npm CVE surface from 88 to 42 advisories (critical 1->0) by removing abandoned packages, upgrading transitive deps, and adding yarn resolutions for known vulnerabilities
  • Upgrade OCP Console SDK from 4.21 to 4.23 with peer dependency migrations: React 17->18, react-router 5->7, react-i18next 11->16, i18next 23->25, @testing-library/react 12->16
  • Remove unused Babel packages (@babel/core, @babel/preset-env, babel-loader) and Cypress with all related packages (Playwright will be used for e2e)
  • Replace custom i18n shell/JS pipeline (build-i18n.sh, lexers.js, set-english-defaults.js) with i18next-cli and a TypeScript config

Test plan

  • yarn build succeeds
  • yarn test passes
  • yarn i18n extracts locale keys correctly
  • yarn lint passes
  • npm audit shows reduced advisory count

Removed abandoned prettier-stylelint (not referenced,
pulled ancient transitive deps). Upgraded webpack-dev-server
5.2.3->5.2.5, vitest+coverage-v8 4.1.5->4.1.9, mocha
11.7.5->11.7.6, cypress 15.11.0->15.17.0. Added yarn
resolutions for launch-editor, shell-quote, and
serialize-javascript to fix transitive CVEs including a
critical shell-quote newline escape vulnerability.

Total advisories reduced from 88 to 71 (critical 1->0,
high 33->28).

Co-Authored-By: Claude <noreply@anthropic.com>
@openshift-ci openshift-ci Bot requested review from Cragsmann and matejvasek June 22, 2026 12:43
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 22, 2026
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2026
@matejvasek

Copy link
Copy Markdown

I see this is WIP, is there more to be done?

dsimansk and others added 2 commits June 23, 2026 13:27
Upgrade OCP Console SDK from 4.21 to 4.23 with all required dependency
migrations: React 17->18, react-router 5->7, react-i18next 11->16,
i18next 23->25, @testing-library/react 12->16.

Remove unused Babel packages (@babel/core, @babel/preset-env,
babel-loader) since webpack uses ts-loader.

Remove Cypress and all related packages (cypress, mocha, mochawesome,
@cypress/webpack-preprocessor, eslint-plugin-cypress). Cypress won't be
used for e2e testing, Playwright will be used instead.

Add yarn resolutions for transitive CVE fixes: fast-uri, flatted,
follow-redirects, http-proxy-middleware, postcss, vite, ws, minimatch.

CVE count reduced from 88 to 42. Remaining CVEs are upstream-constrained
(SDK, react-router ~7.13.x) or dev-only transitive with no production
exposure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrate from custom shell/JS i18n pipeline (build-i18n.sh, lexers.js,
set-english-defaults.js) to i18next-cli with a TypeScript config.
Drop unused pluralize dependency. Re-extract locale keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dsimansk

Copy link
Copy Markdown
Author

I see this is WIP, is there more to be done?

Yep, I need a few iterations to get the correct approach. I.e. starting from console sdk bump, and then continue with what else can be updated.

@dsimansk dsimansk changed the title WIP: chore: reduce CVE surface in npm deps chore: reduce CVE surface in npm deps Jun 23, 2026
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2026
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

@dsimansk: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants