zegl / kube-score

Kubernetes object analysis with recommendations for improved reliability and security. kube-score actively prevents downtime and bugs in your Kubernetes YAML and Charts. Static code analysis for Kubernetes.
https://kube-score.com
MIT License
2.65k stars 174 forks source link

Add support for checking Capabilities set when using PSA/PSS restricted #591

Open wargamez opened 3 months ago

wargamez commented 3 months ago

When using psa restricted, one of the requirements is that you must set capabilities: drop: ["ALL"]

Capabilities (v1.22+)
Containers must drop ALL capabilities, and are only permitted to add back the NET_BIND_SERVICE capability. This is Linux only policy in v1.25+ (.spec.os.name != "windows")

Please add a check for this: https://kubernetes.io/docs/concepts/security/pod-security-standards/

/E