Back to BlogSecurity

pnpm 11.3 Adds trustLockfile: Use It Only If Your Lockfile Is Actually Trusted

pnpm 11.3 introduced trustLockfile on May 24, 2026. It can rescue large CI installs, but it also weakens one of pnpm's best supply-chain checks if you enable it casually.

pnpmnpm-securitylockfilemonorepoci
pnpm 11.3 Adds trustLockfile: Use It Only If Your Lockfile Is Actually Trusted

pnpm 11.3 Adds a Useful Escape Hatch

On May 24, 2026, pnpm 11.3 added trustLockfile, and this is one of those features that looks boring until it saves a CI pipeline you actually care about.

The short version: when trustLockfile is true, pnpm install stops re-checking every locked package against pnpm's supply-chain rules like minimumReleaseAge and trustPolicy: no-downgrade.

That can be a huge win for large workspaces. It can also quietly remove a safety net if you flip it on just because a build felt slow.

My take: this is a good feature, but it is absolutely not a default-you-should-copy setting.

Why pnpm Added It

The timing matters here.

On May 22, 2026, a pnpm user opened issue #11860 after pnpm install --frozen-lockfile blew up in CI during lockfile supply-chain verification. The repro was not tiny hobby-project stuff either:

  • around 4k lockfile entries

  • minimumReleaseAge: 2160
  • trustPolicy: no-downgrade
  • fresh CI runner

  • crash near a 2 GB heap limit after about 90 seconds

That bug report is the real context for trustLockfile. This was not maintainers inventing a random knob because config files were getting lonely. This was a response to a real pain point in big monorepos using pnpm's newer supply-chain protections seriously.

pnpm 11.3 does two things at once:

  • it reduces memory usage for the verification pass itself

  • it adds trustLockfile so teams with genuinely trusted lockfiles can skip that pass entirely

That second part is where you need to be careful.

What trustLockfile Actually Skips

Per the settings docs, trustLockfile tells pnpm to treat the loaded lockfile as already trusted.

In practice, that means pnpm does **not** re-apply these checks during install:

  • minimumReleaseAge
  • trustPolicy

If you are already using those protections, this matters a lot.

Those checks are there to catch situations like:

  • a dependency version that was published too recently to trust yet

  • a package whose trust evidence got worse across releases

  • a lockfile authored under weaker rules than the ones CI is supposed to enforce

With trustLockfile: true, pnpm assumes the lockfile itself is part of your trusted base and moves on.

That is fine when the assumption is true. It is bad when the assumption is just vibes.

When I Would Use It

I would seriously consider trustLockfile: true in a repo where all of these are true:

  • the repo is closed-source

  • a small, known group can modify the lockfile

  • dependency updates happen through controlled automation or trusted maintainers

  • CI is mostly rebuilding a lockfile you already reviewed

  • you are hitting memory or runtime pain from verification

That is the exact shape of repo pnpm seems to have in mind.

A practical example:

minimumReleaseAge: 1440
trustPolicy: no-downgrade
trustLockfile: true

This setup makes sense for an internal monorepo where lockfile changes are tightly reviewed and outside contributors cannot open dependency-changing PRs directly.

In that world, trustLockfile is less “skip security” and more “we already decided the lockfile review is the security gate.”

When I Would Not Use It

I would leave it off in these cases:

  • open source projects

  • repos accepting outside PRs

  • teams where lots of engineers can casually regenerate the lockfile

  • projects depending heavily on bot-created dependency PRs without strong review

  • any setup where CI is supposed to be the final policy enforcer

The docs are refreshingly blunt here: a poisoned lockfile can slip through if someone authored it under weaker policy than your CI expects.

That is the whole game.

If your threat model includes “someone can land or smuggle in a sketchy lockfile update,” then trustLockfile removes one of pnpm's better last-mile checks.

For those repos, I would rather keep verification on and benefit from pnpm 11.3's memory improvements first.

The Better Default for Most Teams

Most teams should start here:

minimumReleaseAge: 1440
trustPolicy: no-downgrade
trustLockfile: false

That gives you the modern pnpm supply-chain posture without assuming your lockfile is sacred.

Then watch CI.

If installs are stable after 11.3, stop there. You got the fix you needed without weakening the policy.

If installs still hurt badly, ask one question before enabling trustLockfile:

**Do we trust every path by which pnpm-lock.yaml can change?**

If the honest answer is anything softer than yes, keep it off.

The More Interesting Story Here

The real lesson is not “cool, another config flag.”

It is that pnpm is now deep into a tradeoff most JavaScript package managers used to avoid: stronger supply-chain checks are useful, but they are not free. They cost memory, network requests, and CI time. Once you take those protections seriously, you eventually need escape hatches for teams with stronger internal trust boundaries.

That is what trustLockfile is.

Not a universal best practice. Not a performance trick for everyone. An escape hatch.

And honestly, I like that pnpm shipped it this way:

  • default stays false

  • docs explain the risk

  • the release also improves the verification path instead of only offering a bypass

That is the right shape for a security-sensitive feature.

What JavaScript Teams Should Do This Week

If your team uses pnpm and cares about supply-chain hardening, the move is simple:

  • upgrade to pnpm 11.3

  • keep trustLockfile off by default

  • only enable it in repos where lockfile authorship is tightly controlled

  • treat lockfile review as a real security boundary if you do enable it

If you are running a huge private monorepo, this release is worth attention right now.

If you are running an open-source project and someone suggests turning on trustLockfile “for faster CI,” the correct response is: probably not.

That is the whole point of the feature.

It is useful exactly because it is risky in the wrong repo.

Sources