Harden pnpm installs against supply-chain attacks#566
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @kelvinkipruto's task in 1m 39s —— View job Code Review
The intent here is solid — hardening pnpm against supply-chain attacks is valuable. The diff is small (+4/-1 in
|
| Setting | Valid location | Status |
|---|---|---|
blockExoticSubdeps: true |
package.json pnpm field |
✅ |
minimumReleaseAge: 1440 |
.npmrc only |
|
trustPolicy: "no-downgrade" |
Unknown |
Recommend verifying the latter two against the pnpm docs before merging, or they may be no-ops.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49fe21dc3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This centralizes all pnpm configuration in the .npmrc file for consistency and better tooling support. The settings (block-exotic-subdeps, minimum-release-age, trust-policy) remain unchanged.
|
Claude finished @kelvinkipruto's task in 1m 6s —— View job Code Review
This PR has evolved since the initial commits — the settings ended up in
|
| Setting | Location | Status |
|---|---|---|
block-exotic-subdeps=true |
.npmrc |
✅ Valid, enforced with pnpm 10.33.0 |
minimum-release-age=1440 |
.npmrc |
✅ Valid |
trust-policy=no-downgrade |
.npmrc |
no-downgrade is not a documented value — likely a no-op |
| pnpm bump 10.16.1 → 10.33.0 | package.json |
✅ Necessary for block-exotic-subdeps |
Recommendation: Remove trust-policy=no-downgrade (or replace with trust-policy=noTrust if the intent is to rely solely on onlyBuiltDependencies). The rest of the changes look good.
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
|
Claude finished @kelvinkipruto's task in 28s —— View job Correction —
|
| Setting | Min pnpm version | Project version | Status |
|---|---|---|---|
block-exotic-subdeps=true |
v10.26.0 | 10.33.0 | ✅ Valid & enforced |
minimum-release-age=1440 |
— | 10.33.0 | ✅ Valid & enforced |
trust-policy=no-downgrade |
v10.21.0 | 10.33.0 | ✅ Valid & enforced |
The pnpm version bump to 10.33.0 in package.json is what makes all of this work — without it, block-exotic-subdeps (v10.26.0+) and trust-policy (v10.21.0+) would not be active. The PR is well-constructed.
The only remaining minor note is that the PR description still references package.json's pnpm block as the location of these settings, when they actually live in .npmrc — but that's a cosmetic issue and not a blocker.
This PR looks good to merge.
Motivation
pnpminstalls by applying the same hardening settings used in the UI repo adapted to this repository's package-levelpnpmconfig.Description
blockExoticSubdeps: trueto the top-levelpnpmblock inpackage.jsonto block exotic transitive dependency sources.minimumReleaseAge: 1440to delay adoption of very new releases by 24 hours.trustPolicy: "no-downgrade"to prevent trust-regression downgrades.onlyBuiltDependenciesallowlist (@sentry/cli,esbuild,sharp,unrs-resolver) intact.Testing
package.jsonparses as valid JSON withnode -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); console.log('package.json valid')", which succeeded.Codex Task