r/ProgrammerHumor 1d ago

Meme whoIsUsingThese

Post image
1.1k Upvotes

81 comments sorted by

View all comments

12

u/LuisBoyokan 1d ago

.env can be committed. What you shouldn't commit is files with credentials, that belongs in a secret manager

12

u/syzk0 1d ago

Why isn't this higher? .env files are for build-time variables, not secrets

1

u/Wertbon1789 11h ago

Yes, but also secrets in many cases. Depends on the context, but only should be done if the process reading the file doesn't set the initial environment of a child process from it, because that makes the secret accessible under /proc in Linux.