Commit d651bc4
build: turn on pnpm's supply-chain policies
pnpm 11 ships a set of guards that are either off or only half on by default.
All of them are now set explicitly in pnpm-workspace.yaml, each with its
reasoning inline:
- minimumReleaseAge quarantines anything published in the last three days, and
minimumReleaseAgeStrict makes an immature pick abort the install rather than
quietly excluding itself. Seven days -- the value worth wanting -- is not
reachable yet: it rejects 65 current lockfile entries, and ranges like
oxfmt's ^0.61.0 have no version old enough to satisfy it at all.
- trustPolicy rejects a version whose publish trail is weaker than that of a
version published before it, which is what a package takeover looks like from
outside. chokidar@4.0.3 and semver@6.3.1 predate their packages adopting
trusted publishing and are excluded by name.
- trustLockfile stays false, so the two policies above are re-applied to every
lockfile entry on each install rather than trusted from whoever resolved it.
- blockExoticSubdeps keeps git/http/file specs out of transitive manifests.
- strictDepBuilds turns an unlisted install script into an error.
- verifyStoreIntegrity and strictStorePkgContentCheck are pinned on.
- verifyDepsBeforeRun stops `pnpm run` against a node_modules that has drifted
from the lockfile.
`pnpm audit` now runs as its own CI job and as the last step of `pnpm run ci`,
failing at audit.level (low). It stays out of both deploy workflows: an
advisory against a transitive dependency should not be what stops the blog from
shipping.
That audit was failing on GHSA-mh99-v99m-4gvg. brace-expansion reaches the tree
only through typed-css-modules > glob > minimatch, which has no release picking
the fix up, so its 2.x branch is pinned through overrides. The fix is itself
younger than the cooldown, hence the one minimumReleaseAgeExclude entry.
Verified on Node 26.5.1 with every policy live: clean install, frozen-lockfile
install (962 entries pass), the full ci run, all three builds, the deploy
workflows' --ignore-scripts path, and the blog's dev server. Both guards were
also made to fire on purpose -- verifyDepsBeforeRun aborts on an uninstalled
dependency, and audit exits 1 against the pre-fix lockfile.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent da46cfd commit d651bc4
5 files changed
Lines changed: 343 additions & 281 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
61 | 78 | | |
62 | 79 | | |
63 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
111 | 135 | | |
112 | 136 | | |
113 | 137 | | |
114 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
115 | 149 | | |
116 | 150 | | |
117 | 151 | | |
118 | 152 | | |
119 | 153 | | |
120 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
121 | 161 | | |
122 | 162 | | |
123 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments