I don&#x27;t like env vars for secrets:  They tend to be easier to leak out of your process, especially via execing child processes. At least with files you can open them CLOEXEC.<p>Files on disk have the problem of being persistent, though, and being subject to Unix permissions, instead of the process you&#x27;re explicitly giving the env variables to.<p>The solution I work on is to keep files in a non-persistent filesystem that audits access and ensures tight permissions (Keywhiz), though in many cases a tmpfs and auditd will do the same.