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

How do you prevent accidental exposure by making a private repo public?

IntermediateProductionSecurity: secrets, signing, access and supply chain
Answer

Restrict repository visibility changes to org owners, disable "members can change visibility", require a pre-publish checklist run (secret scan of full history, licence check, remove internal URLs), and consider publishing a squashed fresh history for the first public release.

All Git & GitHub questions Roadmap: Git & GitHub

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