Another NPM Package Is Highjacked
blog.openreplay.com
blog.openreplay.com
Their suggestion is to lock your project dependencies in your package.json file, however this completely ignores the rest of the dependency graph that is brought in as a result of installing those packages, locked or not.
In my experience almost every CVE or exploited package was a dependency of a dependency of a dependency that I have no direct control over.
The only way to ensure dependencies of dependencies aren't changing without your knowledge is to use and commit a lock file.
I honestly don't know what your system API point has to do with anything when we're talking about a distinct disadvantage to NPM specifically and the JS ecosystem generally.
Why do you think this is distinct disadvantage to NPM specifically? You can steal someones account and do the same with Rust crate for example, or Go package or even C/C++ header only library. It can get installed or updated to malicious version on user side in the same way, because everyone uses version ranges like "^" or "~" or equivalent. And if you're going to say everyone uses lockfiles, NPM also uses lockfiles for many years already.
Necessary, but still not sufficient - I suspect the attack model will just move to buying/stealing keys.
Revoking the published packages and rotating compromised passwords should certainly also be done, but neither of those stop packages in mirrored or present in local caches from being used without further intervention (assuming your packaging ecosystem regularly verifies packages have valid signatures, which sadly I know ecosystems like NPM do not).
What might work would be an interactive two factor authentication similar to how Microsoft or Google does it. Every time a release to the package repository was awaiting, the author would get push notification to their primary device and it would have to be approved manually.
Still, when I update packages on my Debian install, I am not worried at all about this kind of issue. That makes me wonder if and why Debian packages would be safer. I think that the following are reasons that I trust official Debian packages:
* it is a curated list of software: confidence in the quality of the software
* maintainers follow up on security issues: confidence in security issues being fixed in a timely manner
* packages are signed: confidence that package is created by a trusted maintainer
* trustworthy maintainers: not everyone can upload new versions of packages, it takes time to become a new maintainer
So it makes me wonder whether a similar concept of curated repositories for language specific package repositories would be useful or needed... am I the only one to think about this?
if everyone locked every single dependency wouldn't most 3rd party software be uninstallable?
for any moderately complex software conflicts will arise if they share dependencies.
I really think they have done a great job w.r.t. software supply chain security. I've been working on a post here going into detail https://verdverm.com/go-mods/
Most frontend developers are mere trend followers instead of hackers and have agreed to obtuse, over the top solutions because that is what the industry says. It has become the norm to have countless layers to show a simple checkbox tied to a boolean column in the db.
Just because everything is wrapped in one install command like create-react-app doesn't mean it's actually better.
Of course there are exceptions but the vast majority of designers and front end developers fall into this bucket.