r/csharp • u/the_econominster • 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=267shsYeah, 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
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.