Why it matters
An environment variable named like a credential has its value written in the workload's manifest, so anyone who can read the workload (or its Git history) holds it.
How to fix it
Move the value into a Secret, mount it as a file, and rotate the exposed credential.
What TrustIvan reads
Read through the Kubernetes API with the read-only role TrustIvan's install creates.
Benchmark controls
- CIS Kubernetes Benchmark 1.9.0, control
5.4.1: Secrets are read as files rather than environment variables. Also checked for this control: Container reads a Secret through environment variables - NSA/CISA Kubernetes Hardening Guidance 1.2, control
network.secrets: Secrets are handled safely by workloads. Also checked for this control: Container reads a Secret through environment variables
Control numbers are the published ones; the titles are TrustIvan's own short descriptions. The benchmarks belong to their publishers, who do not endorse TrustIvan.
Related checks
- Container keeps the default capabilities
KubernetesSeverity: Low
k8s.container.capabilities-not-dropped - Container adds a dangerous capability
KubernetesSeverity: High
k8s.container.dangerous-capability - Container explicitly disables AppArmor
KubernetesSeverity: Medium
k8s.container.apparmor-unconfined - Container binds a host port
KubernetesSeverity: Medium
k8s.container.host-port - Container adds a Linux capability
KubernetesSeverity: Low
k8s.container.added-capability - Container runs `latest` or an untagged image
KubernetesSeverity: Medium
k8s.container.image-latest
Terms: KSPM (Kubernetes security posture management), Kubernetes RBAC, NSA/CISA Kubernetes Hardening Guidance, CIS Benchmarks
All Kubernetes posture checks · The whole catalogue · How this works in TrustIvan · Documentation