Live data from Hacker News

Always Review Your Dependencies, AGPL Edition

agwa.name

11–20 of 236 posts

Re: Always Review Your Dependencies, AGPL Edition

#11
> I repeat the above recursively on transitive dependencies as many times as necessary. I also repeat the cursory code review any time I upgrade a dependency.

If this guy has to work on a "modern" frontend project, he's gonna review dependencies until the heat death of the universe.

Re: Always Review Your Dependencies, AGPL Edition

#12

It's always been weird to me how Microsoft invests so much in making JavaScript easy to develop and maintain with TypeScript but does so little to make it safe, the one thing JS needs is a standard library by Microsoft (or similar, e.g, Google) that we can trust, aiming to significantly reduce the number of dubious-origin dependencies of every JS project (on node and the browser)

Here's another opportunity to point out this unfortunate licensing bug in TypeScript's standard library:

https://github.com/microsoft/tslib/issues/47

(Disclaimer: I like TS, but I filed the above bug.)

Re: Always Review Your Dependencies, AGPL Edition

#13

Package managers need to automatically derive properties of end builds based on licenses. E.g. Eclipse License 2.0 without the presence of another more liberal license means it cannot be used in copyleft software, any dependency that is copyleft is also infectious etc. Of course it won't account for every single legal property but the basic checks should be done. To prevent work duplication a single binary/library wr…

There is https://www.fossology.org/ which helps a bit.

Re: Always Review Your Dependencies, AGPL Edition

#14
post #6

I would love to have this guy write my security sensitive software.

I used to work with a guy that would review every line of our projects node modules. He’d find issues all the time, so there’s no way he wasn’t pay attention. He also managed to be productive with writing his features. Having that guy on the team was amazing, I have no idea what motivated him to do such tedious work, but he seemed to love it...

Re: Always Review Your Dependencies, AGPL Edition

#15
post #10

Package managers need to automatically derive properties of end builds based on licenses. E.g. Eclipse License 2.0 without the presence of another more liberal license means it cannot be used in copyleft software, any dependency that is copyleft is also infectious etc. Of course it won't account for every single legal property but the basic checks should be done. To prevent work duplication a single binary/library wr…

The licensing of a dependency could be easily determined programmatically (GitHub already built a decent scanner). However, I think that the quality of a dependency is most important and that requires a manual vetting process. A trivial solution would be to create a crowd-sourced dependency vetting platform.

GitHub's license detection algorithm is crap. It tends to get GPLv2 right, but most other licenses are hit-and-miss. And I still can't find a setting where I can manually specify the license when GitHub can't autodetect one or gets it wrong.

Re: Always Review Your Dependencies, AGPL Edition

#17

> I repeat the above recursively on transitive dependencies as many times as necessary. I also repeat the cursory code review any time I upgrade a dependency. If this guy has to work on a "modern" frontend project, he's gonna review dependencies until the heat death of the universe.

But doesn‘t that say more about modern leftpaddable frontend frameworks than about the author?

Re: Always Review Your Dependencies, AGPL Edition

#18
This is one of the items embedded Linux development using Yocto has particulary well covered. It checks every license for every package and you can ask it to verify the checksum of the license file. If the license changes after upgrading a package, you'll get a build error.

Re: Always Review Your Dependencies, AGPL Edition

#19
Not sure about this bit:

> This is quite a bit of work, but is necessary to avoid falling victim to attacks like _event-stream_.

Reviewing dependencies is important, but I don't think anything the author mentions would have made a difference with event-stream. The whole issue there was that malicious changes were snuck in via a change of maintainers and a later update to a child dependency, so when people initially adopted it as a dependency there were no red flags in the library to find.

Re: Always Review Your Dependencies, AGPL Edition

#20

It's always been weird to me how Microsoft invests so much in making JavaScript easy to develop and maintain with TypeScript but does so little to make it safe, the one thing JS needs is a standard library by Microsoft (or similar, e.g, Google) that we can trust, aiming to significantly reduce the number of dubious-origin dependencies of every JS project (on node and the browser)

Yeah, remember the left-pad incident? It took until ECMAScript 2017 to make such a simple function part of the standard library. Things are slowly getting better, but JS is still rather lacking compared to "batteries included" languages like PHP and Python.
Post reply on HN