-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Please redesign the docker container #663
Comments
Hello, you seem to know what to do. Please submit a pull request for your changes. You know this is open source, any help is appreciated and welcome. |
While testing the Docker images for the project today, I explored the idea of dropping privileges within these images. During this review, I found that both the Alpine- and Debian-based images are already configured to use an unprivileged user by default. Given this configuration, no further adjustments are needed to meet our security goals. I’ll go ahead and close this issue accordingly. However, please feel free to reopen it if you see things differently or have additional concerns. |
@sstidl I tried running the image in kubernetes, with a very strict admission policy, which drops all capabilities, enforces a given UID, and wants a completely readonlyRootFS. What I found was that readonlyRootFS is not possible, because it creates a file in /var/www/html: What actually breaks the restricted-policy however, is chown:
Also, it does require running as root, at least if you change the listen-port - but that's something you have to do if you don't want to run as root anyway.
Not sure how this fits into the review you did, or what you think about this? :-) |
I started with a fork to implement this, but I need some clarification before I want to proceed - I opened #682 |
Description
I would like to run librespeed in a more secure environment, namely without the container requiring root permissions, and with a read-only rootfs where optimally only a tmp directory is mounted as a writeable volume for the upload test files and similar temporarily needed files
Why it should be implemented
Securitywise it is really bad to run this container as root, and the main apache process inside of it aswell, then let apache drop privileges and run the main app inside of it as a user (this is not a VM)
Please conside running it rootless and dont try to chmod stuff in this case.
Securitywise it also is best practice to not have the whole rootfs writeable
both in combination is just bad alltogether, especially when data from the client is used for the upload tests, one security vulnerability related to the upload speed test will open all the gates to remote shells and other bad actors.
The text was updated successfully, but these errors were encountered: