Skip to content

build(deps): clear cli/ npm advisories (postcss, vite, esbuild)#117

Merged
rsharath merged 2 commits intomainfrom
cli-npm-deps-bump
May 5, 2026
Merged

build(deps): clear cli/ npm advisories (postcss, vite, esbuild)#117
rsharath merged 2 commits intomainfrom
cli-npm-deps-bump

Conversation

@rsharath
Copy link
Copy Markdown
Contributor

@rsharath rsharath commented May 5, 2026

Summary

Closes the three remaining MEDIUM npm-side Dependabot alerts on cli/package-lock.json:

Severity Package Before → After Advisory
MEDIUM postcss 8.5.8 → 8.5.14 XSS via unescaped </style> (GHSA-qx2v-qp2m-jg93)
MEDIUM vite 5.4.21 → 6.4.2 Dev-server arbitrary-request → response leak (GHSA-4w7w-66w2-5vf9)
MEDIUM esbuild 0.21.5 → 0.25.12 Dev-server CORS bypass (GHSA-67mh-4wv8-2f99)

Pure dependency-manifest update — two files touched (cli/package.json, cli/package-lock.json), no src changes.

Approach

  • vitest direct bump: ^2^3. vitest@3 still allows vite ^5 || ^6 || ^7 as a peer; the override below pins the resolution to v6. Going to vitest@3 instead of vitest@4 keeps this a single major jump rather than two — the CLI's 101 tests use only describe/it/expect/beforeEach/vi.fn, none of which see breaking changes between v2 and v3.
  • npm overrides in package.json:
    • vite: ^6.4.2 — forces vitest@3's transitive vite up from v5 (the vulnerable line) to v6.4.2+. Pulls a safe esbuild as a side effect (vite@6.4.2 ships with esbuild@0.25.12, well past the 0.24.2 advisory ceiling).
    • postcss: ^8.5.10 — forces both tsup's (via postcss-load-config) and vite's transitive postcss onto the fixed line. Without it, tsup resolves to postcss@8.5.8.

esbuild does not need its own override entry — bumping vite already lifts it past the advisory.

Final resolved tree:

vitest@3.2.4
└── vite@6.4.2
    ├── esbuild@0.25.12
    └── postcss@8.5.14
tsup@8.5.1
├── esbuild@0.27.4
└── postcss@8.5.14

Scope

Test plan

  • npm install — clean install, 0 vulnerabilities.
  • npm test (vitest run) — 101/101 passing (~590ms).
  • npm run typecheck (tsc --noEmit) — clean.
  • npm run build (tsup) — ESM + .d.ts artifacts produced.
  • npm run lint (eslint) — clean.
  • npm audit — 0 vulnerabilities found.

After merge

Three of the eight outstanding default-branch Dependabot alerts will close. The remaining five are the four already addressed by #115 (mapstructure ×2, pgdriver, plus auto-clear once that PR merges) and the one HIGH docker/docker advisory documented in #115 as unactionable via go get.

…npm advisories

Closes the three npm-side Dependabot alerts on cli/package-lock.json:

| Severity | Package  | Before -> After     | Advisory                                   |
| -------- | -------- | ------------------- | ------------------------------------------ |
| MEDIUM   | postcss  | 8.5.8  -> 8.5.14    | XSS via Unescaped </style> (GHSA-qx2v-qp2m-jg93) |
| MEDIUM   | vite     | 5.4.21 -> 6.4.2     | Dev-server response leak (GHSA-4w7w-66w2-5vf9)   |
| MEDIUM   | esbuild  | 0.21.5 -> 0.25.12   | Dev-server CORS bypass (GHSA-67mh-4wv8-2f99)     |

## Approach

- vitest direct: ^2 -> ^3. vitest@3 supports vite ^5/^6/^7; the override
  below pins it onto v6 transitively. Smaller migration than vitest@4
  (which would force a major-major jump from v2). The test surface uses
  only describe/it/expect/beforeEach/vi.fn -- no v3 breaking changes
  exercised by this CLI's 101 tests.
- npm `overrides`:
  - `vite: ^6.4.2` -- forces vitest@3's transitive vite up from v5 to v6
    (clears the vite advisory and pulls esbuild 0.25.x as a side effect).
  - `postcss: ^8.5.10` -- forces both tsup's and vite's transitive postcss
    onto a fixed line (8.5.14 ends up resolved). Without the override,
    tsup pins postcss@8.5.8 indirectly via postcss-load-config.

esbuild needs no explicit override -- vite@6.4.2 already pulls
esbuild@0.25.12, well past the 0.24.2 advisory ceiling.

## Scope

- `cli/package.json` + `cli/package-lock.json` only.
- No src changes -- pure build-tool dependency update.
- Independent of #114 (jwx v4) and #115 (Go-side deps); both are Go-only.

## Test plan

- [x] `npm install` -- clean, 0 vulnerabilities.
- [x] `npm test` -- 101/101 passing (~590ms).
- [x] `npm run typecheck` -- clean.
- [x] `npm run build` (tsup) -- ESM + d.ts artifacts produced.
- [x] `npm run lint` (eslint) -- clean.
- [x] `npm audit` -- 0 vulnerabilities found.
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 5, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​vitest@​2.1.9 ⏵ 3.2.4961007998100

View full report

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the testing framework vitest from version 2 to version 3 and updates its associated ecosystem. Key changes include upgrading vite to version 6 and postcss to version 8.5.14 via package overrides to ensure compatibility and security. The update also involves a significant refresh of internal dependencies such as esbuild, pathe, and various @vitest utility packages, while introducing new type definitions and helper libraries. Node.js engine requirements for several build tools have been bumped to version 18 or higher. I have no feedback to provide.

@rsharath rsharath merged commit 6297b3f into main May 5, 2026
10 checks passed
@rsharath rsharath deleted the cli-npm-deps-bump branch May 5, 2026 18: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