Skip to content

Fix React security vulnerabilities via npm audit fix and overrides#277

Open
vmuralictr wants to merge 2 commits into
openmainframeproject:masterfrom
vmuralictr:fix/security-updates-244
Open

Fix React security vulnerabilities via npm audit fix and overrides#277
vmuralictr wants to merge 2 commits into
openmainframeproject:masterfrom
vmuralictr:fix/security-updates-244

Conversation

@vmuralictr
Copy link
Copy Markdown
Collaborator

Reduced vulnerabilities from 54 to 4 (all moderate, dev-only). Added package.json overrides for nth-check, postcss, serialize-javascript, @tootallnate/once, and underscore. Remaining 4 are locked in react-scripts uuid chain with no non-breaking fix available (CRA upstream limitation).

Reduced vulnerabilities from 54 to 4 (all moderate, dev-only).
Added package.json overrides for nth-check, postcss,
serialize-javascript, @tootallnate/once, and underscore.
Remaining 4 are locked in react-scripts uuid chain with no
non-breaking fix available (CRA upstream limitation).

Signed-off-by: vmuralictr <vmurali.ctr@gmail.com>
@pleia2
Copy link
Copy Markdown
Contributor

pleia2 commented May 8, 2026

I tested this change today and ran into this error:

sdt-veryfinal@0.1.0 start
react-scripts start

/opt/software-discovery-tool/react-frontend/node_modules/serialize-javascript/index.js:54
var bytes = crypto.getRandomValues(new Uint8Array(UID_LENGTH));
^

ReferenceError: crypto is not defined
at generateUID (/opt/software-discovery-tool/react-frontend/node_modules/serialize-javascript/index.js:54:17)
at Object. (/opt/software-discovery-tool/react-frontend/node_modules/serialize-javascript/index.js:11:27)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object. (/opt/software-discovery-tool/react-frontend/node_modules/css-minimizer-webpack-plugin/dist/index.js:13:19)
at Module._compile (node:internal/modules/cjs/loader:1356:14)

Node.js v18.19.1

As I understand it, this error is being thrown because before Node.js 19 crypto requires explicit importing (it's not a global variable).

Ubuntu 24.04 ships with version 18.19.1 - which we want to continue to support, so we'll want to find a way around this.

@vmuralictr Do you want to adjust this PR to remove the serialize-javascript update that I noted inline? When I tested with that change, it worked fine.

@pleia2
Copy link
Copy Markdown
Contributor

pleia2 commented May 8, 2026

I spoke too soon. With this change applied the search results aren't working properly.

I tested this change with the AlmaLinux 9 and Debian 11 and 12 sources loaded.

When I search for "vim" it gives me 155 results, as expected.

When I use the dropdown menu it seems to properly show just the results from Debian 11 & 12, but it shows no results for AlmaLinux 9 (it should show 2 results, like it does in Flask). I've included a few screenshots.

Screenshot From 2026-05-08 15-54-34 Screenshot From 2026-05-08 15-54-43 Screenshot From 2026-05-08 15-54-48

Signed-off-by: vmuralictr <vmurali.ctr@gmail.com>
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