Skip to content

security: high-severity dependency fixes and Node 20 engines#317

Closed
thomasrockhu-codecov wants to merge 7 commits intomainfrom
security/tier-s-nuxt-3-16
Closed

security: high-severity dependency fixes and Node 20 engines#317
thomasrockhu-codecov wants to merge 7 commits intomainfrom
security/tier-s-nuxt-3-16

Conversation

@thomasrockhu-codecov
Copy link
Copy Markdown
Contributor

Summary

This PR clears high-severity findings from pnpm audit and aligns declared Node support with current CI (Node 20+).

Dependency / audit hardening

  • Add root pnpm.overrides for patched transitive versions (e.g. minimatch, cross-spawn, tar, undici, h3, devalue, path-to-regexp, rollup) and pin Vite 6.4.1 workspace-wide where needed for consistent resolution.
  • Bump direct dependencies where required: Next 15.2.9, Astro 5.15.8+, Rollup 4.59.x, lodash 4.18, @actions/core, lint-staged 16, @changesets/cli, etc., and refresh pnpm-lock.yaml.
  • Nuxt examples and plugin dev deps constrained to ~3.16.2 to avoid unintended Vite 7 drift; integration snapshot updates where applicable.
  • Integration astro-4 test app updated to patched Astro 5 (advisory range previously flagged Astro 4); folder name kept for fixture paths.
  • Avoid a global glob@10 override (breaks @rollup/plugin-commonjs default import); audit remains clear of high without it.
  • Vitest configs: @rollup/plugin-replace + Rollup 4.59 typing; bundle-analyzer import uses with: { type: "json" }.

Engines

  • Set engines.node to >=20.0.0 everywhere that previously declared >=18 / >=18.0.0.

Verification

  • pnpm audit: no high severity
  • pnpm run type-check
  • pnpm run test:unit:ci

Made with Cursor

Pins nuxt and @nuxt/kit to the 3.16 line (resolves to 3.16.2) so installs
include the cache-poisoning DoS fix (GHSA-jvhm-gjrh-3h93) and updated
devtools transitive dependencies (e.g. simple-git GHSA-r275-fr43-pm7q).

Uses ~3.16.0 instead of ^3.16.0 to avoid unintentionally jumping to Nuxt
3.17+ during this security pass.

Made-with: Cursor
Coerce null asset gzipSize before matching so Bun snapshot matchers
(expect.any(Number)) work. Refresh Nuxt generate-bundle-stats snapshots
after the Nuxt ~3.16 upgrade; use Any<String> for bundler/plugin versions.

Made-with: Cursor
Use ^3.16.0 for nuxt and @nuxt/kit where sibling deps use ^; refresh lockfile.

Made-with: Cursor
- Add pnpm overrides for transitive fixes (minimatch, cross-spawn, tar,
  undici, h3, devalue, path-to-regexp, rollup, etc.) and pin vite 6.4.1
- Upgrade Next examples and plugin devDeps to 15.2.9; Astro 5.15.8+;
  Rollup 4.59.x; lodash 4.18; @actions/core; lint-staged 16; changesets
- Align integration test apps; migrate astro-4 fixture to Astro 5 for
  patched advisory range; constrain Nuxt to ~3.16.2 to avoid vite 7 drift
- Fix vitest configs for @rollup/plugin-replace + Rollup 4.59 types;
  use import attributes `with` in bundle-analyzer vitest config
- Remove global glob@10 override (breaks @rollup/plugin-commonjs); audit
  remains clear of high severity

Made-with: Cursor
Align root, all published packages, and examples that declared
>=18.0.0 (or >=18) with engines.node >=20.0.0.

Made-with: Cursor
Resolve Nuxt semver conflicts by keeping ~3.16.2 pins; bring in main
workflow updates for test-api and typedoc deploy.

Made-with: Cursor
@sentry
Copy link
Copy Markdown

sentry bot commented Apr 3, 2026

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
383 2 381 0
View the top 2 failed test(s) by shortest run time
src/index.test.ts > createAndUploadReport > should call all expected handlers for dry runs
Stack Traces | 0.00839s run time
AssertionError: expected "spy" to be called with arguments: [ '@codecov/bundle-analyzer', '1.9.1' ]

Received: 

  1st spy call:

  Array [
    "@codecov/bundle-analyzer",
-   "1.9.1",
+   "0.0.0",
  ]


Number of calls: 1

 ❯ src/index.test.ts:177:30
src/index.test.ts > createAndUploadReport > should call all expected handlers for real runs
Stack Traces | 0.0251s run time
AssertionError: expected "spy" to be called with arguments: [ '@codecov/bundle-analyzer', '1.9.1' ]

Received: 

  1st spy call:

  Array [
    "@codecov/bundle-analyzer",
-   "1.9.1",
+   "0.0.0",
  ]


Number of calls: 1

 ❯ src/index.test.ts:149:30

To view more test analytics, go to the Prevent Tests Dashboard

- Apply prettier fixes in bundler-plugin-core (transports, types)
- Use inline type imports in vitest configs (import/consistent-type-specifier-style)

Made-with: Cursor
"@codecov/astro-plugin": "workspace:*",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"astro": "^5.15.8",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This directory is called test-apps/astro-4 but we've changed astro to be 5.15.8, the same as the astro-5 directory's version. This seems like we are losing coverage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nice catch

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