kubewarden / capabilities-psp-policy

A Pod Security Policy that controls Container Capabilities
https://kubewarden.io
Apache License 2.0
5 stars 7 forks source link

Feature Request: Validate ephemeral containers too #41

Open viccuad opened 1 year ago

viccuad commented 1 year ago

Ephemeral containers also have a spec.securityContext, hence we can set capabilities for them (and an attacker can use it for privilege escalation). This policy predates their inclusion in Kubernetes, and this policy mirrors the analogous capabilities PSP, which also predates their inclusion in Kubernetes. The PSP was never updated because as it was deprecated instead. This doesn't mean we shouldn't check ephemeral containers too.

Acceptance criteria

Validate ephemeral containers too.