logoalt Hacker News

HHad3today at 5:13 PM2 repliesview on HN

Unfortunately, with secrets in the OS env, you‘re one `printenv` or improperly written third party dependency that leaks env vars away from a security incident.

The env and more importantly what populates it should be secure, but security works best in layers. Sanitizing the env after loading it is a nicer middleground, k8s-style secrets materialized to files work best and are conceptually close enough to the OS env.


Replies

tptacektoday at 6:43 PM

It's not my intuition that materializing secrets to files is a better way to protect them than just injecting them into the environment, where they don't persist.

show 4 replies
nailertoday at 7:40 PM

> you‘re one `printenv` or improperly written third party dependency that leaks env vars away from a security incident.

Game over already if anyone can run commands or arbitrary code. Not using the environment won't help you.