Live data from Hacker News

Show HN: enveil – hide your .env secrets from prAIng eyes

github.com

51–60 of 152 posts

Re: Show HN: enveil – hide your .env secrets from prAIng eyes

#51
Ive made different solution for my Laravel projects, saving them to the db encrypted. So the only thing living in the .env is db settings. 1 unencrypted record in the settings table with the key.

Won't stop any seasoned hacker but it will stop the automated scripts (for now) to easily get the other keys.

Re: Show HN: enveil – hide your .env secrets from prAIng eyes

#52
Another thing to look at is the built-in sandboxing and permissions for your agent. Claude Code for example has the /sandbox command which uses Bubblewrap on Linux or Seatbelt on macOS for OS level sandboxing. Combine that with global default deny permissions for read & edit on your SSH, GPG keys and other secrets. You need both otherwise Claude can run bash commands which bypass the permissions.

Re: Show HN: enveil – hide your .env secrets from prAIng eyes

#53
Does this actually work?

I assume an AI which wanted to read a secret and found it wasn't in .env would simply put print(os.environ) in the code and run it...

That's certainly what I do as a developer when trying to debug something that has complex deployment and launch scripts...

Re: Show HN: enveil – hide your .env secrets from prAIng eyes

#54
post #35

Earlier quoted context omitted.

What is your recommended alternative to .env files?

In the context of traditional SaaS, using dynamic secrets loaded at runtime (KMS+Dynamo, etc.). For agentic tools and pure agents, a proxy is the safest approach. The agent can even think it has a real API key, but said key is worthless outside of the proxy setting.

These are from AWS right, what about simple, no cloud setups with just docker compose or even bare proccesses on a VPS?

Re: Show HN: enveil – hide your .env secrets from prAIng eyes

#56
This works by obfuscating the keys in memory with a root-access risk model. It will work but as I've been told when I tried the same thing for another purpose, this is security by annoyance. It sounds harsh but the same gatekeepers mentioned that this was only a psychological trick.

I dislike the gatekeepers so I will follow this implementation and see where it goes. Maybe they like you better.

Re: Show HN: enveil – hide your .env secrets from prAIng eyes

#60

Does this actually work? I assume an AI which wanted to read a secret and found it wasn't in .env would simply put print(os.environ) in the code and run it... That's certainly what I do as a developer when trying to debug something that has complex deployment and launch scripts...

Good point. You would need to inject the secrets in an inaccessible part of the pipeline, like an external proxy.
Post reply on HN