Skip to content

Commit dd4595d

Browse files
committed
Add version cooldown section to README
Explains the motivation (supply chain attacks rely on speed), shows a concrete config example, and walks through what happens when a new version is published.
1 parent 4f8f63f commit dd4595d

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
A caching proxy for package registries. Speeds up package downloads by caching artifacts locally, reducing bandwidth usage and improving reliability.
44

5+
## Version Cooldown
6+
7+
Most supply chain attacks rely on speed: a malicious version gets published and consumed by automated pipelines within minutes, before anyone notices. The cooldown feature adds a quarantine period to newly published versions. When enabled, the proxy strips versions from metadata responses until they've aged past a configurable threshold.
8+
9+
```yaml
10+
cooldown:
11+
default: "3d" # hide versions published less than 3 days ago
12+
ecosystems:
13+
npm: "7d" # npm gets a longer window
14+
cargo: "0" # disable for cargo
15+
packages:
16+
"pkg:npm/lodash": "0" # exempt trusted packages
17+
```
18+
19+
A 3-day cooldown means that when `lodash` publishes version `4.18.0`, your builds keep using `4.17.21` until 3 days have passed. If the new release turns out to be compromised, you were never exposed.
20+
21+
Resolution order: package override, then ecosystem override, then global default. This lets you set a conservative default and carve out exceptions for packages where you need faster updates.
22+
23+
Currently works with npm, PyPI, pub.dev, and Composer, which all include publish timestamps in their metadata. See [docs/configuration.md](docs/configuration.md) for the full config reference.
24+
525
## Supported Registries
626

727
| Registry | Language/Platform | URL Resolution | Handler | Completed |
@@ -354,7 +374,7 @@ upstream:
354374
npm: "https://registry.npmjs.org"
355375
cargo: "https://index.crates.io"
356376

357-
# Optional: hide recently published versions
377+
# Optional: version cooldown (see above)
358378
cooldown:
359379
default: "3d"
360380
```

0 commit comments

Comments
 (0)