Home › Certifications › CompTIA SecAI+ › Securing AI Systems — Controls and Guardrails
36 multiple-choice questions and 24 flashcards on Securing AI Systems — Controls and Guardrails, about 19% of the CompTIA SecAI+ bank. Every one carries a written rationale.
Securing AI Systems — Controls and Guardrails is one of 5 chapters in CoStudy's CompTIA SecAI+ bank, and it holds 36 of the bank's 193 multiple-choice questions — roughly 19% of the total. That proportion is not arbitrary: chapters follow the certifying body's published exam outline, and the number of questions in each is set by that domain's published weight, so the share of your practice time this chapter takes matches the share of the real exam it accounts for.
Studying by chapter is worth doing once you have a diagnostic score. A single overall percentage tells you whether you are close; it does not tell you which domain is dragging. Working a weak chapter in isolation, and re-testing it in isolation, is the fastest way to move a score that has stalled — and it is why the mock exams in CoStudy report by domain rather than as one number.
9 questions drawn from this chapter, with the full rationale shown — the controlling principle behind the right answer, and why each wrong option tempts and fails.
Which statement about system prompts and user prompts is MOST accurate for a securely designed application?
Answer: B — The system prompt outranks user text and must never embed user input
B) Correct - the prompt hierarchy exists so developer-set policy outranks user content, and that boundary collapses the moment user text is interpolated into the system message. A) Ordering the user text first inverts the hierarchy the design depends on. C) They share a token stream but the application must still enforce a trust distinction. D) Policy, tone and refusal rules are needed with or without tools.
An agent acts on behalf of many users against a document store. Which approach BEST preserves least privilege?
Answer: B — Exchange the session for a short-lived delegated token
B) Correct - per-request delegated credentials keep the data layer enforcing the user's own entitlements, so an injected instruction cannot exceed them. A) Post-hoc filtering means over-privileged data already entered the context. C) Storing credentials creates a high-value secret store and no scoping benefit. D) Automatic elevation on failure is privilege escalation by design.
A vision model is brittle to small rotations and lighting changes that attackers exploit. Which training-time measure MOST directly improves robustness?
Answer: C — Augmenting with realistic and adversarial samples
C) Correct - augmenting with the variations the model must tolerate, adversarial ones included, teaches invariance rather than patching symptoms. A) Fewer epochs generally reduces fitting quality. B) Threshold tuning trades precision against recall without adding robustness. D) Accuracy is a metric, not a differentiable training loss.
Prompt injection mitigations include:
Answer: B — Input sanitization, output filters, role split
B) Correct — defense in depth: validate input, filter output, and keep system and user roles separated in the chat template. A) Trusting user text is the vulnerability itself. C) Scale does not remove the instruction-following weakness. D) Turning the feature off is avoidance, not a control.
Output validation for an LLM API should include:
Answer: C — Schema, PII, and grounding checks on responses
C) Correct — output validation layers structural checks with content filtering for sensitive data and a grounding or citation check before the response is released. A) Unvalidated output is how leakage and injection payloads escape. B) Logging records the problem but does not stop it. D) Sampling misses the responses that are not sampled.
Before launching a customer-facing assistant, a team hires specialists to attempt jailbreaks, injections and data extraction against it. This activity is BEST called:
Answer: B — Adversarial red-teaming
B) Correct - adversarial testing by people trying to elicit harmful or policy-violating behaviour before release is AI red-teaming. A) Unit tests verify deterministic component behaviour. C) Benchmarks measure capability on fixed tasks, not adversarial resilience. D) Canary release is a rollout strategy applied after launch begins.
Synthetic data is BEST justified when:
Answer: D — Real data is scarce, sensitive, or imbalanced and validated
D) Correct — synthetic data earns its place when real records are scarce, too sensitive to use directly, or badly imbalanced, and only when the generated set is validated against the real distribution. A) Incorrect — abundant clean data removes the reason to synthesize at all. B) Incorrect — inflating a score is measurement fraud, not a justification. C) Incorrect — synthetic data raises the need for evaluation rather than removing it.
An internal model endpoint is currently reachable by any workload in the VPC with no credential. The MOST appropriate first improvement is:
Answer: B — Require authenticated per-service identities
B) Correct - model access control begins with authenticating callers and authorising them per request so usage is attributable and constrained. A) Rotating artefacts addresses integrity, not who may call the endpoint. C) Compression is a performance measure. D) Context size is a capability setting with no access implication.
Differential privacy (DP) provides:
Answer: D — An epsilon-bounded limit on any single record's influence
D) Correct — differential privacy adds calibrated noise so that the presence or absence of any one record changes the output distribution by no more than the epsilon budget, which is what blunts membership inference. A) Incorrect — encryption at rest protects storage but says nothing about what the model reveals. B) Incorrect — the added noise generally costs accuracy rather than improving it. C) Incorrect — the mechanism adds work rather than accelerating training.
3 cards from the 24 in this chapter.
Model Registry?
Versioned catalog of trained models with metadata, lineage, deployment status. MLflow, Vertex, SageMaker have these.
How is least privilege applied to an AI agent with tool access?
Give the agent its own identity, not a human's. Grant only the specific tools the task needs, read-only wherever possible, scoped to the minimum data set. Require human approval for irreversible or high-impact actions, issue short-lived credentials, and review the granted scopes as the agent's tasks change.
What is a prompt firewall?
An inspection layer that sits between the user or retrieved content and the model, scanning for injection patterns, policy-violating requests and sensitive data, and blocking, sanitising or flagging them before they reach the model. It is the AI-application analogue of a web application firewall.
These are a sample. The full Securing AI Systems — Controls and Guardrails chapter runs 60 items with per-chapter progress tracking, on the web and in the iOS app.
Open CompTIA SecAI+ in CoStudy →