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

What is a safe approach to storing environment-specific config and secrets in Git?

IntermediateProductionSecurity: secrets, signing, access and supply chain
Answer

Keep config in Git, keep secrets out. For secrets that must be versioned (GitOps), encrypt them with SOPS (age or KMS keys) or use Sealed Secrets, or reference an external secrets manager through External Secrets Operator. Reviewers see changes to the key names but not the values.

sops --encrypt --age age1... secrets.yaml > secrets.enc.yaml
All Git & GitHub questions Roadmap: Git & GitHub

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