logoalt Hacker News

nathan_comptonyesterday at 4:26 PM9 repliesview on HN

I never, ever, do development outside of a podman container these days. Basically if I am going to run some code from somewhere and I haven't read it, it goes in a container.

I know its not foolproof, but I can't believe how often people run code they haven't read where it can make a huge mess, steal secrets, etc. I'll probably get owned someday, I'm sure, but this feels like a bare minimum.


Replies

jama211yesterday at 5:51 PM

Probably because it’s fine 99.99% of the time and humans aren’t intuitively good at handling risk that functions like that. Besides, security is something handed off to specialists to free the devs up to focus on building things in most companies. We’re not going to change that no matter how much it represents some ideal.

show 1 reply
netdevphoenixyesterday at 4:45 PM

> if I am going to run some code from somewhere and I haven't read it, it goes in a container

How does this work? Every single npm package has tons of dependency tree nodes

show 2 replies
eybergyesterday at 10:18 PM

The same podman that had three new CVE breakouts not even two weeks ago?

Containers do not contain.

fennec-posixyesterday at 9:24 PM

Using Podman over Docker is probably an even safer bet in that regard. But QEMU or something for an extra layer of safety and paranoia is probably the next best thing.

rco8786yesterday at 4:36 PM

How are you doing this in practice? These are npm packages. I don't see how could reasonably pull in Posthog's SDK in a container.

show 1 reply
jwpapiyesterday at 6:21 PM

You could still leak API keys

myaccountonhnyesterday at 4:45 PM

I ssh into a second local user and do development there instead with tmux.

show 1 reply
postexitusyesterday at 5:53 PM

Would it have prevented this attack? It would still have published the secrets from your container to github.

show 1 reply
echelonyesterday at 5:07 PM

Another effective strategy I learned of recently that seems like it would have avoided this is to wait months before using new versions of packages.

Most attacks on popular packages last at most a few months before detection.