# CCDV-P Practice: Runtime guardrails and production security

> 10 free CCDV-P practice questions on runtime guardrails and production security (11% of the exam), with study notes and explanations.

Source: https://youraidept.com/network/ccdv-p-practice-questions/runtime-guardrails-and-production-security

## What to know about Runtime guardrails and production security

- Layered guardrails sized to the agent's risk: input and output filtering, PII redaction, hook-based policy enforcement, sandboxing that gives tool and web access without exposing production systems, approval gates, and refusal handling with a safe fallback.
- Deterministic enforcement for irreversible actions, and tuning guardrails for false positives and false negatives.
- The attack surface of a tool-using agent that reads untrusted content: prompt injection, tool and memory poisoning, and data exfiltration paths.
- The high-risk combination: access to private data, untrusted input, and a channel to the outside. Know why controls enforced outside the model are what closes it.
- Defense in depth, red-team exercise design and secure MCP configuration, drawing on the OWASP Top 10 for LLM Applications and the NIST AI Risk Management Framework with its Generative AI Profile.
- Identity, secrets and audit: agent identity, workload identity federation in place of static API keys, secrets management, least-privilege tool permissions, and audit logs of security-relevant agent actions.

## Runtime guardrails and production security questions

All domains (10) Runtime guardrails and production security (10)

Runtime guardrails and production security

A coding agent runs in CI with a shell tool. The project instructions file says never to run destructive commands against the production database, and last week the agent ran one anyway while chasing a failing migration. Which control actually prevents a repeat?

- A post-tool-use hook that inspects each command after it finishes and alerts the on-call engineer whenever one is destructive
- A second model call before each command that asks the agent to confirm the command is safe to run against production
- A firmer instruction in the project file, written in capitals and repeated at both the top and the bottom of the document
- A pre-tool-use hook and deny rules that block matching commands before they run, plus a sandbox with no route to production

Check answer

### Show answer

Answer: A pre-tool-use hook and deny rules that block matching commands before they run, plus a sandbox with no route to production. Instructions shape what the model tries to do but are not enforcement. A hook that runs before the tool call can block it deterministically, deny rules are applied by the harness rather than the model, and network isolation removes the target altogether. A post-tool-use hook fires after the damage is done, and a self-check is another model judgment that can fail the same way.

Runtime guardrails and production security

An assistant with persistent memory reads a web page during a research task. Hidden text on the page tells it to remember that all future reports should also be sent to an outside address. The assistant writes this to memory, and later sessions act on it. Which design change addresses the weakness?

- Instruct the assistant to save only statements that are true and relevant, and to ignore anything that looks suspicious
- Encrypt the memory store at rest and in transit, so that outside parties cannot read or alter what the assistant has saved
- Clear the memory store every night, so that any instruction planted during the day cannot influence the next day's sessions
- Treat memory written from untrusted content as untrusted, record its provenance, and keep action gates on the tools themselves

Check answer

### Show answer

Answer: Treat memory written from untrusted content as untrusted, record its provenance, and keep action gates on the tools themselves. Memory poisoning turns a one-time injection into a persistent one. The defenses are to control what untrusted content can cause to be written, to keep provenance so memory is read as data rather than instructions, and to enforce approvals and allowlists at the tool layer so no remembered text can authorize an action. Encryption protects the store from outsiders but the assistant itself wrote the entry, and nightly clearing removes the feature while leaving a full day of exposure.

Runtime guardrails and production security

CI pipelines and cluster services across a company call the Claude API with one long-lived API key copied into dozens of secret stores. The key has just appeared in a build log. Beyond revoking it, which change removes this class of incident?

- Issue a separate long-lived key to each team, and rotate all of them on a monthly schedule through the secrets manager
- Workload identity federation: each workload trades its platform identity token for a short-lived token tied to a service account
- Restrict the shared key to the company's network ranges, so that a leaked copy cannot be used from anywhere else
- Move the shared key into a single central secret store, and have every pipeline fetch it at the start of each job

Check answer

### Show answer

Answer: Workload identity federation: each workload trades its platform identity token for a short-lived token tied to a service account. Federation removes the static secret: a workload proves who it is with a token from an identity provider the organization already trusts and receives a short-lived credential scoped by a federation rule, so there is nothing long-lived to copy or leak. Per-team keys, rotation, and network restrictions reduce the blast radius of a leak but keep long-lived secrets in circulation.

Runtime guardrails and production security

A research agent needs to run code and browse documentation sites. It currently runs on a virtual machine next to production, with service credentials in its environment. Which setup grants the access it needs without exposing production?

- The same machine, with the service credentials swapped for read-only ones that cannot modify any production data
- The same machine, with the agent running as an unprivileged user and a blocklist of dangerous shell commands in place
- A separate machine inside the production network, with the agent's shell history shipped to the security team daily
- An isolated sandbox with scoped filesystem access, an egress allowlist through a proxy, and credentials kept outside it

Check answer

### Show answer

Answer: An isolated sandbox with scoped filesystem access, an egress allowlist through a proxy, and credentials kept outside it. Isolation should be enforced by the environment, not by the agent's judgment: a sandbox limits what code can touch, an egress allowlist limits where data can go, and keeping credentials outside the sandbox means injected content cannot read them. An unprivileged user and a command blocklist are easy to sidestep, and read-only credentials can still be used to read and exfiltrate data.

Runtime guardrails and production security

An output filter blocks any response containing a digit string that could be an account number. It blocks 9% of legitimate responses, mostly order numbers, while an audit finds that responses combining a name with a date of birth pass through. How should the team tune it?

- Measure precision and recall per category on a labeled set, choose an action per category, and track both error types
- Replace the filter with a system prompt instruction that tells the model never to include personal data in a response
- Tighten the filter to block any response that contains a name, a date, or a number, in order to stay firmly on the safe side
- Loosen the digit pattern step by step until complaints about blocked responses stop arriving from the support team

Check answer

### Show answer

Answer: Measure precision and recall per category on a labeled set, choose an action per category, and track both error types. A guardrail has two error rates, and tuning one by complaint volume ignores the other. A labeled set makes false positives and false negatives measurable per data category, and different categories deserve different actions: redaction for an identifier, blocking for a sensitive combination. A prompt instruction is not a control, and blocking everything that resembles data makes the product unusable while still missing what the pattern does not describe.

Runtime guardrails and production security

Before launching an agent that reads documents and web pages and can call internal tools, a team plans a red-team exercise consisting of twenty jailbreak prompts typed into the chat box. What would make the exercise meaningful?

- Repeat the twenty prompts against a more capable model, to see whether a stronger model resists them any better
- Use two hundred jailbreak prompts from public collections, so that the exercise covers more of the known attack phrasings
- Map each untrusted input channel against each sensitive tool, plant indirect injections there, and score harmful actions
- Measure how often the agent refuses clearly harmful questions, and require a refusal rate above a set threshold

Check answer

### Show answer

Answer: Map each untrusted input channel against each sensitive tool, plant indirect injections there, and score harmful actions. The attack surface of a tool-using agent is the content it reads, not only what a user types. A useful exercise starts from a threat model, places injections in documents, pages, and tool results, and judges success by whether an unsafe action or data flow occurred. Successful attacks then become regression tests. Direct jailbreak prompts and refusal rates measure chat safety and miss the indirect paths.

Runtime guardrails and production security

Every agent in a company acts on downstream systems through one shared service account that holds administrator rights. After an unauthorized configuration change, nobody can tell which agent, session, or user was behind it. What should change?

- Keep the shared account, and require each agent to write its name into the free-text comment field of every change
- Split the shared account into one for reads and one for writes, and review the write account's activity each week
- Keep the shared account, and store every agent's full prompts and responses so that changes can be traced by reading them
- Give each agent its own identity with only the permissions its task needs, and audit-log every sensitive call it makes

Check answer

### Show answer

Answer: Give each agent its own identity with only the permissions its task needs, and audit-log every sensitive call it makes. Attribution and least privilege both start with identity: an agent that authenticates as itself, with scoped permissions, can be audited and can do limited damage. Security-relevant calls should be logged with the initiating user, session, inputs, and result. A shared administrator account is the excessive agency risk named in the OWASP Top 10 for LLM Applications, and self-reported comments or stored prompts are not an audit trail.

Runtime guardrails and production security

A regulated service passes every model response through an output guardrail service. The guardrail times out on about 2% of calls, and in that case the application sends the unchecked response to the user. What should the behavior be?

- Retry the guardrail call without limit until it answers, holding the user's response for as long as that takes
- Fail closed for high-risk categories with a safe fallback response, and track guardrail availability as an SLI
- Remove the guardrail from the request path and run it asynchronously, flagging problem responses after delivery
- Reuse the verdict from the most similar earlier response whenever the guardrail call exceeds its time limit

Check answer

### Show answer

Answer: Fail closed for high-risk categories with a safe fallback response, and track guardrail availability as an SLI. A guardrail that fails open is absent exactly when it is under stress. Where a missed check carries regulatory or safety risk the safe default is to withhold the response and return a designed fallback, while lower-risk categories may be allowed through. The guardrail is a dependency with its own indicators and alerts. Asynchronous checks detect rather than prevent, unbounded retries trade one failure for a hung request, and a borrowed verdict was never computed for this response.

Runtime guardrails and production security

Developers in a company connect their agents to third-party MCP servers of their own choosing. One server, approved months ago, ships an update whose tool descriptions now contain hidden instructions to read local credential files. Which configuration practice defends against this?

- Prefer servers that are widely used and well rated in public registries, since popular servers are safer to trust
- Remove tool descriptions from the context window, so that nothing a server writes there can reach the model
- Allowlist vetted servers, pin versions, review changes to tool definitions, and scope what each server can reach
- Scan each server's tool descriptions once when it is first installed, and record the scan result with the approval

Check answer

### Show answer

Answer: Allowlist vetted servers, pin versions, review changes to tool definitions, and scope what each server can reach. Tool descriptions are untrusted content that the model reads as guidance, and they can change after approval. An allowlist limits which servers can connect, pinning and change review catch a poisoned update, least-privilege scopes limit what a compromised server can reach, and approval gates on sensitive tools hold whatever a description says. A one-time scan misses later changes, popularity is not a control, and without descriptions the model cannot use tools correctly.

Runtime guardrails and production security

An agent needs to call an internal API from its sandbox. For convenience the team places the API token in the system prompt, so that the model can add it to the commands it writes. What is the right pattern?

- Encode the token before placing it in the system prompt, and tell the model how to decode it when building a command
- Rotate the token every week, so that a copy that leaks from the conversation is only usable for a short time
- Keep the token in the system prompt, and add an instruction that it must never be repeated in any response
- Keep the secret out of the model's context and sandbox, and have a tool or egress proxy attach a scoped credential

Check answer

### Show answer

Answer: Keep the secret out of the model's context and sandbox, and have a tool or egress proxy attach a scoped credential. Anything in the context window can be echoed, logged in traces, or extracted by injected content, so secrets should never be there. A tool wrapper or an egress proxy that injects a narrowly scoped, short-lived credential lets the call succeed while the model and the sandbox only ever see a placeholder. Encoding is not protection, an instruction is not a control, and rotation limits the damage of a leak that the design still permits.

## Next

- [Timed CCDV-P practice exam](https://youraidept.com/network/ccdv-p-practice-exam): 70 questions in 120 minutes, scored against the 720 pass mark.
- [All CCDV-P practice questions](https://youraidept.com/network/ccdv-p-practice-questions) with a domain filter.
- [The CCDV-P exam page](https://youraidept.com/network/ccdv-p): format, weights, registration, study path.

### Other CCDV-P domains

- [Production integration, reliability, and knowledge grounding (20 questions)](https://youraidept.com/network/ccdv-p-practice-questions/production-integration-reliability-and-knowledge-grounding)
- [Advanced agent architecture and orchestration (14 questions)](https://youraidept.com/network/ccdv-p-practice-questions/advanced-agent-architecture-and-orchestration)
- [Observability and production monitoring (10 questions)](https://youraidept.com/network/ccdv-p-practice-questions/observability-and-production-monitoring)
- [Evaluation engineering and quality assurance (12 questions)](https://youraidept.com/network/ccdv-p-practice-questions/evaluation-engineering-and-quality-assurance)
- [Advanced debugging and incident response (9 questions)](https://youraidept.com/network/ccdv-p-practice-questions/advanced-debugging-and-incident-response)
- [Agent fleet operations for software delivery (10 questions)](https://youraidept.com/network/ccdv-p-practice-questions/agent-fleet-operations-for-software-delivery)
- [Cost and latency optimization at scale (7 questions)](https://youraidept.com/network/ccdv-p-practice-questions/cost-and-latency-optimization-at-scale)

## FAQ

### How much of the CCDV-P exam is runtime guardrails and production security? +

11% of the marks, per the official CCDV-P exam guide. The full domain list with weights is on the CCDV-P exam page.

### Are these real CCDV-P exam questions? +

No. They are 10 original scenario questions written from the blueprint for this domain. Reproducing exam content would violate the candidate agreement.

### How should I study runtime guardrails and production security for CCDV-P? +

Read the domain notes on this page, answer the questions with explanations hidden, then take the timed CCDV-P practice exam and check the per-domain breakdown for this domain.

## Who wrote this

### [Matei Olaru](https://youraidept.com/about/matei-olaru)

CEO, Your AI Department

Former public-company CEO, corporate attorney, and World Bank consultant. Runs the YAID Network and the partner relationship with Anthropic.

### [Michael Greenberg](https://youraidept.com/about/michael-greenberg)

AI Product Lead, Your AI Department

AI at Google, Meta, and Samsung. Six patents. Leads member support and the certification prep guidance.

Your AI Department is a registered Claude Partner Network company. Our members sit these exams under our partner standing. Facts on this page were last checked on November 25, 2026.

## Ready to sit CCDV-P for real?

Registration needs a Claude Partner Network organization. [YAID Network](https://youraidept.com/network) members register under our partner standing. $149 per quarter, exam fee separate.

[Apply to join YAID ↗](https://youraidept.com/network/apply?ref=drill)[How registration works →](https://youraidept.com/network/register-for-claude-certification)