postalcoder
7 hours ago
PSA: npm/bun/pnpm/uv now all support setting a minimum release age for packages.
I also have `ignore-scripts=true` in my ~/.npmrc. Based on the analysis, that alone would have mitigated the vulnerability. bun and pnpm do not execute lifecycle scripts by default.
Here's how to set global configs to set min release age to 7 days:
~/.config/uv/uv.toml
exclude-newer = "7 days"
~/.npmrc
min-release-age=7 # days
ignore-scripts=true
~/Library/Preferences/pnpm/rc
minimum-release-age=10080 # minutes
~/.bunfig.toml
[install]
minimumReleaseAge = 604800 # seconds
(Side note, it's wild that npm, bun, and pnpm have all decided to use different time units for this configuration.)If you're developing with LLM agents, you should also update your AGENTS.md/CLAUDE.md file with some guidance on how to handle failures stemming from this config as they will cause the agent to unproductively spin its wheels.
friendzis
6 hours ago
> (Side note, it's wild that npm, bun, and pnpm have all decided to use different time units for this configuration.)
First day with javascript?
notpushkin
6 hours ago
You mean first 86,400 seconds?
x0x0
5 hours ago
You have to admire the person who designed the flexibility to have 87239 seconds not be old enough, but 87240 to be fine.
zelphirkalt
2 hours ago
I actually think it is not too bad a design, because seconds are the SI base unit for time. Putting something like "x days" requires additional parsing steps and therefore complexity in the implementation. Either knowing or calculating how many seconds there are in a day can be expected of anyone touching a project or configuration at this level of detail.
wongarsu
an hour ago
Seconds are also unambiguous. Depending on your chosen definition, "X days" may or may not be influenced by leap seconds and DST changes.
I doubt anyone cares about an hour more or less in this context. But if you want multiple implementations to agree talking about seconds on a monotonic timer is a lot simpler
raverbashing
4 hours ago
This is the difference between thinking about the user experience and thinking just about the technical aspect
gib444
5 hours ago
OP should be glad a new time unit wasn't invented
friendzis
4 hours ago
Workdays! Think about it, if you set the delay in regular days/seconds the updated dependency can get pulled in on a weekend with only someone maybe on-call.
(Hope your timezones and tzdata correctly identifies Easter bank holiday as non-workdays)
berkes
3 hours ago
> Workdays!
This is javascript, not Java.
In JavaScript something entirely new would be invented, to solve a problem that has long been solved and is documented in 20+ year old books on common design patterns. So we can all copy-paste `{ or: [{ days: 42, months: 2, hours: "DEFAULT", minutes: "IGNORE", seconds: null, timezone: "defer-by-ip" }, { timestamp: 17749453211*1000, unit: "ms"}]` without any clue as to what we are defining.
In Java, a 6000LoC+ ecosystem of classes, abstractions, dependency-injectables and probably a new DSL would be invented so we can all say "over 4 Malaysian workdays"
whatisthiseven
3 hours ago
But you know that Java solution will continue working even after we no longer use the Gregorian Calendar, the collapse and annexation of Malaysia to some foreign power, and then us finally switching to a 4-day work week; so it'd be worth it.
nesarkvechnep
2 hours ago
It probably won’t work correctly from the get go. But it can be debugged everywhere so that’s good.
berkes
an hour ago
... and since it was architectured to allow runtime injection-patching of events before they hit the enterprise-service-bus, everyone using this library must first set fourteen ENV vars in their profile, and provide a /etc/java/springtime/enterprise-workday-handling/parse-event-mismatch.jar.patch. Which should fix the bug for you.
You can find the patch files for your OSs by registering at Oracle with a J3EE8.4-PatchLibID (note, the older J3EE16-PatchLib-ids aren't compatible), attainable from your regional Oracle account-manager.
yohannesk
3 hours ago
And we also need localization. Each country can have their own holidays
wongarsu
an hour ago
Don't forget about regional holidays, which might follow arbitrary borders that don't match any of the official subdivisions of the country. Or may even depend on the chosen faith of the worker
rolandog
3 hours ago
And we need groups of locales for teams that are split across multiple locations; e.g.:
new_date = add_workdays(
workdays=1.5,
start=datetime.now(),
regions=["es", "mx", "nl", "us"],
)ghurtado
3 hours ago
If we're taking suggestions, I'd like to propose "parsec" (not to be confused with the unit of distance of the same name)
That way Han Solo can make sense in the infamous quote.
EDIT: even Gemini gets this wrong:
> In Star Wars, a parsec is a unit of distance, not time, representing approximately 3.26 light-years
latexr
3 hours ago
> That way Han Solo can make sense in the infamous quote.
They explained it in the Solo movie.
https://www.reddit.com/r/MovieDetails/comments/ah3ptm/solo_a...
binarymax
38 minutes ago
Making a whole movie just to retcon the parsec misuse in Ep IV was a choice
cyrusmg
4 hours ago
N multiplications of dozen-second
vasco
2 hours ago
To me it sounds safer to have different big infra providers with different delays, otherwise you still hit everyone at the same time when something does inevitably go undetected.
And the chances of staying undetected are higher if nobody is installing until the delay time ellapses.
It's the same as not scheduling all cronjobs to midnight.
flanbiscuit
6 hours ago
Pnpm did this first but I’m glad to see all the others follow suit
For anyone wondering, you need to be on npm >= 11.10.0 in order to use it. It just became available Feb 11 2026
superjan
6 hours ago
About the use of different units: next time you choose a property name in a config file, include the unit in the name. So not “timeout” but “timeoutMinutes”.
layer8
5 hours ago
Or require the value to specify a unit.
mort96
4 hours ago
At that point, you're making all your configuration fields strings and adding another parsing step after the json/toml/yaml parser is done with it. That's not ideal either; either you write a bunch of parsing code (not terribly difficult but not something I wanna do when I can just not), or you use some time library to parse a duration string, in which case the programming language and time library you happen to use suddenly becomes part of your config file specification and you have to exactly re-implement your old time handling library's duration parser if you ever want to switch to a new one or re-implement the tool in another language.
I don't think there are great solutions here. Arguably, units should be supported by the config file format, but existing config file formats don't do that.
layer8
8 minutes ago
Another parsing step is the common case. Few parameters represent untyped strings where all characters and values are valid. For numbers as well, you often have a limited admissible range that you have to validate for. In the present case, you wouldn’t allow negative numbers, and maybe wouldn’t allow fractional numbers. Checking for a valid number isn’t inherently different from checking for a regex match.
notpushkin
4 hours ago
TOML has a datetime type (both with or without tz), as well as plain date and plain time:
start_at = 2026-05-27T07:32:00Z # RFC 3339
start_at = 2026-05-27 07:32:00Z # readable
We should extend it with durations: timeout = PT15S # RFC 3339
And like for datetimes, we should have a readable variant: timeout = 15s # can omit "P" and "T" if not ambiguous, can use lowercase specifiers
Edit: discussed in detail here: https://github.com/toml-lang/toml/issues/514dxdm
an hour ago
> adding another parsing step after the json/toml/yaml parser is done with it. That's not ideal either
I'd argue that it is ideal, in the sense that it's the sweet spot for a general config file format to limit itself to simple, widely reusable building blocks. Supporting more advanced types can get in the way of this.
Programs need their own validation and/or parsing anyway, since correctness depends on program-specific semantics and usually only a subset of the values of a more simply expressed type is valid. That same logic applies across inputs: config may come from files, CLI args, legacy formats, or databases, often in different shapes. A single normalization and validation path simplifies this.
General formats must also work across many languages with different type systems. More complex types introduce more possible representations and therefore trade-offs. Even if a file parser implements them correctly (and consistently with other such parsers), it must choose an internal form that may not match what a program needs, forcing extra, less standard transformation and adding complexity on both sides for little gain.
Because acceptable values are defined by the program, not the file, a general format cannot fully specify them and shouldn’t try. Its role is to be a medium and provide simple, human-usable (for textual formats), widely supported types, avoid forcing unnecessary choices, and get out of the way.
All in all, I think it can be more appropriate for a program to pick a parsing library for a more complex type, than to add one consistently to all parsers of a given file format.
weird-eye-issue
6 hours ago
timeoutMs is shorter ;)
You guys can't appreciate a bad joke
cozzyd
5 hours ago
Megaseconds are about the right timescale anyway
kace91
2 hours ago
What megaseconds? They clearly meant the Microsoft-defined timeout.
withinboredom
2 hours ago
timoutμs is even better. People will learn how to type great symbols.
sayamqazi
5 hours ago
not timeout at all is even shorter.
powerpixel
2 hours ago
Is there a way to do that per repo for these tools ? We all know how user sided configuration works for users (they usually clean it whenever it goes against what they want to do instead of wondering why it blocks their changes :))
ZeWaka
2 hours ago
At least with npm, you can have a .npmrc per-repo
jdxcode
18 minutes ago
lol with mise I used a fourth time unit: https://mise.jdx.dev/configuration/settings.html#install_bef...
cowl
2 hours ago
min release age to 7 days about patch releases exposes you to the other side of the coin, you have an open 7 days window on zero-day exploits that might be fixed in a security release
ksnssjsjsj
2 hours ago
Out of the frying pan and into the frier.....
sspiff
2 hours ago
It's wild that none of these are set by default.
I know 90% of people I've worked with will never know these options exist.
zelphirkalt
2 hours ago
If everyone or a majority of people sets these options, then I think issues will simply be discovered later. So if other people run into them first, better for us, because then the issues have a chance of being fixed once our acceptable package/version age is reached.
po1nt
2 hours ago
That would likely mean same amount of people get the vulnerability, just 7 days later.
XYen0n
7 hours ago
If everyone avoids using packages released within the last 7 days, malicious code is more likely to remain dormant for 7 days.
otterley
7 hours ago
What do you base that on? Threat researchers (and their automated agents) will still keep analyzing new releases as soon as they’re published.
mike_hearn
3 hours ago
Their analysis was triggered by open source projects upgrading en-masse and revealing a new anomalous endpoint, so, it does require some pioneers to take the arrows. They didn't spot the problem entirely via static analysis, although with hindsight they could have done (missing GitHub attestation).
narrator
2 hours ago
A security company could set up a honeypot machine that installs new releases of everything automatically and have a separate machine scan its network traffic for suspicious outbound connections.
staticassertion
29 minutes ago
> What do you base that on?
The entire history of malware lol
cozzyd
7 hours ago
that's why people are telling others to use 7 days but using 8 days themselves :)
wongarsu
an hour ago
brb, switching everything to 9 days
porridgeraisin
4 hours ago
Genius
shreyssh
2 hours ago
Worth noting this attack was caught because people noticed anomalous network traffic to a new endpoint. The 7-day delay doesn't just give scanners time, it gives the community time to notice weird behavior from early adopters who didn't have the delay set.
It's herd immunity, not personal protection. You benefit from the people who DO install immediately and raise the alarm
sersi
2 hours ago
But wouldn't the type of people that notifes anomalous network activity be exactly the type of people who add a 7 day delay because they're security conscious?
jmward01
7 hours ago
I suspect most packages will keep a mix of people at 7 days and those with no limit. That being said, adding jitter by default would be good to these features.
Barbing
5 hours ago
>adding jitter by default would be good
This became evident, what, perhaps a few years ago? Probably since childhood for some users here but just wondering what the holdup is. Lots of bad press could be avoided, or at least a little.
DimmieMan
7 hours ago
They’re usually picked up by scanners by then.
Aurornis
7 hours ago
Most people won’t.
7 days gives ample time for security scanning, too.
3abiton
6 hours ago
This highly depends on the detection mechanism.
bakugo
7 hours ago
> If everyone avoids using packages released within the last 7 days
Which will never even come close to happening, unless npm decides to make it the default, which they won't.
mhio
7 hours ago
and for yarn berry
~/.yarnrc.yml
npmMinimalAgeGate: "3d"cvak
3 hours ago
I think the npm doesn't support end of line comments, so
~/.npmrc
min-release-age=7 # days
actually doesn't set it at all, please edit your comment.EDIT: Actually maybe it does? But it's weird because
`npm config list -l` shows: `min-release-age = null` with, and without the comment. so who knows ¯\_(ツ)_/¯
cvak
3 hours ago
ok, it works, only the list function shows it as null...
ashishb
5 hours ago
Run npm/pnpm/bun/uv inside a sandbox.
There is no reason to let random packages have full access to your machine
WD-42
6 hours ago
Props to uv for actually using the correct config path jfc what is “bunfig”
abustamam
2 hours ago
Silly portmanteau of "bun" and "config"
antihero
2 hours ago
npm is claiming this doesn’t exist
imhoguy
3 hours ago
Good luck with any `npm audit` in a pipeline. Sometimes you have to pull the latest release because the previous one had a critical vulnerability.
umko21
5 hours ago
The config for uv won't work. uv only supports a full timestamp for this config, and no rolling window day option afaik. Am I crazy or is this llm slop?
ad3xyz
5 hours ago
https://docs.astral.sh/uv/concepts/resolution/#dependency-co...
> Define a dependency cooldown by specifying a duration instead of an absolute value. Either a "friendly" duration (e.g., 24 hours, 1 week, 30 days) or an ISO 8601 duration (e.g., PT24H, P7D, P30D) can be used.
umko21
5 hours ago
My bad. This works for per project configuration, but not for global user configuration.
js2
4 hours ago
I think it should work at the user config level too:
> If project-, user-, and system-level configuration files are found, the settings will be merged, with project-level configuration taking precedence over the user-level configuration, and user-level configuration taking precedence over the system-level configuration.