fix(security): pin mysql2 to >=3.22.0 to resolve high-severity audit finding - #1428
Merged
Merged
Conversation
…finding prisma@7.10.0 pulls in mysql2@3.15.3 as an optional driver dependency (unused at runtime — this project only targets Postgres), which is flagged by `npm audit` for GHSA-3f6p-5ww8-9rcr (auth plugin downgrade leaking plaintext credentials). Add an npm override, following the existing pattern used for postcss/sharp/react in this file, to force mysql2 to a patched version. `npm audit --omit=dev --audit-level=high` now reports 0 vulnerabilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm audit --omit=dev --audit-level=highcurrently fails onmain(and therefore on every PR) becauseprisma@7.10.0pulls inmysql2@3.15.3as an optional driver dependency, flagged for GHSA-3f6p-5ww8-9rcr (auth plugin downgrade leaking plaintext credentials).mysql2is unused at runtime — this project only targets Postgres — so it's safe to pin viaoverrides, following the existing pattern already used inpackage.jsonforpostcss/sharp/react.mysql2to^3.22.0(resolves to3.24.2); regeneratedpackage-lock.jsonaccordingly.Test plan
npm audit --omit=dev --audit-level=high→ 0 vulnerabilitiesnpx vitest runinbackend/→ 51 test files, 404 passed / 16 skipped, 0 failed