by ldng · 3y ago · 0 comments
Yes, cloud provider are supposed to properly erase hard drive before reassigning. Can you be 100% sure they do though ?
With environment variable in RAM the problem is moot. Committing and/or generating .env in production system is completely missing the point.
Your argument does not validate the use of easily recoverable .env file. Recovering a .env file is easier than recovering virtual memory.
I sometimes find secrets to be safer inside config files since so many times the environment variables get dumped into logs – hence all the popular CI/CD products have features to try to scrub such secrets from their logs.
I agree about not using .env files in production, I'd not use it at all.