McAfee Secured

Exam Code: CY0-001

Exam Name: CompTIA SecAI+

Certification Provider: CompTIA

Corresponding Certification: CompTIA SecAI+

100% CompTIA CY0-001 Guaranteed Success With Testking Training Materials

Get Real CY0-001 Exam Questions & Expert Verified Answers as Experienced on the Real Exam!

169 Questions & Answers with Testing Engine

"CompTIA SecAI+ Exam", also known as CY0-001 exam, is a CompTIA certification exam.

Pass your tests with the always up-to-date CY0-001 Exam Engine. Your CY0-001 training materials keep you at the head of the pack!

Satisfaction Guaranteed

Money Back Guarantee

Testking provides hassle-free money back guarantee with our products. That is because we have 100% trust in the abilities of our professional and experience product team, and our record is a proof of that.

99.6% PASS RATE
Was: $137.49
Now: $124.99

CompTIA CY0-001 Practice Test 25

Question 240

A prompt template includes raw user-controlled text inside a developer-role instruction block, allowing role confusion. Which test best verifies the intended result in this case?

  1. Inject a harmless markup canary and verify it is rendered as text rather than executed.
  2. Replay direct and indirect injection fixtures and verify tool policy still blocks malicious requests.
  3. Submit malformed output cases and require schema rejection rather than silent defaults.
  4. Insert role delimiter strings and verify the model and tools retain original role authority.

Explanation

Correct Answer

D:

Insert role delimiter strings and verify the model and tools retain original role authority. Text concatenation can give attacker content the appearance of privileged instructions.

Other Answers

A:

“Inject a harmless markup canary and verify it is rendered as text rather than executed” does not establish the required result because text concatenation can give attacker content the appearance of privileged instructions.

B:

“Replay direct and indirect injection fixtures and verify tool policy still blocks malicious requests” does not establish the required result because text concatenation can give attacker content the appearance of privileged instructions.

C:

“Submit malformed output cases and require schema rejection rather than silent defaults” does not establish the required result because text concatenation can give attacker content the appearance of privileged instructions.

Question 241

A prompt template includes raw user-controlled text inside a developer-role instruction block, allowing role confusion. Which ongoing safeguard best prevents this problem or keeps the requirement satisfied?

  1. Use typed prompt templates and reject role-boundary injection in testing.
  2. Use defense-in-depth; never treat a prompt firewall as a sole enforcement boundary.
  3. Version output schemas and run contract regression tests before each model switch.
  4. Require output-context encoding tests for all UI integrations.

Explanation

Correct Answer

A:

Text concatenation can give attacker content the appearance of privileged instructions. Verification: Insert role delimiter strings and verify the model and tools retain original role authority.

Other Answers

B:

“Use defense-in-depth; never treat a prompt firewall as a sole enforcement boundary” does not adequately prevent recurrence because text concatenation can give attacker content the appearance of privileged instructions.

C:

“Version output schemas and run contract regression tests before each model switch” does not adequately prevent recurrence because text concatenation can give attacker content the appearance of privileged instructions.

D:

“Require output-context encoding tests for all UI integrations” does not adequately prevent recurrence because text concatenation can give attacker content the appearance of privileged instructions.

Question 242

A chatbot automatically retries every refused response until the provider generates an unrestricted answer. Which response most directly addresses the stated need or control weakness?

  1. Apply gateway input-token caps, output-token budgets and quota-aware error responses.
  2. Preserve policy refusals as non-success and route to a controlled review rather than retrying around guardrails.
  3. Define scoped model behavior guardrails and an out-of-scope response policy with adversarial testing.
  4. Benchmark optimized guardrail placement while retaining critical policy checks and documented exceptions.

Explanation

Correct Answer

B:

Unbounded refusal retries can bypass intended safety handling and increase cost. To verify, simulate provider refusal codes and verify retry budgets and safe terminal status.

Other Answers

A:

“Apply gateway input-token caps, output-token budgets and quota-aware error responses” would not correct the underlying issue because unbounded refusal retries can bypass intended safety handling and increase cost.

C:

“Define scoped model behavior guardrails and an out-of-scope response policy with adversarial testing” would not correct the underlying issue because unbounded refusal retries can bypass intended safety handling and increase cost.

D:

“Benchmark optimized guardrail placement while retaining critical policy checks and documented exceptions” would not correct the underlying issue because unbounded refusal retries can bypass intended safety handling and increase cost.

Question 243

A chatbot automatically retries every refused response until the provider generates an unrestricted answer. Which underlying principle best explains the situation?

  1. A generic generation endpoint can respond beyond its authorized business use when no policy gate exists.
  2. Removing an enforcement step can lower latency while expanding unauthorized output or action risk.
  3. Unbounded refusal retries can bypass intended safety handling and increase cost.
  4. Tokens consume inference compute and billing even if the request body is otherwise valid.

Explanation

Correct Answer

C:

Unbounded refusal retries can bypass intended safety handling and increase cost. The corresponding corrective action is Preserve policy refusals as non-success and route to a controlled review rather than retrying around guardrails.

Other Answers

A:

“A generic generation endpoint can respond beyond its authorized business use when no policy gate exists” does not explain what happened because unbounded refusal retries can bypass intended safety handling and increase cost.

B:

“Removing an enforcement step can lower latency while expanding unauthorized output or action risk” does not explain what happened because unbounded refusal retries can bypass intended safety handling and increase cost.

D:

“Tokens consume inference compute and billing even if the request body is otherwise valid” does not explain what happened because unbounded refusal retries can bypass intended safety handling and increase cost.

Question 244

A chatbot automatically retries every refused response until the provider generates an unrestricted answer. Which test best verifies the intended result in this case?

  1. Measure p95 latency and adversarial false-allow rates under the same load profile.
  2. Send oversized and near-limit requests and verify deterministic rejection plus budget telemetry.
  3. Test a diverse out-of-scope set and verify refusal or a permitted handoff without fabricated advice.
  4. Simulate provider refusal codes and verify retry budgets and safe terminal status.

Explanation

Correct Answer

D:

Simulate provider refusal codes and verify retry budgets and safe terminal status. Unbounded refusal retries can bypass intended safety handling and increase cost.

Other Answers

A:

“Measure p95 latency and adversarial false-allow rates under the same load profile” does not establish the required result because unbounded refusal retries can bypass intended safety handling and increase cost.

B:

“Send oversized and near-limit requests and verify deterministic rejection plus budget telemetry” does not establish the required result because unbounded refusal retries can bypass intended safety handling and increase cost.

C:

“Test a diverse out-of-scope set and verify refusal or a permitted handoff without fabricated advice” does not establish the required result because unbounded refusal retries can bypass intended safety handling and increase cost.

Question 245

A chatbot automatically retries every refused response until the provider generates an unrestricted answer. Which ongoing safeguard best prevents this problem or keeps the requirement satisfied?

  1. Specify refusal outcomes and bounded retry logic in the API client contract.
  2. Establish per-service token and spending ceilings with alert thresholds.
  3. Version use-case constraints and fail-open/fail-closed decisions in the guardrail contract.
  4. Use performance budgets that cannot waive mandatory security checks without risk approval.

Explanation

Correct Answer

A:

Unbounded refusal retries can bypass intended safety handling and increase cost. To verify, simulate provider refusal codes and verify retry budgets and safe terminal status.

Other Answers

B:

“Establish per-service token and spending ceilings with alert thresholds” does not adequately prevent recurrence because unbounded refusal retries can bypass intended safety handling and increase cost.

C:

“Version use-case constraints and fail-open/fail-closed decisions in the guardrail contract” does not adequately prevent recurrence because unbounded refusal retries can bypass intended safety handling and increase cost.

D:

“Use performance budgets that cannot waive mandatory security checks without risk approval” does not adequately prevent recurrence because unbounded refusal retries can bypass intended safety handling and increase cost.

Question 246

An LLM gateway validates user requests but forwards model output directly into a web page as raw HTML. Which response most directly addresses the stated need or control weakness?

  1. Require authenticated endpoint access with explicit network restrictions before accepting requests.
  2. Encode or sanitize output at the browser sink and restrict downstream rendering formats.
  3. Separate developer instructions from untrusted user fields using structured role boundaries and escaping.
  4. Define a typed structured-output contract and validate parsed response fields before downstream use.

Explanation

Correct Answer

B:

Model-generated strings remain untrusted output and can become cross-site scripting payloads. Verification: Inject a harmless markup canary and verify it is rendered as text rather than executed.

Other Answers

A:

“Require authenticated endpoint access with explicit network restrictions before accepting requests” would not correct the underlying issue because model-generated strings remain untrusted output and can become cross-site scripting payloads.

C:

“Separate developer instructions from untrusted user fields using structured role boundaries and escaping” would not correct the underlying issue because model-generated strings remain untrusted output and can become cross-site scripting payloads.

D:

“Define a typed structured-output contract and validate parsed response fields before downstream use” would not correct the underlying issue because model-generated strings remain untrusted output and can become cross-site scripting payloads.

Question 247

An LLM gateway validates user requests but forwards model output directly into a web page as raw HTML. Which underlying principle best explains the situation?

  1. Text concatenation can give attacker content the appearance of privileged instructions.
  2. A request to write JSON in prose does not guarantee all required keys or enum values.
  3. Model-generated strings remain untrusted output and can become cross-site scripting payloads.
  4. Network reachability is not authorization, and a raw inference endpoint may leak model capability or data.

Explanation

Correct Answer

C:

Model-generated strings remain untrusted output and can become cross-site scripting payloads. The corresponding corrective action is Encode or sanitize output at the browser sink and restrict downstream rendering formats.

Other Answers

A:

“Text concatenation can give attacker content the appearance of privileged instructions” does not explain what happened because model-generated strings remain untrusted output and can become cross-site scripting payloads.

B:

“A request to write JSON in prose does not guarantee all required keys or enum values” does not explain what happened because model-generated strings remain untrusted output and can become cross-site scripting payloads.

D:

“Network reachability is not authorization, and a raw inference endpoint may leak model capability or data” does not explain what happened because model-generated strings remain untrusted output and can become cross-site scripting payloads.

Question 248

An LLM gateway validates user requests but forwards model output directly into a web page as raw HTML. Which test best verifies the intended result in this case?

  1. Submit malformed output cases and require schema rejection rather than silent defaults.
  2. Attempt anonymous external inference and verify denial while approved service identity succeeds.
  3. Insert role delimiter strings and verify the model and tools retain original role authority.
  4. Inject a harmless markup canary and verify it is rendered as text rather than executed.

Explanation

Correct Answer

D:

Inject a harmless markup canary and verify it is rendered as text rather than executed. Model-generated strings remain untrusted output and can become cross-site scripting payloads.

Other Answers

A:

“Submit malformed output cases and require schema rejection rather than silent defaults” does not establish the required result because model-generated strings remain untrusted output and can become cross-site scripting payloads.

B:

“Attempt anonymous external inference and verify denial while approved service identity succeeds” does not establish the required result because model-generated strings remain untrusted output and can become cross-site scripting payloads.

C:

“Insert role delimiter strings and verify the model and tools retain original role authority” does not establish the required result because model-generated strings remain untrusted output and can become cross-site scripting payloads.

Question 249

An LLM gateway validates user requests but forwards model output directly into a web page as raw HTML. Which ongoing safeguard best prevents this problem or keeps the requirement satisfied?

  1. Require output-context encoding tests for all UI integrations.
  2. Default AI endpoints to private network and authenticated API access by policy.
  3. Use typed prompt templates and reject role-boundary injection in testing.
  4. Version output schemas and run contract regression tests before each model switch.

Explanation

Correct Answer

A:

Model-generated strings remain untrusted output and can become cross-site scripting payloads. Verification: Inject a harmless markup canary and verify it is rendered as text rather than executed.

Other Answers

B:

“Default AI endpoints to private network and authenticated API access by policy” does not adequately prevent recurrence because model-generated strings remain untrusted output and can become cross-site scripting payloads.

C:

“Use typed prompt templates and reject role-boundary injection in testing” does not adequately prevent recurrence because model-generated strings remain untrusted output and can become cross-site scripting payloads.

D:

“Version output schemas and run contract regression tests before each model switch” does not adequately prevent recurrence because model-generated strings remain untrusted output and can become cross-site scripting payloads.

Question 250

A manager orders production guardrails disabled temporarily to reduce response latency without a compensating review. Which response most directly addresses the stated need or control weakness?

  1. Define scoped model behavior guardrails and an out-of-scope response policy with adversarial testing.
  2. Benchmark optimized guardrail placement while retaining critical policy checks and documented exceptions.
  3. Re-run adversarial and task-quality regression cases on the new guardrail/model combination.
  4. Preserve policy refusals as non-success and route to a controlled review rather than retrying around guardrails.

Explanation

Correct Answer

B:

Removing an enforcement step can lower latency while expanding unauthorized output or action risk. To verify, measure p95 latency and adversarial false-allow rates under the same load profile.

Other Answers

A:

“Define scoped model behavior guardrails and an out-of-scope response policy with adversarial testing” would not correct the underlying issue because removing an enforcement step can lower latency while expanding unauthorized output or action risk.

C:

“Re-run adversarial and task-quality regression cases on the new guardrail/model combination” would not correct the underlying issue because removing an enforcement step can lower latency while expanding unauthorized output or action risk.

D:

“Preserve policy refusals as non-success and route to a controlled review rather than retrying around guardrails” would not correct the underlying issue because removing an enforcement step can lower latency while expanding unauthorized output or action risk.

CompTIA SecAI+ (CY0-001) Practice Tests