chore(deps): pin the vulnerable transitives instead of bumping majors - #201
Open
Utzig26 wants to merge 1 commit into
Open
chore(deps): pin the vulnerable transitives instead of bumping majors#201Utzig26 wants to merge 1 commit into
Utzig26 wants to merge 1 commit into
Conversation
Eight advisories were open, all of them denial of service in glob, YAML and schema parsing libraries pulled in transitively: minimatch, picomatch, brace-expansion, ajv and js-yaml. npm offered to fix them with --force, but its suggestions were downgrades that would have taken @nestjs/cli from 11 to 6 and jest from 29 to 25. Overrides pinned to the patched version within the same major line close the same advisories without touching the toolchain. The production dependency tree is now clean: npm audit --omit=dev reports no vulnerabilities, and brace-expansion does not appear in it at all. What remains is 33 findings against brace-expansion 1.1.18 and 2.1.4, which are the newest releases of their lines, so there is nothing to pin to. The first attempt overrode them to 5.0.9 and broke eslint, since the fifth major changed the export shape and minimatch 3 calls it as a function. The override is now scoped to the 5.0.x line, and the older ones are left where they are: they reach only eslint, jest and the nest CLI, none of which ship.
This was referenced Jul 31, 2026
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.
Closes the eight open advisories GitHub reports on every push.
What they were
All eight were denial of service in glob, YAML and schema parsing libraries pulled in transitively:
minimatchpicomatchajvjs-yamlbrace-expansionWhy overrides and not
npm audit fix --forcenpm's suggestions were downgrades. It offered to take
@nestjs/clifrom 11 to 6.8.1 andjestfrom 29 to 25, both flaggedisSemVerMajor. Pinning the patched version within the same major line closes the same advisories without touching the toolchain.Each override is range scoped, so only the vulnerable instances move.
ajv@6.15.0under eslint 8 stays where it is rather than being dragged to 8.x.The production tree is clean
What is left, and why
33 findings against
brace-expansion1.1.18 and 2.1.4. Those are the newest releases of their lines, so there is nothing to pin to.The first attempt overrode them to 5.0.9 and broke eslint:
The fifth major changed the export shape, and
minimatch@3— which eslint 8 depends on — calls it as a function. The override is now scoped to the5.0.xline and the older instances are left alone. They reach only eslint, jest and the nest CLI, none of which ship.Clearing them for real means eslint 8 → 10, which is a flat config migration and belongs in its own change.
Verification
Lint,
stricttypecheck,nest build, 99 unit and 82 end-to-end tests all green after the pins. The eslint break above is exactly why the build was run rather than trusting the audit number.