Quiz 14 Question 2 of 20

A Copilot agent autonomously generates code files and commits them to a GitHub repository. In a recent run, the agent included an API key in a generated configuration file, which was committed and pushed before GitHub's secret scanning could alert on it. The key was in the repository for 4 hours before being rotated. Which control should be added to prevent this at the point of commit?

Select an answer to reveal the explanation.

Motivation