Interview Prep/Helm/Secrets & Security

A secret was committed in plaintext in `values-prod.yaml`. What do you do?

BeginnerScenarioSecrets & Security
Answer

Situation read → The secret is compromised the moment it is pushed; removing it from Git does not un-leak it.

What I'd do →

  1. Rotate the credential immediately (database password, API key).
  2. Remove it from the file; move it to a SOPS-encrypted file or a secret manager.
  3. Optionally rewrite history (git filter-repo), but assume it is already copied.
  4. Add secret scanning (gitleaks, GitHub push protection) to block recurrence.

Why → Rotation is the only real fix.

Interview tip → Say "rotate first" before anything else.

All Helm questions Roadmap: Helm

More on Secrets & Security