Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add seccompProfile to securityContext #7190

Open
atombrella opened this issue Jan 22, 2025 · 4 comments
Open

Add seccompProfile to securityContext #7190

atombrella opened this issue Jan 22, 2025 · 4 comments
Labels
proposal An issue that proposes a feature request

Comments

@atombrella
Copy link

Is your feature request related to a problem? Please describe.

I think it'd be nice to have this a default under securityContext for the nginx Deployment resource.

seccompProfile:
  type: RuntimeDefault

https://kubernetes.io/docs/tutorials/security/seccomp/#enable-the-use-of-runtimedefault-as-the-default-seccomp-profile-for-all-workloads

Docker has a list of syscalls that are banned with this https://docs.docker.com/engine/security/seccomp/
The corresponding capability is listed. Note that one of them are "NET_BIND_SERVICE" which is the only one that really appears needed for nginx.

We have currently set this under our deployment. If you use a managed Kubernetes cluster (AWS, Azure, Google or something else), it may be difficult or undesired to create custom more elaborate profiles.

There is a bit more motivation here.
https://www.stigviewer.com/stig/mirantis_kubernetes_engine/2024-06-17/finding/V-260937

https://www.aquasec.com/products/trivy/ This tool will report this as a shortcoming. There is a free/open version of the tool that can be used.

@atombrella atombrella added the proposal An issue that proposes a feature request label Jan 22, 2025
Copy link

Hi @atombrella thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@atombrella
Copy link
Author

On a semi-related notice, runAsGroup: 101 #nginx would also be a nice default to include.

@vepatel
Copy link
Contributor

vepatel commented Jan 22, 2025

Hi @atombrella thanks for this issue,
re NET_BIND_SERVICE, please see https://github.com/nginx/kubernetes-ingress/blob/main/charts/nginx-ingress/templates/controller-deployment.yaml#L105-L118.
User is free to override securityContext using values file, also seccompProfile defaults to RuntimeDefault in podSecurityContext

@atombrella
Copy link
Author

We have added this in our values-file. It's meant as a suggestion, as I don't know how many people that'd actively set this value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal An issue that proposes a feature request
Projects
Status: Todo ☑
Development

No branches or pull requests

2 participants