News for hackers. Stuff that matters.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by iamflimflam1 on Tuesday February 24, 2026 @02:43AM (#47134077)
The problem is, you cannot force the agent to do anything.

A suitably motivated AI will work around any instructions or controls you put in place.

Re:Show HN: enveil – hide your .env secrets from prAIng eyes by handfuloflight on Tuesday February 24, 2026 @03:48AM (#47134580)
You can force what is not able to git upstream.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by jen729w on Tuesday February 24, 2026 @02:51AM (#47134141)
It doesn’t even need to be motivated: just forgetful.
Re:Show HN: enveil – hide your .env secrets from prAIng eyes by yanosh_kunsh on Tuesday February 24, 2026 @04:57AM (#47135088)
You are absolutely correct, but I don't need it to be 100% bulletproof.

I'm using opencode as a coding agent and I've added a custom plugin that implements an .aiexclude check (gist (https://gist.github.com/yanosh-k/09965770f37b3102c22bdf5c59a...)) before tool calls. No matter how good the checks are, on the 5th or 6th attempt a determined prompt can make the agent read a secret — but that only happens if reading secrets is the explicit goal. When I'm not specifically prompting it to extract secrets, the plugin reliably prevents the agent from reading them during normal coding work.

My threat model isn't a motivated attacker — it's accidental ingestion.

That's also why I think this should be a built-in feature of coding agents — though I understand the hesitation: if it can't guarantee 100% coverage, shipping it as a native safeguard risks giving users a false sense of security, which may be harder to manage than not having it at all.

Re:Show HN: enveil – hide your .env secrets from prAIng eyes by wdroz on Tuesday February 24, 2026 @05:23AM (#47135273)
We could simply make the "view file" tool not able to see .env. Same for other "grep-like" tools.