Lesson 2 of 5 · 3 min read
Credentials Outside the Sandbox
Agent sandboxes often need to reach authenticated services (a Git host, a package registry, an internal API), but any credential placed inside can be read by the code running there and exfiltrated. The standard answer is a credential broker at the sandbox boundary: the sandbox sends unauthenticated requests through it, the broker checks each request against a narrow policy (which host, which methods, which paths or repositories), attaches a short-lived, least-privilege credential, and logs the call. Network egress is forced through the broker, so there is no other way out.
free sign-in, no card required
Practise it as an interviewer asks it
What is a sandbox for an agent, and why does code the model wrote need one when your own code does not?Containers, gVisor, Firecracker or Wasm for untrusted generated Python: choose.Your forty-turn agent is slow and expensive. Where do the seconds and dollars go?A code sandbox needs GitHub access and the generated code must never see the token. Design it.An agent acts for Alice but must not inherit everything Alice can do. Design the delegation.Design a background coding agent for ten thousand engineers.