Skip to content

fix(backend): override three advisories pinned by stale transitives - #2794

Closed
DerekRoberts wants to merge 2 commits into
chore/backend-dev-dependenciesfrom
fix/backend-advisory-overrides
Closed

fix(backend): override three advisories pinned by stale transitives#2794
DerekRoberts wants to merge 2 commits into
chore/backend-dev-dependenciesfrom
fix/backend-advisory-overrides

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Jul 25, 2026

Copy link
Copy Markdown
Member

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:

Package Pinned by Installed Patched
js-yaml @nestjs/swagger 11.4.6 5.2.1 5.2.2
find-my-way @prisma/dev via prisma 7.9.0 9.6.0 9.7.0
valibot @prisma/dev via prisma 7.9.0 1.2.0 1.4.2

find-my-way and valibot arrive through the Prisma CLI, which stays in the production tree even as a devDependency because @prisma/client declares an optional peer dependency on it.

Change

Three scoped npm overrides, matching the existing c12 and @hono/node-server entries in the same block.

Each is scoped to the parent that pins it rather than applied globally, so unrelated copies are untouched — js-yaml 4.x under cosmiconfig keeps its major version. @prisma/dev 0.24.16 already ships find-my-way 9.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.6 would 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/swagger and prisma release versions carrying the fixes.

Results

Trivy findings across the repository at every severity, UNKNOWN through CRITICAL: 2 to 0.

Verification

  • Resolved versions are exactly js-yaml 5.2.2, find-my-way 9.7.0, valibot 1.4.2.
  • npm run deploy, the Dockerfile build-stage command: succeeds, 0 TypeScript issues.
  • npm test: 8 files, 32 tests passing.
  • npm ci --omit=dev then node dist/main against an unreachable database: "Nest application successfully started".
  • Trivy 0.70.0 with CI flags at all severities: exit 0.

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:

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant