Dropped access to unnecessary kernel capabilities in docker compose - #779
Open
JValtteri wants to merge 1 commit into
Open
Dropped access to unnecessary kernel capabilities in docker compose#779JValtteri wants to merge 1 commit into
JValtteri wants to merge 1 commit into
Conversation
In this configuration, all capabilities are first removed, then only the necessary capabilities are reintroduced. Allowed capabilities: - sys_nice # adjusting process priority (I assume) - CHOWN # changing file ownership - SETUID # allows changing user - SETGID # allows changing user group - KILL # allows killing processes This set of necessary capabilities were found with manual testings, including starting, playing and stopping the server. With this set no errors were observed. If someone were to use privileged ports (<1024) for some reason, they'd also need - NET_BIND_SERVICE Capability `SYS_MODULE` is explicitly removed. Though listing it after `ALL` is redundant, it's there as a safeguard in case anyone removes `ALL` for any reason. `SYS_MODULE` is considered a high risk capability in containers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this configuration, all capabilities are first removed, then only the necessary capabilities are reintroduced.
Allowed capabilities:
This set of necessary capabilities were found with manual testings, including starting, playing and stopping the server. With this set no errors were observed.
If someone were to use privileged ports (<1024) for some reason, they'd also need
Capability
SYS_MODULEis explicitly removed. Though listing it afterALLis redundant, it's there as a safeguard in case anyone removesALLfor any reason.SYS_MODULEis considered a high risk capability in containers.