Skip to content

Add pnpm trustPolicy to prevent trust downgrades#219

Open
bajtos wants to merge 2 commits intomainfrom
pnpm-trust-policy
Open

Add pnpm trustPolicy to prevent trust downgrades#219
bajtos wants to merge 2 commits intomainfrom
pnpm-trust-policy

Conversation

@bajtos
Copy link
Copy Markdown
Member

@bajtos bajtos commented Apr 15, 2026

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/

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
Copilot AI review requested due to automatic review settings April 15, 2026 13:36
@github-actions
Copy link
Copy Markdown

Preview deployments are available for this PR.

Comment /deploy to deploy a preview environment.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 minimumReleaseAge with a comment explaining the security rationale for delaying installs of newly published packages.
  • Set trustPolicy: no-downgrade so pnpm fails installs when a dependency’s trust level decreases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@joemocode-business joemocode-business left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants