This repository was archived by the owner on Jun 25, 2026. It is now read-only.
Override js-yaml to ^4.2.0 to resolve DoS advisory#90
Merged
Conversation
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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the js-yaml quadratic-complexity DoS advisory (GHSA-h67p-54hq-rp68).
Problem
The direct
js-yamldep is already safe at 4.2.0, but a vulnerable 3.14.2 was pulled in transitively:There is no patched js-yaml 3.x release (only 4.2.0+/5.x fix it), and
@istanbuljs/load-nyc-config@1.1.0is unmaintained and pinsjs-yaml@^3.13.1.npm audit fix --force'fixes' this by downgrading ts-jest to 29.1.2, which we don't want.Fix
Add an npm
overridesentry forcingjs-yamlto^4.2.0, deduping the transitive copy up to the patched 4.x line (same version as the direct dep).Safety:
js-yaml4.x removed thesafeLoadAPI that load-nyc-config calls, but that code path only runs under coverage instrumentation. This project has no--coverageflag and no YAML nyc config, so the path is never exercised. As a bonus, the override also clears the rest of the istanbul vulnerability chain (total advisories dropped 19 → 2).Verification (node v24.14.0, per
engines: >= 24)npm run build(tsc) — passesnpm test— 37 passed, 4 suitesnpm audit— js-yaml advisory no longer presentNote
Two unrelated advisories remain after this change:
@babel/core <=7.29.0— already fixed in Bump @babel/core to 7.29.7 for security update #89 (clears once that merges)brace-expansion— separate advisory, out of scope here