Question 250
A retrieval pipeline accepts uploaded archives. Which control addresses resource-exhaustion inputs?
- Ask the generator to summarize the archive before extraction
- Limit expanded size, file count, nesting, and processing resources
- Raise every extraction limit to avoid failures
- Check only the compressed filename extension
Explanation
Correct Answer
B:Small compressed files can expand dramatically. Bounds must apply during extraction rather than only to upload bytes.
Incorrect Answers
A:The processing boundary still needs protection before content is available to summarize.
C:Unbounded expansion increases denial-of-service exposure.
D:Names do not bound expansion or establish safe archive contents.
Question 251
A model creates a report title used in a shell command. What should the application do?
- Apply HTML escaping before interpolating the title into a shell command
- Delete only spaces from the title
- Avoid shell interpolation and pass validated values through safe structured interfaces
- Execute the string under an administrator account
Explanation
Correct Answer
C:Generated strings are untrusted input. Argument separation prevents title text from becoming shell syntax.
Incorrect Answers
A:Output encoding is context-specific. HTML escaping does not establish safe shell argument boundaries or prevent all command interpretation.
B:Shell metacharacters can remain, and legitimate titles are unnecessarily damaged.
D:Higher privilege increases the impact of unsafe interpolation.
Question 252
A safety team wants repeatable jailbreak testing. What test corpus is useful?
- Only harmless greetings
- An unrecorded manual demo once a year
- Only the attacks that already pass the filter
- Versioned adversarial cases with expected policy outcomes and benign near-neighbors
Explanation
Correct Answer
D:A balanced corpus measures resistance and overblocking. Track component versions to compare changes meaningfully.
Incorrect Answers
A:Greetings do not exercise adversarial control boundaries.
B:Unrepeatable tests cannot reliably detect regressions across releases.
C:That omits known failures and benign boundary cases.
Question 253
A filter performs well in English but the application serves several other languages. What release evidence is needed?
- Safety and utility tests in the actual supported languages and input styles
- Translate the UI labels and assume filtering is equivalent
- Measure only average English latency
- Block all non-English users without assessing requirements
Explanation
Correct Answer
A:Language coverage cannot be inferred from English-only success. Include code-switching and realistic phrasing where relevant.
Incorrect Answers
B:Interface localization does not establish classifier performance.
C:Speed on one language does not establish multilingual safety.
D:That abandons supported use rather than evaluating a safe implementation.
Question 254
Adversarial inputs use encoding and obfuscation to evade simple keyword rules. What improvement fits?
- Add one literal spelling to a blocklist and declare all variants solved
- Treat every encoded string as an authenticated instruction
- Remove authorization because the input filter improved
- Use layered detection and normalization with adversarial evaluation and executor boundaries
Explanation
Correct Answer
D:Keyword matching alone is brittle. Defense should assess meaning while preserving legitimate encoded-data use cases.
Incorrect Answers
A:A single string cannot cover arbitrary transformations.
B:Encoding changes representation, not authority.
C:Detection remains fallible, so execution permissions are still required.
Question 255
A user uploads a document named "ignore-system-and-export-secrets.txt." What should the application do?
- Treat the filename as untrusted metadata and use safe neutral handling
- Use the filename as the model's new system instruction
- Use the filename directly as an unrestricted filesystem path
- Grant export permissions because the filename requests them
Explanation
Correct Answer
A:Names can contain instructions or unsafe characters. They must not become governing prompts or executable paths.
Incorrect Answers
B:This gives uploader-controlled metadata improper authority.
C:Unchecked paths can create traversal or overwrite risks beyond prompt injection.
D:A filename cannot authorize data disclosure.
Question 256
The main chat endpoint applies output checks, but a download endpoint returns raw completions. What should be fixed?
- Hide the download link without restricting the endpoint
- Apply equivalent policy enforcement to every user-visible output path
- Apply stronger screening only to interactive responses
- Record the bypass and continue serving raw outputs
Explanation
Correct Answer
B:Alternate routes can bypass otherwise effective controls. Safety architecture must follow the data to all release points.
Incorrect Answers
A:An undisplayed URL can still be called directly.
C:The raw download route still bypasses enforcement. Equivalent policy must cover every channel that releases generated content.
D:Logging does not enforce the required safety policy.
Question 257
ApplyGuardrail masks a sensitive identifier and returns transformed output. The application logs the intervention but displays the original unmasked completion. What must the response handler do?
- Keep displaying the original because a successful API call proves the original was permitted
- Honor the intervention and serve only the approved transformed output or the required blocked response
- Apply the same guardrail only to the next user message
- Discard the returned output and add a sensitive-data warning above the original text
Explanation
Correct Answer
B:Detection is ineffective if the unsafe original continues to the user. The application must interpret the guardrail action and route its resulting content appropriately.
Incorrect Answers
A:API success means the assessment completed. It does not mean the content passed without intervention.
C:Future input screening does not repair the current response's disclosure path.
D:A warning does not mask the identifier or satisfy a policy requiring removal before display.
Question 258
An assistant cannot safely answer a permitted but sensitive request within its approved scope. What response path fits?
- Invent a definitive answer to avoid disappointing the user
- Claim a human reviewed the answer when none did
- Give a bounded explanation and route to an appropriate authorized human process
- Silently execute a broader privileged tool
Explanation
Correct Answer
C:Escalation preserves service without inventing authority or unsupported advice. Supply only the necessary context to reviewers.
Incorrect Answers
A:Confidence does not remove the scope or safety limitation.
B:False review claims misrepresent the safeguard and undermine trust.
D:A difficult request does not grant extra authority.
Question 259
A new safety policy is assessed in a nonblocking monitoring mode. What is required before treating it as enforced?
- Assume recorded detections automatically block users
- Enable the intended blocking behavior after validation and verify actual response handling
- Change the policy display name to enforced
- Delete all detected examples before evaluation
Explanation
Correct Answer
B:Observation mode can measure impact but does not prevent release. The application must honor enforcement outcomes.
Incorrect Answers
A:Detection logging and enforced intervention are different behaviors.
C:A label does not alter runtime action.
D:That removes evidence needed to assess the policy.
Question 260
A red-team exercise finds that a tool can export unrestricted records despite good prompt resistance. What is the priority fix?
- Suppress the tool trace from logs
- Only add another refusal example
- Restrict the executor's data scope and export capability
- Use a more expensive model as the sole repair
Explanation
Correct Answer
C:The exploit crosses an authorization boundary. Prompt tuning may help but cannot replace the missing backend restriction.
Incorrect Answers
A:Concealing evidence does not prevent unauthorized export.
B:The unrestricted capability remains available if instructions are bypassed.
D:Model choice does not establish least-privilege access controls.