
Answer-first summary for fast verification
Answer: Revoke the key, remove the key from Git, purge the Git history to eliminate all traces of the file, and ensure the key is added to the .gitignore file.
The correct answer is **A** because it is crucial to completely remove all traces of the service account key from the repository and prevent future commits of such sensitive information by adding it to the .gitignore file. **B** is incorrect as deleting the project does not address the exposure of the key in the Git history. **C** is incorrect because storing keys in Git, even in private repositories, is a security risk. **D** is incorrect as Google Cloud Support cannot assist in removing the key from your Git repository.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You've discovered that a service account key has been accidentally committed to your private GitHub repository while reviewing your application's source code. What is the most appropriate course of action to take next?
A
Revoke the key, remove the key from Git, purge the Git history to eliminate all traces of the file, and ensure the key is added to the .gitignore file.
B
Delete the project and start anew.
C
Take no action. Storing keys in Git is acceptable if the repository is private.
D
Reach out to Google Cloud Support for assistance.
No comments yet.