Question 60
A lab Python script has a condition that executes a risky action whenever a value is nonempty. Which conclusion or control should be prioritized in the test plan?
Explanation
Correct Answer
Use explicit Boolean predicates and test each permitted branch. This answer directly addresses the described constraint. Truthiness errors can make automation exceed safe test conditions. Successful validation requires: Unit tests confirm risky branches require a positive authorization flag.
Incorrect Answers
That relates to a different issue: An exercise uses a fixed Python delay even when the target responds with a rate-limit instruction. Adaptive pacing reduces service impact and misleading error floods. That is not a direct remedy for the requested outcome: Unit tests confirm risky branches require a positive authorization flag. The appropriate action is: Use explicit Boolean predicates and test each permitted branch.
It would address a security analyst wants to run Atomic Red Team tests but production containment could be triggered. The relevant reason in that case is: Breach-and-attack simulation must respect real business impact. Here the required success condition is unit tests confirm risky branches require a positive authorization flag. The appropriate action is: Use explicit Boolean predicates and test each permitted branch.
This action applies to a different case: A Python assessment script must process a JSON vulnerability feed with missing keys. Defensive handling prevents script crashes or fabricated values. It does not establish the present requirement, where unit tests confirm risky branches require a positive authorization flag. The appropriate action is: Use explicit Boolean predicates and test each permitted branch.