News for hackers. Stuff that matters.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by Zizizizz on Tuesday February 24, 2026 @01:53AM (#47133711)
https://github.com/getsops/sops

This software has done this for years

Re:Show HN: enveil – hide your .env secrets from prAIng eyes by _pdp_ on Tuesday February 24, 2026 @05:41AM (#47135421)
Came to say this.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by chrismatic on Tuesday February 24, 2026 @07:20AM (#47136195)
We just recently adopted this and it's crazy to me how I spent years just copying around gitignored .env files and sharing 1password links. Highly underrated tool.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by SOLAR_FIELDS on Tuesday February 24, 2026 @11:51PM (#47147471)
For a long time up until about a couple of years ago the project was stagnated and was missing some pretty critical features. I'd say it was only halfway usable until then and it doesn't have near the ecosystem that things like Hashicorp Vault does. But for my self hosted infra stuff it is perfect. It just really doesn't gel well with compliance frameworks and audits, mainly because the auditability of the solution goes out the window the second someone is able to decrypt the secret - its access patterns are untraceable. These auditors really prefer to see a situation where access to the secret is tightly controlled and audited on rotation and sops, by nature of how it works, cannot really easily offer that.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by berkes on Tuesday February 24, 2026 @08:17AM (#47136754)
Has done "wat" for years?

I use sops for encrypting yaml files. But how does it replace .env or other ENV var setters/holders?

Re:Show HN: enveil – hide your .env secrets from prAIng eyes by chrismatic on Tuesday February 24, 2026 @08:48AM (#47137129)
Sops can natively handle .env files. All you need to apply them to your process is a small wrapper script that sources the decrypted file before invoking your command.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by berkes on Tuesday February 24, 2026 @08:56AM (#47137214)
FWIW, I looked into it myself too, and found e.g. this direnv setup:

https://github.com/direnv/direnv/wiki/Sops

Re:Show HN: enveil – hide your .env secrets from prAIng eyes by SOLAR_FIELDS on Tuesday February 24, 2026 @11:54PM (#47147491)
There's a lot of gotcha bundled into this statement. It is true what you say, but it also hides away the nightmare of shell escaping bullshit that comes with the .env format the second you have to have some sort of transformation on the data that is orthogonal to the normal decryption path. I think that now they have a better story around some of the edge cases but if you go into SOPS you will see several issues around how the .env file format is just a complete nightmare with crazy escaped values such as a Google Service Account JSON.

The way I got around this on my own stuff is just to have a policy that all sops secrets have to be base64 encoded before the encryption hits them. That seems to solve basically every piping issue you could hit. Works super well with kubernetes, who supports native base64 encoded secrets, so you just take the value and inject it in, using data: instead of stringData: in the manifest of the created secret.

Re:Show HN: enveil – hide your .env secrets from prAIng eyes by ctmnt on Tuesday February 24, 2026 @09:24AM (#47137533)
Yeah, if you want .env-ish behavior, use sops + age. Or dotenvx.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by pcpuser on Tuesday February 24, 2026 @09:46AM (#47137817)
Literally the first thing I though of.