installing only Vitest is ending up installing Vite@5.x by default with lots of CVE #7520
ghiscoding
started this conversation in
Feedback
Replies: 1 comment 5 replies
-
Vite updated most of their previous majors with the security patches. It's completely fine to use latest v5 with Vitest v3. https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure if I should open a new issue for this or not, but basically in Lerna-Lite, I only use Vitest since Vite isn't required at all. However the latest version of Vitest accepts both Vite v5 or v6 and because of that pnpm detects and installs the minimum which is Vite v5 instead of what most users would expect to be on the latest versions of everything.
The fact that pnpm installs Vite v5 by default is causing GitHub to open a lot of Dependabot security issues. I just enabled Dependabot (on top of Snyk) and it came up with 14 vunerabilities. So I had to add a
pnpm.overrides
(in this PR) to upgrade Vite to v6 even though I'm not using Vite at all in the project and now I'm down from 14 to 6 vulnerabilities...So why didn't Vitest upgrade to Vite v6 and drop v5? This is causing unexpected installation behind the scene and makes vulnerabilities linger a lot longer
vitest/packages/vitest/package.json
Lines 174 to 175 in 1d9a6f4
Beta Was this translation helpful? Give feedback.
All reactions