Skip to content
Claude Certified Developer – Foundations (CCDV-F) Exam Prep

Lesson 21 of 25 · 6 min

x
21/25

Guardrails and Safe Deployment

Video lesson: CCDV-F 21/25: Guardrails and Safe Deployment (Domain 7, 2.3%)

Official scope (Exam Guide v1.0): content policy, guardrail layering, secure-by-design (privacy, identity and access management, least privilege).

Prompts advise, code enforces

A rule in a prompt or CLAUDE.md shapes behaviour but is not a gate. Enforcement lives in permissions, hooks, sandboxes and server-side checks.

Four placements (design guidance)

Before the model (input screening) → around tools (permission rules, hooks, approvals) → after the model (output validation) → in the environment (sandbox, network and file limits). Log at every hand-off.

Claude Code enforcement

  • Permission rules: deny, then ask, then allow; a deny at any settings scope wins; an allow cannot carve an exception out of a deny.
  • Hooks: a PreToolUse hook can deny or ask (exit code 2 or a JSON decision). A hook that stays silent approves nothing. Admins can restrict to managed hooks only.
  • Permission modes: dontAsk denies anything that would prompt (locked-down CI); bypassPermissions only in isolated containers or VMs; auto uses a classifier and reduces prompts but is not a guarantee.
  • Managed settings put technical policy (deny rules, sandbox on, allowed marketplaces) above every other scope; behavioural guidance goes in a managed CLAUDE.md.

Content policy (design guidance, verified refusal handling)

Follow the provider's usage policy; handle stop_reason: refusal explicitly (a 200, not an error); screen content against your own policy too.

Secure by design (design guidance)

Privacy by default; identity and access management for every actor (users, services, agents); least privilege everywhere; sandbox code execution.

Safe rollout (design guidance)

Start read-only; add write access gradually; human approval for destructive or irreversible actions; small group first; monitor; keep a kill switch; review logs and refine.

Exam traps

  • CLAUDE.md "never push to main" as the control.
  • A hook as the only security layer.
  • bypassPermissions on a developer laptop or shared host.
  • Treating a refusal as an HTTP error.

References

  1. Permissions — checked Oct 16, 2026
  2. Permission modes — checked Oct 16, 2026
  3. Hooks — checked Oct 16, 2026
  4. Settings — checked Oct 16, 2026
  5. Mitigate jailbreaks and prompt injections — checked Oct 16, 2026
  6. Handling stop reasons — checked Oct 16, 2026

Check your understanding

  • User allows Bash(aws s3 ls), project denies `Bash(awsShow answer

    Answer

    )`. Result? *Denied.
  • Why layer controls?Show answer

    Answer

    Any single control can fail or be bypassed.
  • CI job must never stop to ask. Mode?Show answer

    Answer

    dontAsk with pre-approved tools.
  • An agent will delete records. Safeguards?Show answer

    Answer

    Approval, least privilege, staged rollout, audit logging.
Previous

Progress is saved in this browser.

Next Lesson