r/javascript • • Nov 01 '26

We stopped installing npm packages less than a week old

https://brunoj.com/nothing-installs-at-our-company-until-its-a-week-old/
127 Upvotes

43 comments sorted by

35

u/iApexxx Nov 01 '26

Author here :) Did this at work after watching axios and TanStack get hijacked this year. Both were pulled within hours, so we just wait a week now. Curious what delay people here run, if any.

37

u/zshift Nov 01 '26

It's not as simple as having a policy to wait X days. What if one of those patches is a legitimate security patch fixing an active zero-day exploit?

My approach is to wait a few days for updates which I cannot immediately verify the validity of, but if there are multiple, trustworthy sources of information stating that its an emergency fix, then I'm inclined to move forward with the update early.

19

u/iApexxx Nov 01 '26

Yeah, same idea here. If a fix can't wait we add an exception for that one package and pull it right away. Haven't had to yet, but having more than one source confirm it's real is a good rule for that.

5

u/drumstix42 Nov 01 '26

So you're doing it manually? AFAIK, the npm min-release-age config doesn't support exceptions out of the box.

11

u/BeautifulSelf9911 Nov 02 '26

min-release-age-exclude

3

u/drumstix42 Nov 02 '26

Ahh, thank you

3

u/TheIvoryAssassinPub Nov 02 '26

Security patches go through regardless less of release age

5

u/polyploid_coded Nov 01 '26

The same cybersecurity news got me to update my policy. Though I went with 3 or 4 days because that's what the first example I saw taught me to do.

2

u/iApexxx Nov 01 '26

Fair enough :P

3

u/janpaul74 Nov 02 '26

We have this interval set at 24 hours so as not to miss potentially zero day fixes. But some packages have been set to 5 days (axios & tanstack). Some local / in-house package are live.

1

u/trudesign Nov 02 '26

We do 72 hours

1

u/relisa6996 9d ago

Does the week apply to transitive dependencies too? A lockfile refresh can bring new versions into the tree.

1

u/p-reyes-6823 8d ago

Does the week gate every new version, or only newly added packages? That changes how it affects routine upgrades.

57

u/ouralarmclock Nov 01 '26

Ya'll are updating your packages? Next you'll tell me you're updating your node versions too!

3

u/rivendell_elf Nov 02 '26

One of my old projects running node 18 in production is crying in corner 😭

4

u/HalfInchHollow 29d ago

I work for a top 10 tech company in the country. Not quite FAANG but basically on the line of it.

We still use 12 for one of our apps.

6

u/ouralarmclock Nov 02 '26 • Mindblown

I got you beat with 12!

6

u/blueted2 Nov 02 '26

Up until recently we had node 12 for dev, deployed onto node 8. It's now node 24 .... still deployed onto node 8 but it's a start

4

u/TakeFourSeconds Nov 02 '26

If it works locally with 24 why can't you change the prod version?

1

u/git_push_origin_prod 29d ago

If it ain’t broke…

1

u/androbat 29d ago

Node 8 is almost certainly broken and vulnerable.

1

u/vazquez-lisa-582 3d ago

Local success doesn't prove production readiness; the image, native addons, and deployment platform may constrain the Node upgrade.

1

u/git_push_origin_prod 29d ago

With AI there’s no excuse for this dude. Tell management to invest, or just work on the PR. I don’t mean to preach, but as a community we have to do better. Start rewriting and securing everything

1

u/git_push_origin_prod 29d ago

The LTS version right?!?

1

u/Character-Blood3482 28d ago

My last job on a company in 2025 was using node 8 lol

8

u/jvrevo Nov 02 '26 edited Nov 02 '26

7 days, adding exceptions only if there are critical updates or similar and we try to verify they are safe when we do those as much as possible. This is for npm, Python, GitHub actions etc.

8

u/Due_Ad_2994 29d ago

We have been doing this for over a decade to much ridicule from colleagues who are now acting like they discovered stability lol

5

u/tsteuwer Nov 02 '26

We decided on a 14 days. Typical things are caught within 48 hours but with AI it will start getting harder to spot so our enterprise started waiting a bit longer.

4

u/tidwell Nov 01 '26

Yep, enforcing the same 7 day policy at work and now on my personal stuff. 0 day supply chain attacks are way way way too easy now. If you aren’t doing a delay already it’s a matter of ā€œwhenā€ not ā€œifā€ you’re going to get hit with a supply chain attack.

2

u/ldn-ldn Nov 02 '26

I do one month old plus cross reference security releases. For example, NodeJs 24.22.0 was updated to 24.22.1 on the release day instead of waiting.

2

u/ksskssptdpss Nov 02 '26 edited Nov 02 '26

One week, weak testing

3

u/RICHUNCLEPENNYBAGS Mostly angular 1.x Nov 02 '26

Most conservative JavaScript developers

1

u/jeremyStover Nov 02 '26

This is the same rule I tell every org I work for. Mor importantly, no version less than 2 weeks old.

1

u/ohlaph Nov 02 '26

I've been doing this for years.Ā 

1

u/Past_Squirrel_9568 28d ago

You should have been doing that for years.

1

u/Temporary_Job_3406 12d ago

Very important to keep packages up to date and secure, but always worth it to be critical and check the changes!

1

u/r-chris_38 10d ago

A week can catch quick takedowns; does it cover every update? Established packages can be compromised too.

0

u/WICKER-shadow 29d ago

Supply chain security: now with a mandatory aging process

1

u/iApexxx 29d ago

Well, in the article I review the largest supply chain attacks and their time-to-remove from the registry :)

1

u/dkarlovi 29d ago

You need to decant you NPM packages for a few days to let the tannins breathe.

0

u/Caved 29d ago

Be aware that in the current security landscape, 7 days is an eon. At most I'd go for 1 day. And that's for regular updates.

Critical security fixes need to go out ASAP, to the point we've started diffing those updates and running security checks on them ourselves to get them out fast enough.

We've seen exploits being actively used to attack us for CVEs announced less than an hour ago.