Skip to content

Scope the transitive Dependabot overrides to their vulnerable chains#114

Merged
lifeiscontent merged 1 commit into
mainfrom
chore/scope-dependabot-overrides
Jun 17, 2026
Merged

Scope the transitive Dependabot overrides to their vulnerable chains#114
lifeiscontent merged 1 commit into
mainfrom
chore/scope-dependabot-overrides

Conversation

@lifeiscontent

Copy link
Copy Markdown
Collaborator

Follow-up to #113. Copilot's review there flagged that the ws, js-yaml, and esbuild pins were added as global pnpm overrides, which is broader than intended: a global override silently applies to any future or runtime dependency path, not just the tooling chains that actually pull the vulnerable versions today.

This scopes each pin to the specific transitive chains the lockfile reports, using pnpm selector overrides:

Package Pinned Scoped to
ws 8.21.0 miniflare, storybook, @vitest/browser, @voidzero-dev/vite-plus-test
js-yaml 4.2.0 @changesets/parse, read-yaml-file
esbuild 0.28.1 storybook, @storybook/csf-plugin, vite, @voidzero-dev/vite-plus-core, wrangler

The chains were derived from the current lockfile (the direct dependents of each package), not guessed.

Verification

After regenerating the lockfile, each package still resolves to a single patched version with no vulnerable version reintroduced:

  • ws → only 8.21.0
  • js-yaml → only 4.2.0
  • esbuild → only 0.28.1

The lockfile diff is just the overrides metadata block (no snapshot/version churn), since the scoped overrides resolve identically to the global ones. Same security outcome, smaller and explicit blast radius.

The ws, js-yaml, and esbuild pins from #113 were global overrides, so they
would silently apply to any future or runtime dependency path, not just the
tooling chains that actually pull the vulnerable versions. Replace them with
pnpm selector overrides targeting exactly the chains the lockfile reports:

  ws       -> miniflare, storybook, @vitest/browser, @voidzero-dev/vite-plus-test
  js-yaml  -> @changesets/parse, read-yaml-file
  esbuild  -> storybook, @storybook/csf-plugin, vite, @voidzero-dev/vite-plus-core, wrangler

The lockfile still resolves each package to a single patched version
(ws@8.21.0, js-yaml@4.2.0, esbuild@0.28.1), so the security outcome is
unchanged while the blast radius stays explicit and small.
Copilot AI review requested due to automatic review settings June 17, 2026 09:56
@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-114-propel-storybook.vamsi-906.workers.dev

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR narrows previously-global pnpm overrides for transitive security pins (ws, js-yaml, esbuild) so they apply only to the specific dependency chains that currently pull vulnerable versions, reducing the chance of unintended future/runtime impact.

Changes:

  • Replaced global overrides with pnpm selector overrides (e.g. miniflare>ws) for ws, js-yaml, and esbuild.
  • Added inline guidance in pnpm-workspace.yaml on keeping scoped pins aligned with the lockfile’s reported chains.
  • Regenerated pnpm-lock.yaml so the lockfile overrides metadata matches the scoped selectors (no dependency graph churn).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
pnpm-workspace.yaml Replaces global overrides with selector-scoped transitive security pins and documents maintenance guidance.
pnpm-lock.yaml Updates the lockfile overrides block to reflect the new selector-scoped overrides.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lifeiscontent lifeiscontent merged commit 0d21d9f into main Jun 17, 2026
3 checks passed
@lifeiscontent lifeiscontent deleted the chore/scope-dependabot-overrides branch June 17, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants