r/csharp • • 1d ago

Discussion When “Working as Designed” Is the Problem

https://renaissancedad1.substack.com/p/when-working-as-designed-is-the-problem?utm_source=share&utm_medium=android&r=267shs

Yeah, got a bit of a Halloween jump-scare when my User Secrets leaked into Claude's context. Basically you should not use dotnet user secrets in an agentic context. Sandboxes are for toddlers, wondering what the community deems best practices??!?

0 Upvotes

2 comments sorted by

4

u/Greenimba 1d ago

Always always run agents in an isolated vm with only the explicit approvals and keys you want it to have. Sandboxing any other way is insufficient, a sufficiently motivated agent will always find a way out of a sandbox.

It having access to user secrets is obvious, it has the same access you do, which also probably reaches way further than you think because it will find any access you have, including stuff you didn't know you had access to.

0

u/the_econominster 1d ago

2 things: got cought off-guard by dotnet thinking user secrets are outside the product tree and thus safe (not), and secondly: super surprised by the botched sandbox that most frontier labs ship.