fix(backend): override three advisories pinned by stale transitives - #2794
Closed
DerekRoberts wants to merge 2 commits into
Closed
fix(backend): override three advisories pinned by stale transitives#2794DerekRoberts wants to merge 2 commits into
DerekRoberts wants to merge 2 commits into
Conversation
Moving the build tooling to devDependencies cleared both brace-expansion findings, not three as the previous commit message claimed: @prisma/client declares an optional peer dependency on the prisma CLI, so npm keeps it in the production graph wherever it is listed. js-yaml, find-my-way and valibot are each pinned to an exact vulnerable version by a parent already at its latest release, so no update reaches them. Scoped overrides limit each bump to the parent that pins it, matching the existing c12 and @hono/node-server entries. Remove them once @nestjs/swagger and prisma release versions carrying the fixes.
Review feedback: >=5.2.2 style ranges would let a future major version in on the next lockfile refresh. Tilde ranges keep future patch advisories flowing while never crossing a minor, and each parent pinned a version in the same minor line anyway. Resolved versions are unchanged at js-yaml 5.2.2, find-my-way 9.7.0 and valibot 1.4.2. Left the parent keys unversioned deliberately. Keying them to the installed parent version would make each override stop applying the moment that parent updates, silently reintroducing the advisory if the new release still carries the old pin.
This was referenced Jul 27, 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.
Stacked on #2793, which it targets as its base. Merge that one first.
Problem
Three advisories are pinned to exact vulnerable versions by parent packages that are already at their latest release, so no update reaches them:
js-yaml@nestjs/swagger11.4.6find-my-way@prisma/devviaprisma7.9.0valibot@prisma/devviaprisma7.9.0find-my-wayandvalibotarrive through the Prisma CLI, which stays in the production tree even as a devDependency because@prisma/clientdeclares an optional peer dependency on it.Change
Three scoped
npmoverrides, matching the existingc12and@hono/node-serverentries in the same block.Each is scoped to the parent that pins it rather than applied globally, so unrelated copies are untouched —
js-yaml4.x undercosmiconfigkeeps its major version.@prisma/dev0.24.16 already shipsfind-my-way9.7.0 upstream, so that pairing is proven rather than assumed.Ranges are tilde-bounded, so a future patch advisory is picked up automatically on the next lockfile refresh while a minor or major can never slip in unreviewed. Each parent pinned a version inside the same minor line already.
The parent keys are deliberately not version-scoped. Keying
@nestjs/swagger@11.4.6would make the override stop applying the moment that parent updates, silently reintroducing the advisory if the new release still carries the old pin. An override that quietly expires is worse than one that becomes a harmless no-op.Remove all three once
@nestjs/swaggerandprismarelease versions carrying the fixes.Results
Trivy findings across the repository at every severity,
UNKNOWNthroughCRITICAL: 2 to 0.Verification
js-yaml5.2.2,find-my-way9.7.0,valibot1.4.2.npm run deploy, the Dockerfile build-stage command: succeeds, 0 TypeScript issues.npm test: 8 files, 32 tests passing.npm ci --omit=devthennode dist/mainagainst an unreachable database: "Nest application successfully started".Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: