What security concerns are specific to agents with tool use?
hardAnswer
- (1) Prompt injection via tool output: a webpage / DB row instructs the agent 'ignore prior instructions'.
- Defense: sandboxed tool execution, sanitize output, dual-LLM pattern.
- (2) Excessive privilege: agent can modify prod DB → require confirmation for destructive ops.
- (3) Cost / DoS: agent loops burning tokens or hitting expensive APIs.
- Cap steps + spend.
- (4) Data exfiltration: agent posts internal data to a public API.
- Deny-list dangerous tools, log all outputs.
- (5) Model as confused deputy: acts on attacker's behalf via a legit-looking prompt.
Check yourself — multiple choice
- None
- Prompt injection via tool output + excessive privilege + cost/DoS + data exfil + confused deputy — each mitigated with sandboxing, caps, confirmations, deny-lists
- Only rate limiting
- Same as chat
Agent security: injection / privilege / cost / exfil / confused-deputy — sandbox + caps + confirm + deny-list.
#agents#safety#guardrails
Practise LLMs & GenAI
214 interview questions in this topic.