|
20 | 20 |
|
21 | 21 | `minimumReleaseAge` is the single most effective supply-chain control pnpm ships: a package must have existed for N days before it can be installed, and most compromised releases are caught and yanked well inside that window. It is also the one control a package maintainer cannot turn on. |
22 | 22 |
|
23 | | -You publish `@acme/parser` at 2pm and consume it in three workspaces at 2:05pm. A 14-day quarantine means your own release is unusable for two weeks, in every repo you own. So the cooldown gets set to `0`, and the protection that would have stopped a compromised transitive dependency is gone — not because you decided the risk was acceptable, but because the tool could not tell your packages from everyone else's. |
| 23 | +You publish `@acme/parser` at 2pm and consume it in three workspaces at 2:05pm. Even a two-day quarantine means your own release is unusable until Thursday, in every repo you own. So the cooldown gets set to `0`, and the protection that would have stopped a compromised transitive dependency is gone — not because you decided the risk was acceptable, but because the tool could not tell your packages from everyone else's. |
24 | 24 |
|
25 | 25 | `pnpm-policy` makes that distinction. It asks npm what your maintainer accounts publish, and writes the answer into `pnpm-workspace.yaml` as an exemption list: |
26 | 26 |
|
27 | 27 | ```yaml |
28 | | -minimumReleaseAge: 20160 # 14 days, for everything third-party |
| 28 | +minimumReleaseAge: 2880 # 2 days, for everything third-party |
29 | 29 | minimumReleaseAgeExclude: |
30 | 30 | - "@acme/*" # a scope you own |
31 | 31 | - my-unscoped-package # a package you publish |
@@ -60,7 +60,7 @@ Commit `pnpm-policy.yaml`, `pnpm-policy.inventory.json`, and the generated `pnpm |
60 | 60 | ```yaml |
61 | 61 | # How old a third-party release must be before it may be installed. |
62 | 62 | # Accepts 14d / 2w / 36h / 90m, or a bare number of minutes (what pnpm stores). |
63 | | -minimumReleaseAge: 14d |
| 63 | +minimumReleaseAge: 2d |
64 | 64 |
|
65 | 65 | # Transitive dependencies must resolve from the registry, not from git or a URL. |
66 | 66 | blockExoticSubdeps: true |
@@ -97,7 +97,7 @@ settings: |
97 | 97 |
|
98 | 98 | | Key | Type | Default | Meaning | |
99 | 99 | | --- | --- | --- | --- | |
100 | | -| `minimumReleaseAge` | duration | `14d` | Quarantine applied to everything not exempted. | |
| 100 | +| `minimumReleaseAge` | duration | `2d` | Quarantine applied to everything not exempted. | |
101 | 101 | | `blockExoticSubdeps` | boolean | `false` | Refuse transitive deps from git/URL sources. | |
102 | 102 | | `maintainers` | string[] | `[]` | **Your own** npm accounts. See the warning below. | |
103 | 103 | | `scopes` | string[] | `[]` | Scopes you own, emitted as globs. | |
@@ -196,9 +196,9 @@ packages: |
196 | 196 |
|
197 | 197 | # Managed by pnpm-policy — run `pnpm-policy generate` after editing pnpm-policy.yaml. |
198 | 198 |
|
199 | | -# A third-party release must be 2w old before it can be installed. |
| 199 | +# A third-party release must be 2d old before it can be installed. |
200 | 200 | # Most malicious releases are found and yanked well inside that window. |
201 | | -minimumReleaseAge: 20160 |
| 201 | +minimumReleaseAge: 2880 |
202 | 202 | # Exempt from the wait: 1 scope glob(s), 2 first-party package(s). |
203 | 203 | # First-party membership comes from what your-npm-username publishes on npm — waiting on your own release protects nothing. |
204 | 204 | minimumReleaseAgeExclude: |
|
0 commit comments