chore: enable pnpm trustPolicy: no-downgrade (supply-chain defense-in-depth) - #15330
Conversation
…depth Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe pnpm workspace configuration now enforces ChangesWorkspace policy
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized change enables pnpm's no-downgrade trust policy without changing the lockfile or dependency resolutions, and normal checks are sufficient; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
Summary
Enable pnpm's
trustPolicy: no-downgradeinpnpm-workspace.yamlas an optional supply-chain defense-in-depth measure.This is the focused follow-up that a maintainer invited when closing #15326:
Framing
This is not a vulnerability fix — it is optional defense-in-depth. I've dropped the two unrelated changes from #15326 that were rightly rejected (see "Scope" below).
Rationale
trustPolicywas added in pnpm v10.21.0; this repo pinspnpm@11.13.0, so it's supported. Its default isoff.With
no-downgrade, pnpm fails an install when a dependency's publishing trust level regresses relative to an earlier release — e.g. a package that was previously published by a trusted publisher now arrives with only provenance or no trust evidence. The check is based on publish date rather than semver, so a version can't be installed if an earlier-published version had stronger trust evidence.This is an independent signal that complements the existing
minimumReleaseAge: whereminimumReleaseAgebuys time for the ecosystem to catch and pull malicious releases,trustPolicycatches a sudden drop in publishing trust evidence — a distinct compromise indicator.Scope (deliberately narrow)
Compared to #15326, this PR excludes:
minimumReleaseAgebump (1440 → 10080) — kept at1440to stay consistent with.github/renovate.json5'sminimumReleaseAge: '24 hours'.blockExoticSubdeps: true— already the default in pnpm 11, so it's redundant.Net change:
+2 -0, one file.Validation — clean frozen-lockfile install
pnpm install --frozen-lockfilesucceeds with no trust/lockfile errors, andpnpm-lock.yamlis byte-identical — enablingtrustPolicydid not force any resolution changes.🤖 Generated with Claude Code
Summary by CodeRabbit