Threats, Vulnerabilities, and Attacks
An AI agent runs model-generated Python on a production server, and the business must keep that feature. A shared document hides instructions that make the agent run a shell command. Which control BEST limits the damage?
Show the answer
Correct answerD. Running generated code in a least-privilege sandbox
AWhy not this: Keyword filters are easily evaded and cannot reliably stop every injected instruction.
BWhy not this: Reviewing replies afterward is detective only; the command has already run on the server.
CWhy not this: Retraining reduces but does not eliminate compliance with injected instructions, so code can still run.
DWhy this is right: Isolation and minimal privileges contain any code that executes while preserving the required feature.
A sandbox with least privilege contains whatever code runs, even if injection succeeds, while keeping the feature. Phrase filters are easily bypassed and cannot guarantee that malicious code never runs.