Live data from Hacker News

Ask HN: Does anyone investigate open source packages before using in prod?

news.ycombinator.com

1–10 of 40 posts

Re: Ask HN: Does anyone investigate open source packages before using in prod?

#6
I normally read a good chunk, if not all of the code of a dependency before I add it to my projects except in the case of community standard things (in Ruby) such as ActiveSupport or Sequel. Going over a prospective dependency a few months ago bore fruit in proving why you should always do this. NewsAPI is a neat little API for fetching news whose docs just so happen to show a ruby gem. Being the lazy developer I am I’d like to use the gem than build another API client, but before I did that I read the source as one should. Low and behold what do I find but the evil eval in the code for a dirt simple API client. No thanks.

https://github.com/olegmikhnovich/News-API-ruby/blob/master/...

Re: Ask HN: Does anyone investigate open source packages before using in prod?

#7
post #4

Yes, in depth. Not just the packages but their dependencies as well.

Really? What about all the dependencies from those dependencies?...

For example, our company is working on an app that has 82 npm dependencies and over 17,000 resolved npm packages...

It's absolutely ridiculous to investigate all of them... but it's also necessary if you want to be sure...

Re: Ask HN: Does anyone investigate open source packages before using in prod?

#8
Yes.

If you work in a secure environment or support critical infrastructure there are teams whose sole purpose is to approve/deny releasing software regardless of who wrote it. Such teams will typically require source code, written justification, senior management signed approval, and test validation. In the case where source code is not provided, such as closed source commercial software, the vendor will be required to accept liability for all losses due to their software as ratified by a signed contract.

Re: Ask HN: Does anyone investigate open source packages before using in prod?

#10
I am paranoid about security of all those packages, so yes, even before just downloading, I check the authors, activity and read the source code. Not always – e.g. I skip the source code if it's something big AND very reputable AND I decided that I need it such as scala/scala or facebook/react – but I do my best.

It's very annoying, it's not free, and it affects what kinds of libraries I use. My projects have fewer and smaller dependencies than typical because of these self imposed constraints.

On the upside, borrowing a pattern or a dozen lines of code instead of pulling a dependency that will remain 90% unused is really underrated. As is understanding how things work under the hood.

Post reply on HN