News for hackers. Stuff that matters.
Re:Ask HN: How do you security-audit external software using... by krageon on Thursday November 04, 2021 @06:33AM (#29105386)
If any software pulls in more than a few independent npm packages, I call it a huge risk and sandbox it as if it's a ticking time bomb. After some deliberation I've come to the conclusion this is a reasonable approach with all software. It's for me a nice approach to deny every capability unless it is critical for the functioning (that you want) of the software. If that's "full network access and subprocess spawn capability", then you should probably not be using it anyway.
Re:Ask HN: How do you security-audit external software using... by ashward on Thursday November 04, 2021 @09:55AM (#29107208)
Yeah. I was thinking about some of this stuff a couple of years ago and came up with a proof of concept of what I called 'package sandboxing'. Basically the idea is that if you use a dependency that is only supposed to left pad strings, why would you let if have access to privileged functions like spawning processes, or using the filesystem or network. So I wrote https://github.com/ashward/byrnesjs which allow-lists privileged functions to only trusted code. If untrusted code is in the stack then those function calls will be blocked. The project is pretty out of date, and really only a proof-of-concept, but if anyone's interested in helping out I'd be happy to bring it back to life!
Re:Ask HN: How do you security-audit external software using... by jbverschoor on Thursday November 04, 2021 @06:53AM (#29105513)
What's your strategy/stack of sandboxing, and on what os?