Add pnpm trustPolicy to prevent trust downgrades#219
Open
Conversation
Set trustPolicy to no-downgrade so pnpm fails the install if a package's trust level decreases (e.g., a dependency that was previously signed becomes unsigned), mitigating supply-chain tampering. Also document the existing minimumReleaseAge setting with a comment explaining why we delay installing recently published packages. Assisted-by: Claude:claude-opus-4-6
|
Preview deployments are available for this PR. Comment |
There was a problem hiding this comment.
Pull request overview
Adds stronger pnpm supply-chain safeguards by preventing package trust downgrades during installs, and clarifies why installs are delayed for newly published packages.
Changes:
- Document
minimumReleaseAgewith a comment explaining the security rationale for delaying installs of newly published packages. - Set
trustPolicy: no-downgradeso pnpm fails installs when a dependency’s trust level decreases.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joemocode-business
approved these changes
Apr 15, 2026
Collaborator
joemocode-business
left a comment
There was a problem hiding this comment.
Really good idea!
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.
Set trustPolicy to no-downgrade so pnpm fails the install if a package's trust level decreases (e.g., a dependency that was previously signed becomes unsigned), mitigating supply-chain tampering.
Also document the existing minimumReleaseAge setting with a comment explaining why we delay installing recently published packages.
See https://github.com/lirantal/npm-security-best-practices/