logoalt Hacker News

tptacek • yesterday at 11:27 PM • 1 reply • view on HN

Environment variables are generally fine for secrets. Environment files are problematic. Modern systems that inject secrets into the environment launch the program itself.


Replies

IanCal • yesterday at 11:50 PM

(pre-caveat thing to not be massively annoyingly pedantic throughout, I'm not a security buff and I know who it is I'm talking to, I'm not trying to correct them)

I'm not sure I get the difference - the issue I would have thought was having the system code have access to the secrets themselves? Env file vs env vars injected at runtime seems the same there - either can be exfiltrated. The difference would be having it injected when used.

Is the problem with files about what happens outside that, being committed, etc?

➕ show 1 reply