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

Update UID and GID to 10001 (>10000) #149

Closed
yossicohn opened this issue Jun 25, 2023 · 2 comments
Closed

Update UID and GID to 10001 (>10000) #149

yossicohn opened this issue Jun 25, 2023 · 2 comments
Labels
wontfix This will not be worked on

Comments

@yossicohn
Copy link

Is your feature request related to a problem?

https://kubesec.io
Run as a high-UID user to avoid conflicts with the host’s user table

UIDs below 10,000 are a security risk on several systems, because if someone does manage to escalate privileges outside the Docker container their Docker container UID may overlap with a more privileged system user's UID granting them additional permissions.
For best security, always run your processes as a UID above 10,000. ...

Describe the solution you'd like

set the Dockerefile UID/GID to 10001 instead of 101

Describe alternatives you've considered

N/A

Additional context

We would like to deploy this in k8s, and we need the image to have a UID>10000 for security reasons

I have a PR ready, would be happy to contribute

@alessfg
Copy link
Collaborator

alessfg commented Jun 26, 2023

Hi @yossicohn -- you can already change the UID by rebuilding the images and using the UID and GID build args https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/mainline/alpine-slim/Dockerfile#L14-L15

Changing the default values could become a breaking change for multiple production environments, and, in any case, you shouldn't really have to worry about overlapping UIDs in K8s environments https://kubernetes.io/docs/concepts/workloads/pods/user-namespaces/

@alessfg alessfg closed this as completed Jun 26, 2023
@yossicohn
Copy link
Author

@alessfg thanks a lot

@alessfg alessfg added the wontfix This will not be worked on label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants