fix(admin-ui): pin js-yaml past the merge-key advisory - #1384
Merged
Conversation
Dependabot has been reporting one **high** on this repository's default branch for a while. It is `js-yaml` 4.3.1 in `vtc-service/admin-ui` — `maxTotalMergeKeys` does not limit CPU use for empty merge sources, fixed in 4.3.2. Worth being accurate about the actual exposure rather than repeating the label. It is a **dev** dependency, reached only through `@redocly/openapi-core`, and it is not in the shipped bundle. The vulnerability is CPU exhaustion while parsing hostile YAML, and the only YAML that parser sees is this repository's own OpenAPI description. So the real risk here is low. The reason to fix it anyway is not the vulnerability. A standing "1 high" on the default branch is a banner on every push, and a banner that is always there is one nobody reads — including on the day it means something. The cost of clearing it is three lines. Done with an `overrides` entry rather than `npm install --save-dev`, which is what the obvious command does and which would have been wrong: this package does not use `js-yaml` and declaring it a direct dependency would say that it does. `overrides` is the mechanism for constraining something a dependency pulls in, and is what the plugin repo already uses to hold `@swc/core` below a version that breaks its bundler. `npm ci` and `npm run build` both clean.
|
🛡️ AI Agentic Security Code Review — all clear. We checked this change and found nothing to report. Keep shipping secure code! Note: for major, breaking, or feature-introducing changes, you can always request an in-depth review from the security team. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dependabot has been reporting one high on this repository's default branch for a while (
security/dependabot/38). It isjs-yaml4.3.1 invtc-service/admin-ui—maxTotalMergeKeysdoes not limit CPU use for empty merge sources — fixed in 4.3.2.What the exposure actually is
Worth stating rather than repeating the label. It is a dev dependency, reached only through
@redocly/openapi-core, and it is not in the shipped bundle:The vulnerability is CPU exhaustion parsing hostile YAML, and the only YAML that parser sees is this repository's own OpenAPI description. The real risk here is low.
The reason to fix it anyway is not the vulnerability. A standing "1 high" on the default branch is a banner on every push, and a banner that is always there is one nobody reads — including on the day it means something. Clearing it costs three lines.
Done with
overrides, not--save-devThe obvious command —
npm install js-yaml@^4.3.2 --save-dev— is wrong, and I did it first and backed it out. It addsjs-yamltodevDependencies, which says this package uses it directly. It does not; it is pulled in by Redocly.overridesis npm's mechanism for constraining what a dependency brings with it, and is what the plugin repo already uses to hold@swc/corebelow the version that breaks its bundler.Lockfile moves 4.3.1 → 4.3.2 and nothing else does.
Checks
npm ci— cleannpm run build— clean,✓ built in 1.08s