fix(2.4.8): replace gosu with setpriv to clear 50 Go stdlib CVEs#226
Merged
Conversation
Ubuntu 24.04 ships gosu 1.17 compiled against Go stdlib 1.22.2, which carries 50 known CVEs (3 CRITICAL, 19 HIGH, 26 MEDIUM, 2 LOW) per Docker Scout. setpriv from util-linux is already in the base image, has no Go runtime, and is the upstream-recommended gosu alternative. entrypoint.sh privilege-drop flags match gosu defaults: --reuid=minuspod --regid=minuspod --init-groups --inh-caps=-all Mirrored across GPU Dockerfile, CPU Dockerfile, both docker-compose files, and README. The 2 remaining torch CVEs (local DoS, LOW + MED) need a torch 2.6.0 -> 2.8.0 bump and are tracked separately.
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.
Summary
Replaces
gosuwithsetpriv(fromutil-linux) inentrypoint.shand drops thegosupackage from both GPU and CPU images. Clears 50 of 52 vulnerabilities from the current Docker Scout report (3 CRITICAL, 19 HIGH, 26 MEDIUM, 2 LOW) — all from the Go stdlib 1.22.2 baked into Ubuntu 24.04'sgosu 1.17binary.Why setpriv
ubuntu:24.04andnvidia/cuda:12.9.1-runtime-ubuntu24.04).--reuid=minuspod+--regid=minuspod(setuid+setgid)--init-groups(supplementary groups from/etc/group)--inh-caps=-all(drop inheritable caps)What changed
entrypoint.sh:51—gosu minuspod gunicorn ...->setpriv --reuid=minuspod --regid=minuspod --init-groups --inh-caps=-all -- gunicorn ...Dockerfile+Dockerfile.cpu— removedgosufrom apt install, replacedgosu nobody truesmoke test with the setpriv equivalentdocker-compose.yml+docker-compose.cpu.yml+README.md— comment / docs syncRemaining CVEs
2 torch CVEs (local DoS, LOW + MEDIUM) require a torch 2.6.0 -> 2.8.0 upgrade. Tracked separately; deferred from this PR.
Test plan