Question 360
At fictional Cedarbridge Care Systems, during a campus API automation rollout, the operator observes: A Python script interpolates unvalidated user-provided VLAN IDs into device requests and submits values outside approved range. Which sustainable preventive control most directly avoids a recurrence?
Explanation
Correct Answer
Use a shared schema validator, unit tests for boundary values and an approved-resource allowlist. This prevents the recurrence because aPI clients must validate human and external inputs independently of server-side validation to avoid unsafe or unintended changes. A matching immediate correction is: Validate typed inputs, authorized resource scopes and ranges before constructing API requests, then encode parameters safely.
Incorrect Answers
This routine guards against another mechanism: ansible inventory groups and variable precedence determine which devices and values are targeted by a playbook. The recurring exposure in the current case is: aPI clients must validate human and external inputs independently of server-side validation to avoid unsafe or unintended changes. The matching preventive check is “Use a shared schema validator, unit tests for boundary values and an approved-resource allowlist”.
The suggested review tracks a different technical risk: terraform configuration alone does not establish ownership of an already-existing platform object; state import binds it to a resource address. Here the sustained control must address: aPI clients must validate human and external inputs independently of server-side validation to avoid unsafe or unintended changes. Choose “Use a shared schema validator, unit tests for boundary values and an approved-resource allowlist”.
That safeguard is relevant to: an access-token lifecycle and authorization scope are distinct concerns; repeated reuse of expired or insufficient tokens cannot resolve them. The current failure instead follows from: aPI clients must validate human and external inputs independently of server-side validation to avoid unsafe or unintended changes. Its prevention measure is “Use a shared schema validator, unit tests for boundary values and an approved-resource allowlist”.