Skip to content

Commit 0b668ee

Browse files
committed
chore(yarn): enable hardened mode and supply-chain settings
Extend .yarnrc.yml with the conservative hardening tier: - enableHardenedMode: strict checksum + integrity validation on the resolver; rejects any tampering with the lockfile or registry. - npmMinimalAgeGate: 3d -- refuses to install npm packages younger than three days, mitigating the typical supply-chain "install a malicious 0.0.1-published-an-hour-ago" window. - enableGlobalCache + nmMode: hardlinks-global -- shares package content across worktrees via the global cache and hardlinks, reducing duplicate on-disk content and speeding repeat installs. - enableTelemetry: false -- explicit opt-out from Yarn telemetry. Install scripts stay enabled in this commit; the `enableScripts: false` + per-package allowlist follows next so the two changes can be reverted independently if needed. Verified `yarn install --immutable` is clean under the new settings.
1 parent ea09e94 commit 0b668ee

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.yarnrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
approvedGitRepositories:
22
- "**"
33

4+
enableGlobalCache: true
5+
6+
enableHardenedMode: true
7+
48
enableScripts: true
59

10+
enableTelemetry: false
11+
612
nmHoistingLimits: workspaces
713

14+
nmMode: hardlinks-global
15+
816
nodeLinker: node-modules
917

18+
npmMinimalAgeGate: 3d
19+
1020
npmPublishProvenance: true
1121

1222
yarnPath: .yarn/releases/yarn-4.14.1.cjs

0 commit comments

Comments
 (0)