Clear Docker image CVEs: drop gosu and setuptools - #32
Merged
Conversation
The published image flagged Go stdlib CVEs (from the static gosu binary) and jaraco.context (vendored inside setuptools). Neither is used at runtime. - Replace gosu with setpriv (util-linux, already in the base image) for the root->proxui privilege drop in the entrypoint — no Go binary, no Go CVEs. - pip-uninstall pip and setuptools after installing requirements, removing the vendored jaraco.context and shrinking the runtime attack surface. Verified on a fresh build: image builds, serves HTTP 200, /app/data owned by proxui, PID1 runs as uid 1000, and no Go binaries or jaraco remain.
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
Clears the vulnerability-scanner findings on the published Docker image. Neither source is used by ProxUI at runtime:
golang/stdlibset) came fromgosu, a static Go binary the Dockerfile installed to drop root→proxuiin the entrypoint. Scanners read the Go stdlib version compiled into it and flag every Go CVE, even though gosu (a setuid+exec helper) never runs the vulnerable code paths.jaraco.context(CVE-2026-23949) is vendored insidesetuptools, which ships in thepython:3.11-slimbase — not a runtime dependency.Changes
entrypoint.sh:gosu proxui→setpriv --reuid proxui --regid proxui --init-groups(util-linux, already in the base image). No Go binary.Dockerfile: dropgosufrom the apt install (keepcurlfor the healthcheck);pip uninstall -y pip setuptoolsafter installing requirements (removes vendored jaraco.context, shrinks attack surface).Verification (fresh local build)
gosugone,setprivpresent,setuptoolsgone,jaracogone, no Go binaries remain.HTTP 200,/app/dataowned byproxui, and PID 1 (the app) runs as uid 1000 (proxui) — privilege drop verified.Note
The CVEs live in the already-published
v0.8.0/latest/testingimages; they clear only once the image is rebuilt and republished from this change.