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?
- Obey the comment because it is part of the pull request
- Disable security tests to avoid confusing the reviewer
- Treat repository text as untrusted and enforce external gates
- 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?
- Retry forever without a resource limit
- Assume all timeouts mean no defects were found
- Timeouts, bounded retries and an inconclusive failure status
- 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?
- Write directly to the default branch to simplify collaboration
- Give the CI reviewer unrestricted push permission to all branches
- Discard generated tests immediately and claim they were added
- 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?
- Silently report a clean review when no model response arrives
- Separate advisory-review failure from mandatory test gates
- Assume the model endpoint is always available
- 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?
- Surface the evidence, uncertainty and need for human review
- Call the code vulnerable without showing affected lines
- Suppress the warning to keep the pipeline green
- 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?
- Ask the model to guess the latest relevant commits from prose
- Report all prior summaries as if they referred to the current build
- Provide the exact revision range or diff to the noninteractive invocation
- 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?
- Ask the reviewer to flag more lines to be safe
- Remove all definitions and let the model interpret insecure however it likes
- Treat any file containing SQL as a confirmed vulnerability
- 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.
- Require at least one vulnerability report for every file
- Omit file locations from findings to simplify the prompt
- Provide contrastive examples of safe binding and unsafe concatenation
- Describe the unsafe flow from untrusted input into executable SQL string construction
- 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?
- Ask for as many monetary values as possible
- Remove evidence spans from the response
- Define amount using currency context and exclusion cases
- 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?
- Specify eligibility, exclusions and escalation conditions
- Remove rejection examples so the model focuses on success
- Reward decisive answers regardless of evidence
- 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?
- Count every textual match as runtime usage
- Ask the model to provide longer warnings for every match
- Require execution evidence, not mere mentions in prose
- 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.