The Week chalk Got Compromised, and the Cooldown I Added
In September, malicious versions of chalk, debug, and more than a dozen other packages went out to npm. They were pulled within hours. That window is the whole argument for not installing anything brand new.
On September 8, a maintainer of some of the most downloaded packages on npm was phished. Malicious versions of chalk, debug, and around sixteen other packages were published. The payload targeted crypto wallets in the browser. The versions were found and removed in about two and a half hours.
A week later, a self-spreading worm went through more packages, stealing tokens and using them to publish more infected versions.
I wasn't hit. But I checked, and the reason I wasn't hit was luck, not process.
Why a few hours matter
Most of these attacks share a timeline. A bad version goes out, someone notices, it gets pulled. The danger is entirely in that window.
If my installs simply refuse versions younger than a few days, the window closes before it reaches me.
The cooldown
pnpm shipped exactly this in 10.16, days after the attack. It's called minimumReleaseAge, measured in minutes:
minimumReleaseAge: 4320 # 3 days
minimumReleaseAgeExclude:
- "@my-org/*"The exclude list is for my own packages, where I want the new version immediately.
Bun, which most of my projects use, doesn't have a setting for it yet. Until it does, those projects get the same effect the manual way: no blind bun update, and every upgrade goes in as its own pull request with the publish date checked.
The rest of the checklist
A cooldown is one layer. The ones I check on every project now:
| Habit | What it stops |
|---|---|
Commit the lockfile, install with --frozen-lockfile in CI | Silent upgrades during a deploy |
| Don't run dependency install scripts by default | Payloads that run on install |
| Update on purpose, not on every install | Pulling whatever was published an hour ago |
| Read the diff of the lockfile in PRs | New transitive packages nobody asked for |
Bun already skips lifecycle scripts for dependencies unless they're listed in trustedDependencies, which is one reason I'm comfortable on it.
What a cooldown costs
Security fixes arrive three days late too. When a real CVE lands, I update that one package on purpose and let it skip the wait. That's a deliberate decision with someone looking at it, which is the point.
Why it matters
Nobody reviews every dependency, and pretending otherwise doesn't help. What I can control is when new code enters the project. Waiting a few days costs almost nothing, and it turns "were we fast enough to notice?" into "someone else noticed first."
Keep reading
All posts2026
5 min
Why T3 Code Replaced the Terminal as My Daily Agent Setup
Same agents, same subscriptions, one interface. Threads with their own worktrees, review before commit, approvals from my phone, and a second model one click away. What changed in my day, and what it still doesn't solve.
aiworkflowtooling3 min
Steering My Coding Agents From My Phone With T3 Code
The agents run on my laptop. I answer their questions, skim diffs, and open pull requests from my phone. How the remote setup works, what's worth doing on a small screen, and what isn't.
toolingworkflow