Commit 6f23382
chore: enforce supply chain age gating (#16)
## Summary
- Adds `.npmrc` with `min-release-age=7` to reject npm packages
published less than 7 days ago
- Enables `ignore-scripts=true` to block arbitrary install scripts from
packages
## Why
Newly published or hijacked packages are typically detected and removed
within days. A 7-day quarantine ensures compromised packages never enter
our dependency tree.
## Override for critical updates
```sh
npm install <pkg>@<version> --min-release-age=0
```
## Test plan
- [ ] `npm config get min-release-age --location=project` returns `7`
- [ ] `npm install` still resolves existing dependencies from lock file
- [ ] `npm install --min-release-age=0 <pkg>` bypasses the restriction
---------
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Justin <[email protected]>1 parent 00f73c1 commit 6f23382
3 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
0 commit comments