Skip to content

Replace gosu with setpriv to eliminate Go stdlib CVEs and upgrade base deps to avoid further vulns#144

Merged
tomakehurst merged 3 commits intomainfrom
replace-gosu-with-setpriv
Mar 11, 2026
Merged

Replace gosu with setpriv to eliminate Go stdlib CVEs and upgrade base deps to avoid further vulns#144
tomakehurst merged 3 commits intomainfrom
replace-gosu-with-setpriv

Conversation

@tomakehurst
Copy link
Copy Markdown
Member

@tomakehurst tomakehurst commented Mar 11, 2026

gosu is a Go binary, so every Go stdlib CVE (e.g. CVE-2023-44487, CVE-2025-68121) gets flagged against it. Replace it with setpriv from util-linux, which is already present in Debian base images and provides the same privilege step-down functionality without the Go dependency.

This also fixes the uid= option on nightly builds where gosu was never installed.

Additionally now upgrades dependencies from base images to reduce the likelihood of CVEs from them.

References

#137 (comment)

tomakehurst and others added 3 commits March 11, 2026 10:27
gosu is a Go binary, so every Go stdlib CVE (e.g. CVE-2023-44487,
CVE-2025-68121) gets flagged against it. Replace it with setpriv from
util-linux, which is already present in Debian base images and provides
the same privilege step-down functionality without the Go dependency.

This also fixes the uid= option on nightly builds where gosu was never
installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add apk upgrade to pull latest package versions, fixing 6 high-severity
vulnerabilities (openssl, libpng, gnupg, expat) flagged by Snyk. Also
removes su-exec which is no longer used since switching to setpriv.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tomakehurst tomakehurst changed the title Replace gosu with setpriv to eliminate Go stdlib CVEs Replace gosu with setpriv to eliminate Go stdlib CVEs and upgrade base deps to avoid further vulns Mar 11, 2026
@tomakehurst tomakehurst merged commit abb84f3 into main Mar 11, 2026
4 checks passed
@tomakehurst tomakehurst deleted the replace-gosu-with-setpriv branch March 11, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant