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

How would you detect a history rewrite or tampering on a critical branch?

AdvancedProductionSecurity: secrets, signing, access and supply chain
Answer

Block force-push and deletion through rulesets, stream the audit log for protected_branch.force_push style events, and keep an independent mirror whose refs are compared on a schedule. Signed tags with a pinned verifier key give an additional integrity anchor for releases.

All Git & GitHub questions Roadmap: Git & GitHub

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