r/devsecops • u/ankitjindal9404 • Aug 19 '26
Moving Helm values.yaml into Git — is git-crypt a good way to handle secrets?
Hey all, looking for a sanity check on our approach.
Stack: AWS + Kubernetes. We deploy with plain helm install (no GitOps tool like Argo/Flux).
Current setup: Our Helm values.yaml has hardcoded secrets (env vars) in it. Right now this file lives on our Jenkins server, not in any repo.
The plan: We want to move values.yaml into our Git repo so we can version it properly. The obvious problem — we can't commit hardcoded secrets in plain text.
Our idea: Use git-crypt to encrypt the file at rest in the repo, so secrets are scrambled on the remote and only unlock for people with the key.
Questions:
- Any real-world gotchas we should know before committing to it?
- Since we're already on AWS, would you skip file encryption entirely and go with something like External Secrets Operator + AWS Secrets Manager? Or is that overkill for a small team? Also curious where SOPS (with AWS KMS) or Sealed Secrets fit in.
For context: we're a small-ish team and just want a clean, low-friction way to keep secrets versioned without leaking them.
Appreciate any input 🙏
6
u/TheTwoWhoKnock Aug 19 '26
You should use aws secrets manager or parameter store. That way you aren’t having to worry about how to handle the password distribution on local dev boxes to enable editing git secrets.
And I’ve hit bugs in git-crypt before.
2
u/FlatCondition6222 Aug 19 '26
Either use vault admission webhooks solution or the aws native solution:
https://github.com/aws/secrets-store-csi-driver-provider-aws
No encryption, no complexity. You manage standard iam roles for irsa for pod identity for the secrets access.
2
u/nrvnrvn Aug 19 '26
Storing encrypted sensitive data in git repos is not a good idea in general. There are numerous tools that do it and technically it works. The problem is you end up with opaque binary data hard to audit and review when secrets are introduced or changed. Second: separation of concerns and access control: with aws secret manager or any other secret management tool you draw a border line between your app and configuration(credentials are essentially just a sensitive part of it with clear confidentiality requirements). Key management: you don’t want to manage encryption keys. Store now decrypt later: anyone with access to git repo can fetch the encrypted blobs and try decrypting them. Auditability: i want to know exactly who and when accessed the secret. Aws, external secrets controller and csi are transparent and auditable. Any git repo levels tools: I doubt. Etc. the list goes on.
2
u/rpatel09 Aug 19 '26
Use kubeseal and store secrets in git…
2
u/sp_dev_guy Aug 19 '26
External-Secrets-operator. You can define where to pull the values from (supports many vaults) & generates a corresponding secret or configmap. The have your deployment pull from that resource. Add reloader if you want updates to automatically sync & restart the deployment
2
u/aj0413 Aug 19 '26
Never store secrets in git. There’s literally never a good reason to do this
1
u/wasted-otter Aug 19 '26
Too many cons (listed on the GitHub page), Plus:
Gosh, I have Devs on my team, who still can't work without accidents with git LFS (same mechanics).
I would have no trust in that approach over time.
1
u/fabioluissilva Aug 20 '26
I use SOPS and age or vault transit (encryption as a service) on my local development and CI/CD pipelines. Inside the kubernetes cluster, external secrets pulling from Hashicorp vault. You can even go further with ‘vals’
https://github.com/helmfile/vals
1
u/xonxoff Aug 20 '26
Look into SOPS:
https://github.com/getsops/sops
1
u/Easy_Present6083 Aug 28 '26 edited Aug 28 '26
i was an engineer at cyberark on the conjur team and we would inject secrets with summon from conjur at run time. basically you can have a secrets.yaml that has the secrets location in policy and have summon inject those secrets when needed. you can specify dev prod or ci envs with summon so jenkins pulls from ci while a engineer with dev access can pull them locally using the same bash script.
this also worked with inject secrets into terraform. i def would try not to store hard coded credentials anywhere outside a secret store in genral
https://github.com/cyberark/summon
and conjur is open source but can be a lot to setup if your new too it
im sure theres other tooling simular for aws hashi etc.