Anthropic CCA-F (Claude Certified Architect - Foundations (CCAR-F)) Practice Test 20

Question 190

A pull request includes untrusted instructions in a code comment asking the CI agent to ignore all security tests. What should the architecture do?

  1. Obey the comment because it is part of the pull request
  2. Disable security tests to avoid confusing the reviewer
  3. Treat repository text as untrusted and enforce external gates
  4. Grant the agent more privileges to inspect the suspicious comment

Explanation

Correct Answer

C:

Code under review can contain prompt-injection text. Immutable CI checks and permission boundaries prevent it from controlling release policy.

Incorrect Answers

A:

Untrusted source content is not authorized to redefine the reviewer's instructions. Following it would undermine the audit.

B:

Removing hard checks gives the attacker the desired outcome. Automated enforcement must remain active.

D:

Broader permissions do not neutralize prompt injection. The relevant defense is instruction/data separation.

Question 191

A CI runner sometimes terminates before an AI review finishes. What should the pipeline enforce?

  1. Retry forever without a resource limit
  2. Assume all timeouts mean no defects were found
  3. Timeouts, bounded retries and an inconclusive failure status
  4. Disable logging to keep timed-out jobs small

Explanation

Correct Answer

C:

Automation should distinguish tool failure from a valid clean review. The job must not silently pass when execution is interrupted.

Incorrect Answers

A:

Unbounded retries can exhaust CI capacity and hide persistent faults. Recovery should have a budget.

B:

No result is not a successful result. Such fail-open logic creates a release risk.

D:

Removing logs impairs diagnosis and does not ensure timely completion. Controlled telemetry is needed.

Question 192

A team requests that Claude Code generate tests for each pull request but not push them to the contributor's branch. What design fits?

  1. Write directly to the default branch to simplify collaboration
  2. Give the CI reviewer unrestricted push permission to all branches
  3. Discard generated tests immediately and claim they were added
  4. Generate in isolation and submit outputs for human review

Explanation

Correct Answer

D:

A CI sandbox allows examination of proposed tests without changing contributor history. Explicit approval can govern any later commit.

Incorrect Answers

A:

That bypasses pull-request review and can introduce unchecked changes. Isolation is the safer boundary.

B:

Broad write access contradicts the no-push requirement. The pipeline should not mutate source without approval.

C:

A false completion report provides no usable artifact. Results should be inspectable and honestly described.

Question 193

A pipeline's Claude review is supposed to provide recommendations only, but a failure in the model endpoint blocks every deployment. What policy should maintainers define?

  1. Silently report a clean review when no model response arrives
  2. Separate advisory-review failure from mandatory test gates
  3. Assume the model endpoint is always available
  4. Remove all deterministic checks to reduce dependency count

Explanation

Correct Answer

B:

A clear release policy can mark AI review inconclusive while preserving required tests and approvals. The team must choose fail-open or fail-closed deliberately for advisory steps.

Incorrect Answers

A:

Fabricated review success hides missing coverage. Stakeholders should see that advice was unavailable.

C:

External services can fail. A production CI design needs explicit error behavior.

D:

Automated tests remain essential controls. AI review does not replace them.

Question 194

A CI security scan powered by Claude reports a suspicious diff but cannot prove exploitability. How should it publish findings?

  1. Surface the evidence, uncertainty and need for human review
  2. Call the code vulnerable without showing affected lines
  3. Suppress the warning to keep the pipeline green
  4. Block every repository permanently on any speculative concern

Explanation

Correct Answer

A:

A language-model review can flag risk without establishing a definitive security finding. Traceable evidence supports responsible triage.

Incorrect Answers

B:

Unsupported labels cannot be reproduced or assessed. Findings need concrete file and code references.

C:

Dropping risk signals wastes the advisory review. It should be surfaced with the appropriate confidence level.

D:

Unqualified certainty can cause unnecessary disruption. The policy should distinguish severity and confidence.

Question 195

A team's nightly CI job asks Claude Code to summarize changed files but often analyzes unrelated commits. What input scoping fix should be made?

  1. Ask the model to guess the latest relevant commits from prose
  2. Report all prior summaries as if they referred to the current build
  3. Provide the exact revision range or diff to the noninteractive invocation
  4. Analyze the entire repository on every nightly run without reason

Explanation

Correct Answer

C:

A bounded change set ensures the analysis targets the intended nightly interval. The job should record the commit identifiers for traceability.

Incorrect Answers

A:

Implicit inference can select the wrong range. CI has deterministic source-control metadata available.

B:

Reusing stale output masks new changes. The result must be bound to the current revision set.

D:

Full scans add cost and can bury the actual changes. The requirement is specific to the selected interval.

Question 196

A code reviewer flags every use of a database query as SQL injection, including queries with parameter binding. What prompt change most directly improves precision?

  1. Ask the reviewer to flag more lines to be safe
  2. Remove all definitions and let the model interpret insecure however it likes
  3. Treat any file containing SQL as a confirmed vulnerability
  4. Flag untrusted values that reach an execution sink

Explanation

Correct Answer

D:

Concrete positive criteria separate real injection risks from legitimate parameterized queries. The reviewer should cite the relevant data flow.

Incorrect Answers

A:

Increasing recall without discrimination worsens false positives. The goal is an evidence-based security classification.

B:

Vague criteria invite inconsistent findings. A precise rule is more reliable.

C:

Technology presence is not proof of unsafe input handling. The sink and input path matter.

Question 197

A security-review prompt produces too many SQL-injection findings from safe parameterized queries. Which TWO changes would most directly improve the rule's precision? Choose TWO.

  1. Require at least one vulnerability report for every file
  2. Omit file locations from findings to simplify the prompt
  3. Provide contrastive examples of safe binding and unsafe concatenation
  4. Describe the unsafe flow from untrusted input into executable SQL string construction
  5. Treat all appearances of the word SELECT as a security issue

Explanation

Correct Answers

C:

Near-miss cases teach the distinction that the classifier currently misses. Each example should follow the documented rule.

D:

An evidence-based criterion identifies the actual hazard. It avoids treating every SQL API call as vulnerable.

Incorrect Answers

A:

Mandatory positives produce false accusations even when code is safe. A no-finding outcome is essential.

B:

Lack of code references makes review less verifiable. The failure is already insufficient evidence discrimination.

E:

A keyword alone does not establish unsafe data flow. Query semantics and parameter handling matter.

Question 198

A financial document extractor labels all numeric strings as amounts, including page numbers and phone numbers. What instruction would reduce false positives?

  1. Ask for as many monetary values as possible
  2. Remove evidence spans from the response
  3. Define amount using currency context and exclusion cases
  4. Round every digit sequence to two decimals

Explanation

Correct Answer

C:

Extraction criteria should distinguish financial quantities from unrelated numbers. Context and negative cases support reliable labeling.

Incorrect Answers

A:

Maximizing capture without definitions worsens spurious matches. Precision is the stated problem.

B:

Without source spans it is harder to validate whether a number is an amount. Traceability helps correct extraction.

D:

Formatting cannot establish semantic type. It could corrupt phone numbers and identifiers.

Question 199

A support assistant often approves refunds contrary to eligibility rules. What should its prompt define explicitly?

  1. Specify eligibility, exclusions and escalation conditions
  2. Remove rejection examples so the model focuses on success
  3. Reward decisive answers regardless of evidence
  4. Only ask the assistant to be fair to customers

Explanation

Correct Answer

A:

Clear decision criteria guide compliant responses. Backend policy checks are still required before any financial action.

Incorrect Answers

B:

Only positive cases may leave important boundaries unclear. Negative examples improve discrimination.

C:

Confidence incentives can lead to invented eligibility. Explicit rules and verification must drive decisions.

D:

Fairness is too broad to determine a specific refund rule. The agent may substitute sentiment for policy.

Question 200

A code analysis model flags comments containing a deprecated API name even though no code calls it. What instruction is most effective?

  1. Count every textual match as runtime usage
  2. Ask the model to provide longer warnings for every match
  3. Require execution evidence, not mere mentions in prose
  4. Ignore all deprecated APIs to eliminate warnings

Explanation

Correct Answer

C:

A precise finding needs the relevant syntax and call location. Mentions in documentation do not establish active dependency.

Incorrect Answers

A:

Raw search results are candidates for inspection, not proof of execution. The context must be classified.

B:

More words do not correct an invalid trigger condition. The underlying rule needs refinement.

D:

That suppresses genuine issues. The requirement is improved specificity, not zero detection.

Claude Certified Architect - Foundations (CCAR-F) (CCA-F) Practice Tests