Question 60
A CI/CD repository accidentally committed a working Microsoft Foundry API key, and the key was used in published pipeline history. The team now intends to switch to managed identity or a secure secret reference. What remediation must occur before that migration can be considered safe?
Explanation
Correct Answer
Once a key appears in repository and build history, removing the string in a new commit does not invalidate it. Revocation or rotation, exposure review, and a governed credential replacement address the actual compromise.
Incorrect Answers
Earlier commits and logs can retain the credential. A new commit that hides the string does not stop an attacker using the still-active key.
Pipeline log masking protects some output but cannot invalidate a leaked secret or erase its previous exposure; the key must be rotated or revoked.
Encrypting a file in the latest branch does not make the previously disclosed credential safe, nor does it replace access governance and rotation.