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

Violation of Dockerfile best-practice: container run with root user #623

Open
vikstrom opened this issue Feb 26, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working high-priority

Comments

@vikstrom
Copy link

It's not recommended to run containers with root user. This can be a vector for container escapement. It's recommended to use non-root users.
This can be done by adding a USER statement to the Dockerfile. This issue is present in development and production, but the critical one is production.

This is extra important in this case since /proc appears to be mounted, although as read-only.
https://book.hacktricks.xyz/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation/sensitive-mounts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

No branches or pull requests

3 participants