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

Docker Security: Run Container as a Non-Root User #2226

Open
shotgunner opened this issue Feb 19, 2025 · 0 comments
Open

Docker Security: Run Container as a Non-Root User #2226

shotgunner opened this issue Feb 19, 2025 · 0 comments

Comments

@shotgunner
Copy link

🚀 The feature

I am going to using crewai-tools in my program, and one of the dependencies are related to this repo. so I get this security errors from trivy-scanner while I am going to create new image based on it:

usr/local/lib/python3.10/site-packages/crewai_tools/tools/code_interpreter_tool/Dockerfile (dockerfile)
=======================================================================================================
Tests: 20 (SUCCESSES: 19, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)

HIGH: Specify at least 1 USER command in Dockerfile with non-root user as argument
════════════════════════════════════════
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.

See https://avd.aquasec.com/misconfig/ds002
────────────────────────────────────────



usr/local/lib/python3.10/site-packages/embedchain/deployment/fly.io/Dockerfile (dockerfile)
===========================================================================================
Tests: 20 (SUCCESSES: 19, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)

HIGH: Specify at least 1 USER command in Dockerfile with non-root user as argument
════════════════════════════════════════
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.

See https://avd.aquasec.com/misconfig/ds002
────────────────────────────────────────

I think we should use non-root user for Dockerfile. I also created a PR to resolve this issue please help me to merge it if it is ok

Motivation, pitch

PR to resolve the issue: #2224

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

1 participant