fix: prevent vulnerable peer dependencies#2195
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughAdded pnpm.overrides in package.json to constrain multiple transitive dependencies to specific upper-bound versions; retained existing zod override at 3.24.2. No changes to patchedDependencies beyond existing GraphQL patch. No direct dependency or public API changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (1 passed, 1 warning, 1 inconclusive)❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
Comment |
Router image scan passed✅ No security vulnerabilities found in image: |
Router-nonroot image scan passed✅ No security vulnerabilities found in image: |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
package.json (2)
73-91: Reduce blast radius by scoping overrides.Scope to specific parents when possible (e.g., "chalk>ansi-regex": "6.0.1") to avoid unintended downgrades elsewhere in the tree and to ease future upgrades. pnpm supports path selectors in overrides. (dimava.github.io)
Example:
- "ansi-regex@<6.0.1": ">=6.0.1", + "chalk>ansi-regex@<6.0.1": ">=6.0.1",
73-91: Prefer exact pins for determinism in CI.Open ranges (>= / <) can churn when a new patch publishes; pin exact known-safe versions after auditing to keep reproducible installs, then bump deliberately. pnpm allows exact versions in overrides. (cuyl.github.io, mrfoxpro.github.io)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: build_push_image
- GitHub Check: build_push_image (nonroot)
- GitHub Check: build_test
- GitHub Check: integration_test (./. ./fuzzquery ./lifecycle ./modules)
- GitHub Check: image_scan
- GitHub Check: integration_test (./telemetry)
- GitHub Check: integration_test (./events)
- GitHub Check: image_scan (nonroot)
🔇 Additional comments (3)
package.json (3)
73-91: Clarify intent: overrides don’t change peerDependency ranges.If the goal is “prevent vulnerable peer dependencies,” note that overrides affect resolved versions but do not modify peer ranges or peer warnings; for peers you’ll need packageExtensions (to tighten/widen peer ranges) or to surface safe versions as direct deps. Otherwise this might not achieve the stated goal. (github.com, pnpm.io)
I can propose targeted packageExtensions once you point out which peers must be constrained.
73-73: zod override unchanged — OK.Keeping zod pinned at 3.24.2 is fine; just ensure consumers don’t require a conflicting peer range. No action required.
73-91: Provide resolved versions for flagged packages
Audit still reports multiple vulnerabilities; please include the output ofpnpm why ansi-regex strip-ansi wrap-ansi debug chalk supports-color pnpm list ansi-regex strip-ansi wrap-ansi debug chalk supports-colorto confirm the actual versions installed and that your constraints are correct.
Summary by CodeRabbit
Checklist