r/javascript • • 24d ago

We stopped installing npm packages less than a week old

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

42 comments sorted by

35

u/iApexxx 24d 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 24d 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 24d 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 24d 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 24d ago

min-release-age-exclude

→ More replies (1)

3

u/TheIvoryAssassinPub 24d ago

Security patches go through regardless less of release age

5

u/polyploid_coded 24d 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 24d ago

Fair enough :P

3

u/janpaul74 24d 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 24d ago

We do 72 hours

1

u/relisa6996 4d ago

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

1

u/p-reyes-6823 2d ago

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

57

u/ouralarmclock 24d ago

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

3

u/rivendell_elf 24d ago

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

4

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

I got you beat with 12!

6

u/blueted2 24d 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 24d ago

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

→ More replies (2)
→ More replies (1)

1

u/git_push_origin_prod 24d ago

The LTS version right?!?

1

u/Character-Blood3482 23d ago

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

8

u/jvrevo 24d ago edited 24d 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 24d 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 24d 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 24d 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 24d 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 24d ago edited 24d ago

One week, weak testing

3

u/RICHUNCLEPENNYBAGS Mostly angular 1.x 24d ago

Most conservative JavaScript developers

1

u/jeremyStover 24d 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 24d ago

I've been doing this for years. 

1

u/Past_Squirrel_9568 23d ago

You should have been doing that for years.

1

u/Temporary_Job_3406 7d 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 5d ago

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

0

u/WICKER-shadow 23d ago

Supply chain security: now with a mandatory aging process

1

u/iApexxx 23d ago

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

1

u/dkarlovi 23d ago

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

0

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