You find a malicious commit pushed by a compromised account. What is your response?
AdvancedProductionRecovery and incident handling
Answer
Contain: suspend the account, revoke tokens and SSH keys, rotate secrets that could have been exposed. Investigate with the audit log and commit scope, revert or remove the commit, rebuild and redeploy affected artifacts from known-good SHAs, check dependent repos and releases for the same code, and notify per policy. Then add signed-commit requirements or stronger review on the affected paths.
More on Recovery and incident handling
Someone force-pushed over main and 12 commits vanished. How do you recover?IntermediateAfter recovery, what do you change so a force-push to main cannot happen again?AdvancedA bad migration commit was deployed. Walk through your response in the first 15 minutes.IntermediateHow do you recover a deleted repository or branch on GitHub?IntermediateHow do you find who or what pushed a specific commit to a protected branch?AdvancedCI is red on main after a merge. What is your policy?Intermediate