Question 100
In a repository maintenance task, the following condition is confirmed: An agent wants to commit a generated secret to demonstrate the solution. Which recommendation correctly handles the situation?
Explanation
Correct Answer
The choice "Mock a credential provider and assert runtime token injection" matches the requirement: An agent wants to commit a generated secret to demonstrate the solution. A test double exercises secret consumption without placing credentials in source control. This is the best-supported approach under the stated constraint.
Incorrect Answers
The alternative "Require the configured change approval and backup verification" fits another situation: An agent needs to execute a database migration in a regulated environment. Agentic execution does not replace change management. Here the condition is An agent wants to commit a generated secret to demonstrate the solution; use "Mock a credential provider and assert runtime token injection" instead. A test double exercises secret consumption without placing credentials in source control.
The alternative "Restrict the command to verified disposable outputs" addresses A terminal assistant asks permission to delete generated artifacts and source code together. Broad file operations risk removing canonical assets. It does not resolve An agent wants to commit a generated secret to demonstrate the solution; the correct choice is "Mock a credential provider and assert runtime token injection". A test double exercises secret consumption without placing credentials in source control.
For the different scenario A tool call would publish an internal repository while investigating a build error, "Refuse public publishing and preserve repository visibility" could be appropriate. Diagnostic permission does not imply distribution permission. The present requirement is An agent wants to commit a generated secret to demonstrate the solution, which calls for "Mock a credential provider and assert runtime token injection". A test double exercises secret consumption without placing credentials in source control.