Live data from Hacker News

Axios compromised on NPM – Malicious versions drop remote access trojan

stepsecurity.io

611–620 of 894 posts

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#611

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-scr…

Everyone has forgotten standard ISO 8601 durations and invented their own syntax.

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#613

Earlier quoted context omitted.

> We have libraries like SQLite, which is a single .c file that you drag into your project You are just swapping a package manager with security by obscurity by copy pasting code into your project. It is arguably a much worse way of handling supply chain security, as now there is no way to audit your dependencies. > If you get rid of transitive dependencies, you get rid of the need of a package manager This argument…

> You are just swapping a package manager with security by obscurity by copy pasting code into your project You should try writing code, and not relying on libraries for everything, it may change how you look at programming and actually ground your opinions in reality. I'm staring at company's vendor/ folder. It has ~15 libraries, all but one of which operate on trusted input (game assets). > fundamental benefits of…

https://github.com/memflow/memflow

https://github.com/PyO3/pyo3

https://slint.dev/

https://github.com/dora-rs/dora

It is VERY common in existing codebases that are migrating from C++/C to make heave use of FFI/ existing C

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#614

Earlier quoted context omitted.

Yeah, NPM should be enforcing 2FA and likely phishing resistant 2FA for some packages/ this should be a real control, issuing public audit events for email address changes, and publish events should include information how it was published (trusted publishing, manual publish, etc).

Instead they took away TOTP as a factor. Scaling security with the popularity of a repo does seem like a good idea.

Are there downsides to doing this? This was my first thought - though I also recognize that first thoughts are often naive.

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#615
post #99

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-scr…

Props to uv for actually using the correct config path jfc what is “bunfig”

A trendy sandwich

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#616
I've been advocating to minimize the number of dependencies for some time now. Once you've maintained an open source project for several years, you start to understand the true cost of dependencies and you actually start to pay attention to the people behind the libraries. Popularity doesn't necessarily mean reliable or trustworthy or secure.

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#617

Earlier quoted context omitted.

The minute between December 31, 2016 23:59 and January 1st 2017 is 61 seconds, not 60 seconds. The hour that contains that minute is 3601 seconds, the day that contains that hour is 43201 seconds, etc. If you assume a fixed duration and simply multiply by 43200, your math will be wrong compared to the rest of the world. Daylight savings time makes a day take 23 hours or 25 hours. That makes a week take 7254000 second…

Leap seconds are their own nightmare. UNIX time ignores them, btw, so that the unix epoch is 86400*number of days since 1/1/1970 + number of seconds since midnight. The behavior at the instance of a leap second is undefined.

Undefined behavior is worse than complicated defined behavior imo.

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#618

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-scr…

Where in the pnpm documentation does it say that it ignores scripts by default? From https://pnpm.io/cli/install#--ignore-scripts : > Default: *false*

Weird. The config also appears to default to `false`

https://pnpm.io/settings#ignorescripts

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#619
post #264

Earlier quoted context omitted.

Why wouldn't the "fat std" thing work? Yes it's hard to design properly, both in scope and actual design (especially for an unstandardized language still moving fast), but throwing the towel and punting the problem to the "free market" of uncurated public repos is even worse. It's what we call in France "la fête du slip". PS: that's one reason I try to use git submodules in my Common Lisp projects instead of QuickLis…

Because fat std is rigid, impractical, and annoying.

I think we found the constituency that led to the present sorry situation.

Re: Axios compromised on NPM – Malicious versions drop remote access trojan

#620
post #489

[flagged]

You mean you vibe coded something.

"Zero deps. One file." People prefer hand-written comments over LLM-written ones.

"Already detects the hijacked maintainer email on the current safe version." You simply flag all proton email addresses.

Post reply on HN