From 4c54bfff089ee86cd1db49f2c74fe8d794554fda Mon Sep 17 00:00:00 2001 From: Jim Kane Date: Wed, 24 Jun 2026 11:00:21 -0500 Subject: [PATCH] Override js-yaml to ^4.2.0 to resolve DoS advisory Forces the transitive js-yaml@3.14.2 (pulled in via ts-jest -> @jest/transform -> babel-plugin-istanbul -> @istanbuljs/load-nyc-config) up to 4.2.0 to resolve the quadratic-complexity DoS advisory GHSA-h67p-54hq-rp68. load-nyc-config is unmaintained and pins js-yaml ^3.13.1, so an npm override is the only way to dedupe to the patched 4.x line without downgrading ts-jest. The override is safe here: the istanbul coverage path is never exercised (no --coverage flag, no YAML nyc config). Build and all 37 tests pass on node 24. --- package-lock.json | 45 --------------------------------------------- package.json | 3 +++ 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index d82a50a8..1173b25a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -828,16 +828,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -852,20 +842,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -3052,20 +3028,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", @@ -5101,13 +5063,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", diff --git a/package.json b/package.json index e8032f2a..d2e2cba3 100644 --- a/package.json +++ b/package.json @@ -52,5 +52,8 @@ "prettier": "^3.8.4", "ts-jest": "^29.4.11", "typescript": "^6.0.3" + }, + "overrides": { + "js-yaml": "^4.2.0" } }