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

Semgrep complaining about Dockerfile #147

Open
davorrunje opened this issue Oct 28, 2024 · 0 comments
Open

Semgrep complaining about Dockerfile #147

davorrunje opened this issue Oct 28, 2024 · 0 comments
Assignees

Comments

@davorrunje
Copy link
Contributor

semgrep==1.90.0

happened in the google-sheets repo but we will probably have this in multiple repos


Dockerfile

❯❯❱ dockerfile.security.missing-user-entrypoint.missing-user-entrypoint
By not specifying a USER, a program in the container may run as 'root'.
This is a security hazard. If an attacker can control a process running as
root, they may have control over the container. Ensure that the last USER
in a Dockerfile is a USER other than 'root'.
Details: https://sg.run/k281

       ▶▶┆ Autofix ▶ USER non-root ENTRYPOINT []
       31┆ ENTRYPOINT []

❯❯❱ dockerfile.security.missing-user.missing-user
By not specifying a USER, a program in the container may run as 'root'.
This is a security hazard. If an attacker can control a process running as
root, they may have control over the container. Ensure that the last USER
in a Dockerfile is a USER other than 'root'.
Details: https://sg.run/Gbvn

       ▶▶┆ Autofix ▶ USER non-root CMD [ "/usr/bin/bash", "-c", "./run_server.sh" ]
       32┆ CMD [ "/usr/bin/bash", "-c", "./run_server.sh" ]
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

3 participants