Question 1
Topic: Use GitHub Copilot responsibly
Skill tested: Validate generated code for security, correctness, and suitability before adoption.
A team uses Copilot to draft an endpoint that accepts a customer-supplied file path and reads a file from disk. The generated implementation passes its happy-path unit test, but the service runs with access to several directories containing sensitive data. The release deadline is close, and the team has not yet reviewed how the path is normalized or constrained. What is the BEST next step before merging the generated code?
Generated code must be reviewed for security and suitability; a happy-path test does not establish that untrusted paths cannot escape the intended directory. The team should inspect the actual path handling, enforce an approved boundary, and test malicious and unauthorized inputs. A passing test is too narrow, Copilot Chat cannot certify security, and switching models does not remove the need for validation.