Live data from Hacker News

Oh no, not again a meditation on NPM supply chain attacks

tane.dev

141–150 of 235 posts

Re: Oh no, not again a meditation on NPM supply chain attacks

#141

Earlier quoted context omitted.

[flagged]

> Consider how many JavaScript developers are completely unemployable without that free software. Can you say more about this?

It boils down to him feeling superior to web developers, who are far beneath him and couldn't possibly program with other tools.

Re: Oh no, not again a meditation on NPM supply chain attacks

#142

Earlier quoted context omitted.

[flagged]

I mean, you're right about that - but how many construction workers could build a house without having access to pre-cut lumber, pre-sharpened tools, nailguns, power equipment, pre-cast nails, etc., etc?

My neighbor works construction and my son did for a while. They were working on the new Texas Instruments silicon prefab. The people that do the actual work with their hands are expected to do just about everything. We are talking about advanced metal work in a place with liquid nitrogen and harmful chemical agents.

The actual engineers just walk around to validate the work conforms to the written plans. That is why these large engineering companies prefer to hire only from labor unions in a location that is extremely anti-union, because the union has the social resources to validate the candidates in ways the employer does not.

Even in that environment there are more experienced people who are 10x producers.

Re: Oh no, not again a meditation on NPM supply chain attacks

#143
post #19

Earlier quoted context omitted.

I remember joining my company right out of college. In the interview we started talking about open source since I had some open source Android apps. I asked if the company contributed back to the projects it used. The answer was no, but that they were planning to. Over a decade later... they finally created a policy to allow commits to open source projects. It's been used maybe 3 times in it's first year or so. Nobod…

That's fine. There's no requirement to "contribute back". Respect the license terms and don't go demanding anything unless you have a support contract and don't expect that you can get a support contract. It's fine to just use something as long as you also don't harass the maintainer as if they owed you something.

The annoying part is that often without a corporate policy for contributing, you are doing the work anyway because you need XYZ from the software, just that it lives in a private fork that will never get upstreamed as a result of policy.

Re: Oh no, not again a meditation on NPM supply chain attacks

#144
post #2

> The tools we use to build software are not secure by default, and almost all of the time, the companies that provide them are not held to account for the security of their products. The companies? More like the unpaid open source community volunteers who the Fortune 500 leech off contributing nothing in return except demands for free support, fixes and more features.

Fool me once, shame on you. Fool me repeatedly again and again, then?

Re: Oh no, not again a meditation on NPM supply chain attacks

#145
post #2

> The tools we use to build software are not secure by default, and almost all of the time, the companies that provide them are not held to account for the security of their products. The companies? More like the unpaid open source community volunteers who the Fortune 500 leech off contributing nothing in return except demands for free support, fixes and more features.

Well? If you license software the way most FOSS products are licensed, that's a natural result. It is literally putting up a sign saying "free beer."

You can't give permission for them to use the stuff for free and then accuse them of "leeching." If the expectation is contribution in kind, that needs to be in the license agreement.

Re: Oh no, not again a meditation on NPM supply chain attacks

#146
post #78

Earlier quoted context omitted.

[flagged]

I think that ultimately it’s the fault of the web platform. With just a bit of retraining those engineers that could not be productive without a ton of npm packages could ship an iPhone app written in Swift. JS’ standard library is abysmal.

This sounds like blaming the victim. How do you on one hand call these people engineers, as if they are engineering something, and then on the other hand blame everything else for their inability to perform? That is weird.

Its just a software platform. Would you really blame society for being too harsh if doctors, lawyers, police, teachers cannot do their jobs? It is weird to see so many people blame the web platform for hostility when its so much less challenging than it used to be.

The most common cause of these frustrations I encountered while working in JavaScript is that developers are educated in something that looks like A, but JavaScript is not A, there is no training for JavaScript/Web, so therefore JavaScript/Web is hostile. As a self-taught developer that never made sense to me.

Re: Oh no, not again a meditation on NPM supply chain attacks

#148
post #113

My non-solution years ago was to use as little dependencies as possible. And vendor node_modules then review every line of code changed when I update dependencies. Not every project and team can do that. But when feasible, it's a strong mitigation layer. What worked was splitting dependency diff review among the team so it's less of a burden. We pin exact versions and update judiciously.

You can't realistically do that when for example you use Jest as your test runner, which alone would add 300 packages. ESLint would be another culprit, adding 80 packages. It quickly gets out of hand. To me it seems like the fewest projects could use this approach you described.

You usually can. You just gotta be a bit adventurous.

https://github.com/lukeed/uvu is a testing library with almost no dependency.

https://github.com/biomejs/biome is a linter written in Rust which in theory has a smaller attack surface.

And as long as you stay some versions behind bleeding edge, you can use time in your favor to catch supply chain attacks before they reach your codebase.

Re: Oh no, not again a meditation on NPM supply chain attacks

#149

Earlier quoted context omitted.

> someone else’s work It is not “their” work anymore (IP rights discussions aside) once they published with an unrestricted license. That’s the point. You do it expecting nothing in return, and do it willingly. Expecting “fairness” is a misunderstanding of the whole spirit of it.

>expecting nothing in return Let’s ignore that no one contributes to open source expecting nothing in return. I can help someone out expecting nothing in return. Then if my situation changes and I need help, but they look at me and say “sorry your help was a gift so I’m not going to return the favor even though I can”. That person is a dick. The problem is you are taking the act of applying a permissive license as so…

> I can help someone out expecting nothing in return. Then if my situation changes

It sounds like you did expect something in return, conditional on your circumstances. Maybe it's good-will or something, but some kind of social insurance in any case.

Re: Oh no, not again a meditation on NPM supply chain attacks

#150

The NPM monoculture is the problem. It would be absurd to suggest that all backend engineers use the same build tooling and dependency library, but here we are with frontend. It's just too big of an attack surface.

It would be absurd to make such a suggestion. However, the comparison is not correct. Not all front-end development uses the same build tooling or dependency libraries, or programming language for that matter. Even if you narrow to the typescript ecosystem, it's still not true.
Post reply on HN