Live data from Hacker News

Always Review Your Dependencies, AGPL Edition

agwa.name

41–50 of 236 posts

Re: Always Review Your Dependencies, AGPL Edition

#41
I try to convince my team that the node.js ecosystem has gotten into a stage where it cannot be used for security/financial applications because the sheer amount of dependencies pose an inherent threat. I advocate for Go because of the tendency to less and easier reviewable dependencies. Nobody except me seems to see a problem there, despite me being able to point out specific security incidents.

I am wondering if I am missing something obvious here and would value any opinion.

Re: Always Review Your Dependencies, AGPL Edition

#42
post #21

Earlier quoted context omitted.

With a bit of electronics background this feels like the difference between a hobbyist and a professional. Most programmers feel like hobbyists to me, in their YOLO-approach. Your software might ruin someones day, their life or maybe even end up killing people and more people should take that thing seriously. The way your collegue worked should be the norm.

I'd think the comparison goes the other way around :). Hobbyists care enough to do things right even if it's not in the short-term interest. Professionals, judging by all the advice I read on-line, are supposed to focus on delivering value - which is usually measured short-term, and not aligned with doing things right. It's that attitude that makes most companies care little to none about security. Bringing in tons o…

> I'd think the comparison goes the other way around :)

Only in the Software industry. This is however not normal:

* Mechanical Engineering: Hobbyist bridge vs. professional Bridge – which one should you be able to trust more to carry you?

* Electrical Engineering: Hobbyist wall wart vs. professional wall wart – which one should you be able to trust more not to burn your house down?

* Medical Treatment: Hobbyist vs. professional – which one do you trust more with your body?

The list goes on. Professional work isn't about cobbling together something that barely works at the edge of complexity you can just about manage. Professional work is building something reliable, robust that you can guarantuee for at least to a certain degree.

I know that this isn't how Software Development works right now in most places – that was the whole point of my comment. However it is not normal. It is a bit like with early cars: back then a hobbyist could have easily made a safer car than any professional manufacturer with the right amount of commitment, because there were no real safety standards. Try doing that nowadays.

Edit: Good related talk by the legend himself (Ross Anderson): https://media.ccc.de/v/36c3-10924-the_sustainability_of_safe...

Re: Always Review Your Dependencies, AGPL Edition

#43
post #12

Earlier quoted context omitted.

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.)

Aside, can anyone explain this to me? >Please do not use "public domain", it's not a license and it makes it impossible to use such code in corporate context. // Seems pretty ridiculous, "can't use code unless it's encumbered by licensing restrictions"??

"Public Domain" is encumbered by Moral Rights https://en.wikipedia.org/wiki/Moral_rights . While they play a very minor role in the US, they exist in Canada and most of the EU. Something like the MIT-license neatly gets rid of them.

Re: Always Review Your Dependencies, AGPL Edition

#44
post #38

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)

Google has already developed a good featureful JS library. It's called the Closure library. It can be used independently or together with the Closure compiler. It's also more than a decade old, ensuring widespread compatibility, though not necessarily using modern idioms. Some communities like the ClojureScript uses it extensively and a front end project in ClojureScript require very few dependencies.

I have around a decade doing JavaScript and never heard of it before, any guesses why it might not be widely known/used?

Edit Answering to Jyaif: Anecdote is not data, here is it comparing the popularity of Closure library against Angular -another Google technology-: https://trends.google.com/trends/explore?date=today%205-y&ge...

Re: Always Review Your Dependencies, AGPL Edition

#45
post #40

When this webpage loads, it briefly flashes in plaintext before loading CSS - at least in Chrome. This is unusual since it has the CSS stylesheet in the head which I thought would block until it's fully loaded. Does anyone know what's going on with that?

This is what happens when you dynamically insert your CSS tag in the head after the DOM loads.

If you view the raw data coming from the web server, the link tag containing the stylesheet is already present in the head. Although what you're saying sounds like it can absolutely cause this type of behaviour, I'm not sure if that's what's happening in this case.

Re: Always Review Your Dependencies, AGPL Edition

#46

> 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.

Nearly spat out my cereal, thanks. Funny because accurate. As a relatively new node dev, this is what keeps me awake at night.

And his comment is copy-paste from Reddit: https://old.reddit.com/r/programming/comments/ekjacu/this_is...

Slightly ridiculous that we're getting to this point :-)

Re: Always Review Your Dependencies, AGPL Edition

#47

Earlier quoted context omitted.

Aside, can anyone explain this to me? >Please do not use "public domain", it's not a license and it makes it impossible to use such code in corporate context. // Seems pretty ridiculous, "can't use code unless it's encumbered by licensing restrictions"??

CC0 is a licence. "Public domain" is a state. Some works have no copyright, typically because they're the product of a US Federal institution, or the copyright has expired. In American English this copyright-free state is also known as "public domain". (In British English it can mean something quite different.) To put something in the "public domain", you need to make a statement of such. In other words, a licence. Y…

>Alternatively, you can use WTFPL, which is a really great way of putting your works in the public domain while guaranteeing that bigcorps won't use them

I thought the point of WTFPL was that you didn't care who used your code for what.

Re: Always Review Your Dependencies, AGPL Edition

#48

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)

> the one thing JS needs is a standard library by Microsoft

You must be new to this whole Microsoft vs Netscape thing :-)

What Microsoft should do is get Google & co. onboard with creating a full-featured standard library. Microsoft going at it alone would create a huuuuuge backlash because of ye olden days.

Re: Always Review Your Dependencies, AGPL Edition

#49

> 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.

A reason why I appreciate Angular: then I know (or so I think?) someone else is vetting the base dependencies.

Re: Always Review Your Dependencies, AGPL Edition

#50
post #48

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)

> the one thing JS needs is a standard library by Microsoft You must be new to this whole Microsoft vs Netscape thing :-) What Microsoft should do is get Google & co. onboard with creating a full-featured standard library. Microsoft going at it alone would create a huuuuuge backlash because of ye olden days.

Fair enough, yeah it might be better as a collaboration, and if they could include Mozilla and Twitter in the mix that would be even better.
Post reply on HN