container-structure-test icon indicating copy to clipboard operation
container-structure-test copied to clipboard

Add support to containerRunOptions for --cap-drop

Open ddl-ebrown opened this issue 2 years ago • 0 comments

For security reasons, it's often desirable to drop all linux capabilities when running containers in Kubernetes. However, there is currently only a way to add capabilities for tests and no way to drop them.

As seen in, https://github.com/GoogleContainerTools/container-structure-test/pull/327, support was only added for --cap-add

--cap-drop can similarly remove default capabilities - see https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

ddl-ebrown avatar Oct 24 '23 17:10 ddl-ebrown