chore(deps): bump mysql2 and fast-uri past audited vulnerabilities - #30314
Conversation
npm audit on prisma@7.10.0 reports two mysql2 advisories: - GHSA-3f6p-5ww8-9rcr (high): a server can downgrade authentication to mysql_clear_password and read the password in plaintext. Fixed in 3.22.0. - GHSA-rgwj-5xj2-c3m3 (moderate): unbounded zlib inflate in the compressed protocol handler. Fixed in 3.23.1. Bump the CLI's mysql2 pin from 3.15.3 to 3.24.4. Prisma Studio is its only consumer. pnpm audit --prod also fails on four fast-uri advisories reached through @prisma/dev > @prisma/streams-local > ajv, which fail the audit step on every PR to this branch. Raise the existing fast-uri override floor from 3.1.5 to 3.1.6. Refs #30295 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates the CLI ChangesDependency updates
Priority: ⬆️ High Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other · Severity of issue fixed: High Suggested reviewers: Merge Risk: ⚪ Minimal · up to The dependency updates address the reported vulnerability floors, so the change is mergeable with normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The PR updates Resolution Update the applicable Prisma package dependency or override so that Full details: Out of Scope Changes checkExplanation The PR raises the
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use Comment |
size-limit report 📦
|
Summary
npm auditonprisma@7.10.0reports high-severity findings in dependencies that Prisma pins (#30295). Thedeepmerge-tsfinding is already fixed on this branch by #30189 but is unreleased. This PR fixes the rest:mysql23.15.3 → 3.24.4 inpackages/cli. Prisma Studio's MySQL connection is its only consumer.mysql_clear_passwordand read the password in plaintext. Fixed in 3.22.0.fast-urioverride floor 3.1.5 → 3.1.6 inpnpm-workspace.yaml. Fourfast-uriadvisories reach the lockfile through@prisma/dev→@prisma/streams-local→ajv, and they fail thepnpm audit --prodstep on every PR tov7. Users are not affected, because a fresh install already resolvesfast-urito 3.1.8.The lockfile diff is limited to
mysql2, its dependencies, andfast-uri.Behavior changes for Studio users
mysql23.22.0 stops accepting a server's request formysql_clear_password. That is the fix for the high-severity advisory. Servers that require it, such as AWS RDS IAM authentication, now need?enableCleartextPlugin=trueon the URL.normalizeMySQLConnectionStringkeeps that parameter, andmysql2parses it totrue.@types/nodebecomes a peer dependency ofprisma's dependency tree. Starting with 3.18.0,mysql2declares@types/node: ">= 8"as a required peer dependency, and no fixed version drops it. npm 7+ and pnpm install required peers automatically, so projects without@types/nodewill get it after upgrading. It is types only. If that is unwanted, the alternative is to movemysql2todevDependenciesso the CLI build bundles it, which is a larger change to the bundle.Testing performed
pnpm audit --prod: before, 6 findings (2mysql2, 4fast-uri). After, "No known vulnerabilities found".vitest run src/__tests__/Studio.vitest.tsinpackages/cli: 31 passed. These tests mockmysql2, so they don't exercise the new version.pnpm run tscinpackages/cli: passes.prisma studio --url "mysql://…?connection_limit=2", and confirmed frompackages/clithatmysql2resolves to 3.24.4. I then posted to Studio's/bffendpoint:SELECTwith ajson-parsetransformation, which returned the rows with parsed JSONSELECT, which returned the matching rowtransactionthat inserts a value containing a single quote and reads it back, which round-tripped the valueER_NO_SUCH_TABLEas a serialized errorRelease
Users only get these fixes, and the
deepmerge-tsfix from #30189, from a new7.xrelease. Merging intov7does not close #30295 or #30052, so close them when that release ships.🤖 Generated with Claude Code
Summary by CodeRabbit