AI Securityintermediate11 min · 8 steps
Tool Sandboxing
Run generated code, shell commands, browsing and file processing in disposable environments with no secrets, no open network and hard resource limits.
dataheavy workrequesterrorresponsesignaltool call
ProblemStep 1 of 8
Generated code ran next to your secrets
An employee uploads a CSV of 50,000 tickets and asks for trends. The agent writes pandas code, and the prototype runs it inside the API process, which has the database URL and the model API key in its environment variables.
One crafted cell in the CSV steers the generated code into printing the environment. The secrets come back in the answer.
Watch outCode written by a model, possibly steered by an attacker's data, has exactly the privileges of the process that runs it.
What changed
- +Code runs in the API process
- +Env vars leak into the answer
Lesson 12 of 22 in AI Security