Interview Prep/Git & GitHub/Security: secrets, signing, access and supply chain

What are the first things you do when a secret is committed to a repo?

BeginnerProductionSecurity: secrets, signing, access and supply chain
Answer

Revoke and rotate the credential immediately, because assume it is already copied. Then check logs for use of the key, remove it from history only as a secondary step, and add a preventive control. Cleaning history without rotating is theatre.

All Git & GitHub questions Roadmap: Git & GitHub

More on Security: secrets, signing, access and supply chain