82. A product lets users run code suggested by an assistant. Why is a timeout alone an insufficient execution boundary?
HardTesting & engineering practice
Technical
Show model answer
A timeout limits duration but does not prevent code from reading credentials, reaching internal services, consuming memory or modifying files before time expires. Treat generated code with the same distrust as other untrusted programs.
Use an execution environment with restricted identity, data, filesystem and network access, plus resource and output limits. Define cleanup and cancellation behavior, and verify restrictions with negative tests instead of relying on the assistant to behave.
What interviewers listen for
- Restrict capabilities before execution
- Bound memory, time and output
- Verify containment with negative tests