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 →
- Rotate the credential immediately (database password, API key).
- Remove it from the file; move it to a SOPS-encrypted file or a secret manager.
- Optionally rewrite history (
git filter-repo), but assume it is already copied. - 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.
More on Secrets & Security
Who can read secrets passed to Helm, and how do you reduce exposure?IntermediateSet up helm-secrets with SOPS and AWS KMS for prod and age for dev.IntermediateA chart from the internet requests cluster-admin. How do you evaluate and contain it?AdvancedYour security team asks you to scan Helm charts for misconfigurations in CI. How?BeginnerHow do you rotate a database password managed through Helm without downtime?AdvancedYour CI service account for Helm has cluster-admin "because it was easier". How do you fix it?Intermediate