frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://github.com/GreatScott/enveil
28•parkaboy•2h ago

Comments

umairnadeem123•2h ago
this solves a real problem. i run coding agents that have access to my workspace and the .env files are always the scariest part. even with .gitignore, the agent can still read them and potentially include secrets in context that gets sent to an API.

the approach of encrypting at rest and only decrypting into environment variables at runtime means the agent never sees the raw secrets even if it reads every file in the project. much better than the current best practice of just hoping your .gitignore is correct and your AI tool respects it.

one suggestion: it would be useful to have a "dry run" mode that shows which env vars would be set without actually setting them. helps verify the config is correct before you realize three services are broken because a typo in the key name.

anshumankmr•1h ago
What about something like Hashicorp secrets? We have a the hashicorp secrets in launch.json and load the values when the process is initialized (yeah it is still not great)
hjkl_hacker•1h ago
This doesn’t really fix that it can echo the secrets and read the logs. `enveil run — printenv`
Datagenerator•1h ago
Not the author but No, the decryption would ask the secret again? The readme mentions it's wiped from memory after use.
Datagenerator•1h ago
Looks good. Almost stopped reading due the npm example, grasped it was just a use case, kept reading.

Kernel keyring support would be the next step?

PASS=$(keyctl print $(keyctl search @s user enveil_key))

hardsnow•1h ago
Alternative, and more robust approach is to give the agent surrogate credentials and replace them on the way out in a proxy. If proxy runs in an environment to which agent has no access to, the real secrets are not available to it directly; it can only make requests to scoped hosts with those.

I’ve built this in Airut and so far seems to handle all the common cases (GitHub, Anthropic / Google API keys, and even AWS, which requires slightly more work due to the request signing approach). Described in more detail here: https://github.com/airutorg/airut/blob/main/doc/network-sand...

NitpickLawyer•16m ago
How does this work with SSL? Do you need to provision certs on the agent VM?
hardsnow•11m ago
Yep - requires the client to trust the SSL cert of the proxy. Cooperative clients that support eg HTTP_PROXY may be easier to support, but for Airut I went for full transparent mitmproxy. All DNS A requests resolve to the proxy IP and proxy cert is injected to the container where Claude Code runs as trusted CA. As a bonus this closes DNS as potential exfiltration channel.
SteveVeilStream•1h ago
Sometimes I need to give Claude Code access to a secret to do something. (e.g. Use the OpenAI API to generate an image to use in the application.) Obviously I rotate those often. But what is interesting is what happens if I forget to provide it the secret. It will just grep the logs and try to find a working secret from other projects/past sessions (at least in --dangerously-skip-permissions mode.)
WalterGR•38m ago
What software do you use that logs credentials?
SteveVeilStream•15m ago
Claude Code does it. Check out the JSONL files.
l332mn•57m ago
I use bubblewrap to sandbox the agent to my projects folder, where the ai gets free read/write reign. Non-synthetic env cars are symlinked into my projects folder from outside that folder.
pedropaulovc•49m ago
1Password has this feature in beta. [1]

[1]: https://developer.1password.com/docs/environments/

Zizizizz•46m ago
https://github.com/getsops/sops

This software has done this for years

Zizizizz•44m ago
https://github.com/jdx/fnox

A recent project by the creator of mise is related too

NamlchakKhandro•33m ago
this won't solve the problem.

Instead you need to do what hardsnow is doing: https://news.ycombinator.com/item?id=47133573

Or what the https://github.com/earendil-works/gondolin is doing

nvader•13m ago
In the vein of related work, there is https://github.com/imbue-ai/latchkey which injects secrets into cURL commands issued by your agent.
stephenr•11m ago
> can read files in your project directory, which means a plaintext .env file is an accidental secret dump waiting to happen

It's almost like having a plaintext file full of production secrets on your workstation is a bad fucking idea.

So this is apparently the natural evolution of having spicy autocomplete become such a common crutch for some developers: existing bad decisions they were ignoring cause even bigger problems than they would normally, and thus they invent even more ridiculous solutions to said problems.

But this isn't all just snark and sarcasm. I have a serious question.

Why, WHY for the love of fucking milk and cookies are you storing production secrets in a text file on your workstation?

I don't really understand the obsession with a .ENV file like that (there are significantly better ways to inject environment variables) but that isn't the point here.

Why do you have live secrets for production systems on your workstation? You do understand the purpose of having staging environments right? If the secrets are to non-production systems and can still cause actual damage, then they aren't non-production after all are they?

Seriously. I could paste the entirety of our local dev environment variables into this comment and have zero concerns, because they're inherently to non-production systems:

- payment gateway sandboxes;

- SES sending profiles configured to only send mail to specific addresses;

- DB/Redis credentials which are IP restricted;

For production systems? Absolutely protect the secrets. We use GPG'd files that are ingested during environment setup, but use what works for you.

yanosh_kunsh•7m ago
I think it would be best if AI agents would honor either .gitignore or .aiexclude (https://developers.google.com/gemini-code-assist/docs/create...).
frgturpwd•7m ago
I prefer waiting till it gets me in trouble. So far, it having access to all my .env secrets seems to work out okay.
m-hodges•5m ago
This looks interesting. For agent-fecfile I used the system keyring to try to maximize portability.¹

¹ https://github.com/hodgesmr/agent-fecfile?tab=readme-ov-file...

Firefox 148 Launches with AI Kill Switch Feature and More Enhancements

https://serverhost.com/blog/firefox-148-launches-with-exciting-ai-kill-switch-feature-and-more-en...
112•shaunpud•1h ago•61 comments

Terence Tao, at 8 years old (1984) [pdf]

https://gwern.net/doc/iq/high/smpy/1984-clements.pdf
196•gurjeet•16h ago•62 comments

Blood test boosts Alzheimer's diagnosis accuracy to 94.5%, clinical study shows

https://medicalxpress.com/news/2026-02-blood-boosts-alzheimer-diagnosis-accuracy.html
193•wglb•4h ago•66 comments

I Ported Coreboot to the ThinkPad X270

https://dork.dev/posts/2026-02-20-ported-coreboot/
150•todsacerdoti•7h ago•25 comments

Show HN: X86CSS – An x86 CPU emulator written in CSS

https://lyra.horse/x86css/
91•rebane2001•5h ago•24 comments

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

https://github.com/GreatScott/enveil
28•parkaboy•2h ago•22 comments

The Age Verification Trap: Verifying age undermines everyone's data protection

https://spectrum.ieee.org/age-verification
1392•oldnetguy•17h ago•1058 comments

Baby chicks pass the bouba-kiki test, challenging a theory of language evolution

https://www.scientificamerican.com/article/baby-chicks-pass-the-bouba-kiki-test-challenging-a-the...
47•beardyw•4d ago•13 comments

Show HN: Steerling-8B, a language model that can explain any token it generates

https://www.guidelabs.ai/post/steerling-8b-base-model-release/
118•adebayoj•7h ago•15 comments

Making Wolfram Tech Available as a Foundation Tool for LLM Systems

https://writings.stephenwolfram.com/2026/02/making-wolfram-tech-available-as-a-foundation-tool-fo...
138•surprisetalk•9h ago•70 comments

UNIX99, a UNIX-like OS for the TI-99/4A (2025)

https://forums.atariage.com/topic/380883-unix99-a-unix-like-os-for-the-ti-994a/
169•marcodiego•11h ago•53 comments

“Car Wash” test with 53 models

https://opper.ai/blog/car-wash-test
188•felix089•11h ago•204 comments

Intel XeSS 3: expanded support for Core Ultra/Core Ultra 2 and Arc A, B series

https://www.intel.com/content/www/us/en/download/785597/intel-arc-graphics-windows.html
16•nateb2022•3h ago•3 comments

Unsung heroes: Flickr's URLs scheme

https://unsung.aresluna.org/unsung-heroes-flickrs-urls-scheme/
24•onli•2d ago•4 comments

A simple web we own

https://rsdoiel.github.io/blog/2026/02/21/a_simple_web_we_own.html
215•speckx•15h ago•148 comments

Show HN: PgDog – Scale Postgres without changing the app

https://github.com/pgdogdev/pgdog
243•levkk•16h ago•51 comments

Shatner is making an album with 35 metal icons

https://www.guitarworld.com/artists/guitarists/william-shatner-announces-all-star-metal-album
164•mhb•7h ago•70 comments

Ladybird adopts Rust, with help from AI

https://ladybird.org/posts/adopting-rust/
1145•adius•20h ago•630 comments

FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

https://vladimir.varank.in/notes/2026/02/freebsd-brcmfmac/
340•varankinv•9h ago•276 comments

Typed Assembly Language

https://www.cs.cornell.edu/talc/
25•luu•3d ago•13 comments

What it means that Ubuntu is using Rust

https://smallcultfollowing.com/babysteps/blog/2026/02/23/ubuntu-rustnation/
127•zdw•14h ago•143 comments

Genetic underpinnings of chills from art and music

https://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1012002
9•coloneltcb•1d ago•2 comments

Show HN: Babyshark – Wireshark made easy (terminal UI for PCAPs)

https://github.com/vignesh07/babyshark
98•eigen-vector•10h ago•39 comments

Writing code is cheap now

https://simonwillison.net/guides/agentic-engineering-patterns/code-is-cheap/
137•swolpers•14h ago•187 comments

Iowa farmers are leading the fight for repair

https://www.ifixit.com/News/115722/iowa-farmers-are-leading-the-fight-for-repair
100•gnabgib•6h ago•23 comments

SIM (YC X25) Is Hiring the Best Engineers in San Francisco

https://www.ycombinator.com/companies/sim/jobs/Rj8TVRM-software-engineer-platform
1•waleedlatif1•10h ago

The Weird OS Built Around a Database [video]

https://www.youtube.com/watch?v=pWZBQMRmW7k
15•surprisetalk•3h ago•3 comments

The challenges of porting Shufflepuck Cafe to the 8 bits Apple II

https://www.colino.net/wordpress/archives/2026/02/23/the-challenges-of-porting-shufflepuck-cafe-t...
70•homarp•10h ago•12 comments

Show HN: Sowbot – Open-hardware agricultural robot (ROS2, RTK GPS)

https://sowbot.co.uk/
149•Sabrees•15h ago•41 comments

Lords of the Ring

https://harpers.org/archive/2026/03/lords-of-the-ring-joshua-hunt-cultural-politics-sumo-wrestling/
30•lermontov•3d ago•2 comments