News for hackers. Stuff that matters.
Re:What NPM should do to stop a new colors attack by bhedgeoser on Monday January 10, 2022 @04:18PM (#29882682)
It's the responsibility of "svgo" to make sure it's direct dependencies are alright.
Re:What NPM should do to stop a new colors attack by ruined on Monday January 10, 2022 @05:24PM (#29883691)
> It's the responsibility of "svgo" to make sure it's direct dependencies are alright.

No, it's your responsibility to make sure your dependency tree is alright.

Your personal definition of 'alright' may be more easily satisfied if the packages you choose to depend on autonomously practice some level of responsibility towards their own dependencies. Choose wisely.

But there is no way to dictate your requirements to dependencies, or impose some kind of responsibility or demand some kind of warranty. You can accept what is offered, or not. In fact, if you are using svgo, even indirectly, you have agreed to this: https://github.com/svg/svgo/blob/main/LICENSE

>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

So svgo doesn't have to care and you can't make them. Even if they do care, there's no guarantee they will meet your standards - and you still can't make them.

If you want someone to blame, find someone willing to sign a contract that says you can blame them.

Efforts within NPM and github to control this situation are simply the bare minimum of case-by-case disaster mitigation, in the interest of reputation alone. If you're using their infrastructure, you apparently find this acceptable.

Re:What NPM should do to stop a new colors attack by greggman3 on Monday January 10, 2022 @04:56PM (#29883257)
Is it? In retail, AFAIK, if a store sells you a defective product, they are liable (or at least partly liable). It doesn't matter that some other manufacture made the product. The point being, responsibility is shared.

You're responsible for every dependency you add to your project and that includes all sub-dependencies. Your users will sue you for not doing your due diligence. You may turn around and try to sue your suppliers but that doesn't absolve you of your responsibility.

Re:What NPM should do to stop a new colors attack by joe_the_user on Monday January 10, 2022 @04:42PM (#29883045)
Who's paying svgo to do that checking?

NOTE: this isn't an open source versus closed source thing. Linux has distributions which test included packages (to varying extents, I'm sure) and some of these are commercial operations. It's not impossible to have code whose verification you have paid for, to one extent or another, even with open source. (and hey, you can install malware with automatically updating closed-source see Solarwinds).

Re:What NPM should do to stop a new colors attack by notatoad on Monday January 10, 2022 @04:21PM (#29882734)
Sure, that is technically correct and if your only goal is to assign blame that's helpful to point out. But it does nothing to prevent this from happening again.

The point here is how we can make it easier for svgo and every other package to avoid the problem in the first place.

Re:What NPM should do to stop a new colors attack by bhedgeoser on Monday January 10, 2022 @04:23PM (#29882767)
* It should be the responsibility of "svgo" to make sure it's direct dependencies are alright.
Re:What NPM should do to stop a new colors attack by gopher_space on Monday January 10, 2022 @04:33PM (#29882935)
Why can't you point that attitude in both directions?