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

Critical security flaw: User should not be root when the Dockerfile completes #876

Closed
philipjonsen opened this issue Sep 22, 2023 · 0 comments

Comments

@philipjonsen
Copy link

DESCRIPTION:

Switching to the root USER opens up certain security risks if an attacker gets access to the container. In order to mitigate this, switch back to a non privileged user after running the commands you need as root.

BAD PRACTICE:

FROM debian:buster
USER root
RUN ...

RECOMMENDED:

FROM debian:buster
USER root
RUN ...
USER guest

Last USER should not be root on these places:

hive/blob/master/clients/besu/Dockerfile#L6-L6
hive/blob/master/clients/openethereum/Dockerfile#L11-L11
hive/blob/master/clients/teku-vc/Dockerfile#L6-L6

@fjl fjl closed this as completed Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants