Hacker News new | ask | show | jobs
by iLoveOncall 29 days ago
> Our next project is to eliminate all 3rd party dependencies, and after that to rebuild our frontends completely using zero frameworks, not touching npm ever again after that.

What's the proportion of bugs you've encountered that was due to a library versus due to your own code? I suspect it's probably more than 1:1000.

This is a stupid decision.

2 comments

I’m not going to eliminate every single third party dependency in my system, but I’m on my way to eliminating 90%, maybe more.

For me it’s less about bugs and more about supply chain security risk. And with AI and only building what I need from a dep, exactly how I need it, the cost of doing this is very low.

I worry that the move towards eliminating library usage will lead to further code fragmentation.

It's a nice idea, and in theory sounds great, but you may be trading 1 library with 1000 bugs for 1 million implementations each with one special bug...

That sounds pretty good to me. Who is that scenario bad for, other than the people trying to exploit the 1000 bugs?
The 1 million exploitable bugs?
If each of the 1 million bugs can only be used to exploit 1 system, the transition is from "1000 exploitable bugs per system" to "1 exploitable bug per system".

You might say that's a big "if", but you did say "1 special bug"...

The cost of finding an exploit has gone way down, but if you can only amortize that cost over a single use, then the ROI probably won't be there for a lot of them.
I'm curious how you figure that.

We can't prove 100% security, but we can assume some percentage of flaws. With better security tools, you find more issues, and drive that number closer to zero. That number has gone down, but security scanners etc. have existed for a while now, and this only proof that they weren't finding everything.

Whether there remains anything to find, is I suppose an open question, but zero-days are usually private secrets (either as a white hat wanting to avoid giving out freebies, or on the other side because you intend to sell/exploit the issue) - if there are further exploits remaining, we still don't know about them, as they are likely to remain secret (and possibly more valuable?).

Supply has dropped, but I doubt the demand has evaporated, so the public vulnerabilities are probably worth more... as for the private ones, they should be easier to find, partly because there's less guarantee that the code in question is being adequately protected, partly because now finding them has become easier... supply has remained steady, but demand has increased (because there are fewer public ones), again likely increasing the value. If libraries are disfavored because its easier to find vulns, then supply of private vulns likely also increases, which then becomes a question of ratio...

I understand the issue with amortization perhaps no longer favoring the shadier side of the hat, but at least in a free market (of which, it be very amusing to see a socialist version - free vulnerabilities for everyone!), I would just assumed this would be offset by higher retainer fees (thinking in terms of e.g. well funded state-level actors).

False dichotomy. A library that is not a 100% perfect match for a problem you have to solve, will require glue code. Any bug in the glue code is in your own code but only exists because of the library.