[security] enforce process limits at a per-container level to avoid abusive clients impacting other instances

This commit is contained in:
Dane Everitt
2021-06-20 16:54:00 -07:00
parent c0063d2c61
commit e0078eee0a
3 changed files with 32 additions and 15 deletions

View File

@@ -55,6 +55,12 @@ type DockerConfiguration struct {
// utilizes host memory for this value, and that we do not keep track of the space used here
// so avoid allocating too much to a server.
TmpfsSize uint `default:"100" json:"tmpfs_size" yaml:"tmpfs_size"`
// ContainerPidLimit sets the total number of processes that can be active in a container
// at any given moment. This is a security concern in shared-hosting environments where a
// malicious process could create enough processes to cause the host node to run out of
// available pids and crash.
ContainerPidLimit int64 `default:"256" json:"container_pid_limit" yaml:"container_pid_limit"`
}
// RegistryConfiguration defines the authentication credentials for a given