Domain 7 · 8% of the exam
Security and Safety
Assessing the prompt-injection and jailbreak exposure of an agent that reads untrusted content and layering mitigations; enforcing guardrails, least privilege and hooks so destructive actions cannot run; and handling API keys correctly: server-side proxying, workspace-scoped keys, environment separation, rotation and monitoring.
- 7.1Defending Against Prompt InjectionMap where untrusted content reaches an agent and what that agent can do, then layer mitigations (delimited input, separation of reading from acting, limited tools, approvals and limits on risky actions, sandboxing, output checks and monitoring) that stop data leaks and unintended actions while keeping the agent useful.
- 7.2Deterministic Guardrails and Least PrivilegeMake destructive actions impossible rather than unlikely: give each agent the narrowest identity and tool set its task needs, enforce rules with permission rules, hooks and tool code, add OS-level sandboxing for paths rules do not cover, and run unrestricted modes only in isolated environments.
- 7.3Handling API Keys and CredentialsKeep every Anthropic API key inside its intended scope: call the API from a server-side proxy, never from clients; separate environments and projects into workspaces with their own keys and limits; reserve Admin API keys for administration; store keys in secret managers; rotate on a schedule and immediately after exposure; and monitor usage for misuse.