Skip to content

Commit d568789

Browse files
committed
Security: pnpm install-side guardrails (14-day cooldown, trust no-downgrade)
`minimumReleaseAge: 20160` — block versions younger than 14 days. pnpm 11 ships a 1440 min (1 day) default; tighten to match the project rule in `.claude/rules/use-latest-dep-versions.md`. Renovate already enforces the same 14-day cooldown at PR-open time; this is the install-side guardrail for paths that bypass Renovate (manual `pnpm add`, a fresh clone, a contributor without our Renovate config). `minimumReleaseAgeExclude` remains the per-package opt-out for hot-fix CVE patches. `trustPolicy: no-downgrade` — refuse to install a package whose trust level has dropped since the last successful resolve (publisher loses verified status, package transferred to an unknown owner). Default `off`. Cost: occasional manual approval. Win: mitigation against the publisher-takeover class of attacks. `blockExoticSubdeps: true` — explicit even though pnpm 11 defaults to true. Only direct dependencies may use exotic sources (git repos, tarball URLs). The `@srsholmes/tauri-playwright` entry in `overrides` is a direct dep, allowed. A compromised transitive tree can't pull anything unaudited via a nested `git+https://…` URL. Refs: - https://pnpm.io/supply-chain-security - https://pnpm.io/settings
1 parent ef85b47 commit d568789

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

pnpm-workspace.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ packages:
55
# our checker runs pnpm non-interactively and there's no human to answer.
66
confirmModulesPurge: false
77

8+
# ── Supply-chain defences (pnpm 11+) ────────────────────────────────────────
9+
# Project-side belt-and-suspenders so anyone cloning Cmdr gets the same
10+
# install-side guarantees even without the matching keys in their `~/.npmrc`.
11+
# Read alongside `.claude/rules/use-latest-dep-versions.md` — Renovate already
12+
# enforces a 14-day cooldown at PR-open time; this is the install-side
13+
# guardrail for anything that bypasses Renovate (manual `pnpm add`, a fresh
14+
# clone, a contributor without our Renovate config).
15+
16+
# Block installs of versions published less than 14 days ago. pnpm 11 ships
17+
# with a 1440 min (1 day) default; we tighten it. Value is minutes. Use
18+
# `minimumReleaseAgeExclude` to bypass per-package for hot-fix CVE patches.
19+
minimumReleaseAge: 20160
20+
21+
# Refuse to install a package whose trust level has dropped since the last
22+
# successful resolve (publisher loses verified status, package transferred to
23+
# an unknown owner). Default is `off`. The cost is an occasional manual
24+
# approval; the win is mitigation against the publisher-takeover class.
25+
trustPolicy: no-downgrade
26+
27+
# Explicit even though pnpm 11 defaults to true: only direct dependencies may
28+
# use exotic sources (git repos, tarball URLs). The `@srsholmes/tauri-playwright`
29+
# entry in `overrides` below is a top-level direct dep, which is allowed.
30+
# A compromised tree can't pull anything unaudited via a nested git+https://…
31+
blockExoticSubdeps: true
32+
833
# Pin transitive deps to fix CVEs in older indirect ranges.
934
# TEMPORARY override: @srsholmes/tauri-playwright is pinned to the vdavid/multi-window
1035
# preview release while upstream PR https://github.com/srsholmes/tauri-playwright/pull/6

0 commit comments

Comments
 (0)