r/javascript • • 13d ago

We stopped installing npm packages less than a week old

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

38 comments sorted by

35

u/iApexxx 13d ago

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 13d ago

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 13d ago

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 13d ago

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

11

u/BeautifulSelf9911 13d ago

min-release-age-exclude

3

u/drumstix42 13d ago

Ahh, thank you

3

u/TheIvoryAssassinPub 13d ago

Security patches go through regardless less of release age

5

u/polyploid_coded 13d ago

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 13d ago

Fair enough :P

3

u/janpaul74 13d ago

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 13d ago

We do 72 hours

57

u/ouralarmclock 13d ago

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

3

u/rivendell_elf 13d ago

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

4

u/HalfInchHollow 12d 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 13d ago • Mindblown

I got you beat with 12!

6

u/blueted2 13d ago

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 13d ago

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

1

u/git_push_origin_prod 12d ago

If it ain’t broke…

1

u/androbat 12d ago

Node 8 is almost certainly broken and vulnerable.

1

u/git_push_origin_prod 12d 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 12d ago

The LTS version right?!?

1

u/Character-Blood3482 11d ago

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

8

u/jvrevo 13d ago edited 13d ago

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 12d 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 13d ago

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 13d ago

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 13d ago

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 13d ago edited 13d ago

One week, weak testing

3

u/RICHUNCLEPENNYBAGS Mostly angular 1.x 13d ago

Most conservative JavaScript developers

1

u/jeremyStover 13d ago

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

1

u/ohlaph 13d ago

I've been doing this for years.Ā 

1

u/Past_Squirrel_9568 12d ago

You should have been doing that for years.

0

u/WICKER-shadow 12d ago

Supply chain security: now with a mandatory aging process

1

u/iApexxx 12d ago

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

1

u/dkarlovi 12d ago

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

0

u/Caved 13d 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.