Earlier quoted context omitted.
npm will use your lockfile if it’s present, otherwise yeah it’s pretty much whatever is tagged and latest at the time (and the version doesn’t even have to change). If npm respected every upstream lockfile, then it could never share a single version that satisfied all dependencies. The bigger issue here is that npm has such unrestricted and unsupervised access to the entire environment at all.
> If npm respected every upstream lockfile, then it could never share a single version that satisfied all dependencies. I'm asking in the context of installing a single CLI tool into ~/bin or something. There's no requirement to satisfy all dependencies, because the only dependency I care about is that one CLI tool. All I want is an equivalent of what `cargo install --locked` does — use the top-level lockfile of the…
Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
371–380 of 1001 posts
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#372Are Python packaging systems like pip exposed to the same risks? Is anybody looking at this?
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#373Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#374Earlier quoted context omitted.
Why even put a package download count on it? Just require it for everything submitted to NPM. It's not hard.
Because then it's extra hassle and expense for new developers to publish a package, and we're trying to keep things decentralized.
If we want decentralized package management for node/javascript, you need to dump NPM - why not something like Go's system which is actually decentralized? There is no package repository/registry, it's all location based imports.
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#375Earlier quoted context omitted.
It's both that and a culture of installing a myriad of constantly-updating, tiny libraries to do basic utility functions. (Not even libraries, they're more like individual pages in individual books). In our line-of-business .NET app, we have a logger, a database, a unit tester, and a driver for some specialty hardware. We upgrade to the latest version of each external dependency about once per year (every major versi…
> Slipping a malicious package into pypi could expose all kinds of juicy, proprietary data > In July 2024, Bittensor users were the victims of an $8 million hack. The Bittensor hack was an example of a supply chain hack using PyPI. PyPI is a site that hosts packages for the Python programming language https://www.halborn.com/blog/post/explained-the-bittensor-ha...
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#376Earlier quoted context omitted.
There is another related growing problem in my recent observation. As a Debian Developer, when I try to audit upstream changes before pulling them in to Debian, I find a huge amount of noise from tooling, mostly pointless. This makes it very difficult to validate the actual changes being made. For example, an upstream bumps a version of a lint tool and/or changes style across the board. Often these are labelled "chor…
I'm using difftastic, it cuts down a whole lot of the noise https://difftastic.wilfred.me.uk/
Edit: also, consider how much of https://github.com/Wilfred/difftastic/commits/master/ is just noise in itself. 15k commits for a project that appears to only be about four years old.
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#377Earlier quoted context omitted.
Sandboxing doesn't do any good if the malicious code and target data are in the same sandbox, which is the whole point of these supply-chain attacks.
I mean, what does do good if your supply chain is attacked? This said, less potential vendors supplying packages 'may' reduce exposure, but doesn't remove it. Either way, not running the bleeding edge packages unless it's a known security fix seems like a good idea.
- npm should require 2FA disallow tokens for publishing. This is an option, but it should be a requirement.
- npm should require using a trusted publisher and provenance for package with over 100k downloads a week and their dependencies.
- Github should require a 2FA step for automated publishing
- npm should add a cool down period where if won't install brand new packages without a flag
- npm should stop running postinstall scripts.
- npm should have an option to not install packages without provenance.
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#378Earlier quoted context omitted.
Even minor styling rule changes would result in a huge PR across our frontend so I tend to avoid any change in tooling. But using old tools is not the end of the world. I only upgrade ESLint because I had to upgrade something else.
Would omitting this commit from git blame solve the issue?
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#379Earlier quoted context omitted.
Can't help noticing, in the original article: > The entire attack design assumes Linux or macOS execution environments, checking for os.platform() === 'linux' || 'darwin'. It deliberately skips Windows systems If I were the conspiracy-minded sort I might jump to some wild conclusions here.
I’m using windows again. By default windows has “power shell” which is not at all like bash and is (how do I say this diplomatically)… wanting. I mean it says something the developed the Linux Subsystem for Windows, but it’s an optional install.
I'm a die hard linux user, and some years ago took a windows gig on a whim. I find powershell fantastic and the only thing that makes my role bearable. Now, one of the first things i install on Linux is powershell.
Re: Shai-Hulud malware attack: Tinycolor and over 40 NPM packages compromised
#380Are Python packaging systems like pip exposed to the same risks? Is anybody looking at this?