Security and Safety

8% of the CCDV-F exam. Read each answer, then drill this domain.

Drill this domainAll study notes

How do you defend an agent that processes untrusted content?

Assume content can carry instructions. Keep it as data in tagged blocks, screen user input and tool outputs with a lightweight model, and return a stripped summary or an error when injection is suspected. Limit and gate actions that could leak data or cause damage. Red-team with planted injections before launch, and monitor outputs afterwards.

Source: Mitigate jailbreaks and prompt injections

How do you make destructive actions impossible rather than unlikely?

Enforce in layers outside the model: least-privilege credentials, deny rules (managed settings org-wide), PreToolUse hooks that fail closed, sandboxed execution and network egress limited by a proxy. In CI on untrusted code, run `claude -p --bare` so the checkout's hooks and MCP servers don't load.

Source: Securely deploying AI agents

How should API keys and credentials be handled?

Never ship keys in browser or mobile code: call the API from your back end. Use workspace-scoped developer keys per environment, and keep Admin keys for organisation management only. Inject credentials into agents through a proxy outside their boundary. Rotate leaked keys at once and monitor usage. MCP servers must validate that tokens were issued to them, with no token passthrough.

Source: Workspaces

Drill this domain