Question 470
A Linux administrator evaluates: An administrator needs to enforce that an artifact path is provided rather than proceed with an empty argument. Select TWO complementary answers: the most suitable corrective action AND the evidence proving it worked.
Explanation
Correct Answers
The observed Linux condition is: An administrator needs to enforce that an artifact path is provided rather than proceed with an empty argument. The recommended direct administrative response is: Quote variable expansions and use explicit parameter defaults or required-variable checks when processing shell paths and user-provided values. The relevant failure or security risk is: Unquoted paths with whitespace or empty variables can split arguments, select unintended files or target a dangerous default. Validate success with: Tests with spaces, empty values and wildcard characters preserve each intended argument and reject missing required inputs.
For the specific observation (An administrator needs to enforce that an artifact path is provided rather than proceed with an empty argument), the acceptance evidence is: Tests with spaces, empty values and wildcard characters preserve each intended argument and reject missing required inputs. This verifies the action (Quote variable expansions and use explicit parameter defaults or required-variable checks when processing shell paths and user-provided values.) rather than merely proving that an unrelated Linux tool works. It also addresses the known risk: Unquoted paths with whitespace or empty variables can split arguments, select unintended files or target a dangerous default.
Incorrect Answers
Python virtual environments and dependencies (4.3) would demonstrate or implement: The virtual environment reports the approved interpreter and package versions while system Python packages remain unchanged. The case states: An administrator needs to enforce that an artifact path is provided rather than proceed with an empty argument. The most direct paired action and test is: Quote variable expansions and use explicit parameter defaults or required-variable checks when processing shell paths and user-provided values.
AI-generated administration code review and execution safety (4.5) would demonstrate or implement: Executing unreviewed generated commands can delete unintended data, weaken security or modify the wrong infrastructure. This choice can be useful for that problem, but it does not establish the Safe Bash parameter expansion and quoting control being assessed here.
Idempotent configuration with Ansible (4.1) addresses another technical failure: Ad hoc scripts that repeatedly append configuration can create duplicate entries and uncontrolled drift across servers. The required paired action and test concerns Safe Bash parameter expansion and quoting; a passing result for this alternative could leave that requirement unresolved.