Study. uk . com
  1. Home
  2. All questions
  3. Question 217

CompTIA Security+ study material · question 217 of 611

An API key was accidentally committed to a Git repository and the commit was reverted an hour later. What must still be done?

  1. Add the file to .gitignore
  2. Nothing, because the revert removed the value
  3. Rewrite the commit message
  4. Rotate the key, because the history still holds it
Show the answer

Answer: D. Rotate the key, because the history still holds it

Once a credential has been pushed, history keeps the old value, so rotation is the only remedy.

Source: OWASP Secrets Management Cheat Sheet (OWASP) — OWASP Secrets Management Cheat Sheet › General Secrets Management

Challenge yourself on this topic → Study as cards