Repository navigation
fix: rebuild with patched packages and Go - #6
Merged
Merged
Conversation
The upstream postgres image ships gosu 1.20 built with Go 1.24.6, which Trivy flags for 26 stdlib CVEs. Build gosu from its 1.20 tag with Go 1.27.4 instead. Debian package fixes come from rebuilding on the current postgres base with the existing apt-get upgrade.
🟢 Tier S · Ready to merge
The Dockerfile now builds gosu 1.20 from source with Go 1.27.4 for the requested target architecture and installs it into the PostgreSQL image. The image then verifies the replacement binary before upgrading and installing its PostgreSQL packages.
📂 Walkthrough · 1
Reviewed |
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.
The published images carry Debian packages behind their security updates and a
gosubuilt with Go 1.24.6. The helm chart reports 222 open high/critical Trivy findings againstappwrite/postgres:0.1.0.gosu1.20 from its tag with Go 1.27.4 (cross-compiled on the build platform) instead of using the upstream binary, which deliberately stays on Go 1.24.6.postgres:<major>base plus the existingapt-get upgrade. Entrypoint, user and extensions are unchanged.trivy image --severity HIGH,CRITICAL --ignore-unfixed --scanners vuln, linux/amd64, PG 18:gosu(v1.24.6)tests/verify.shpasses for PG 17 and 18 in CI and locally for 18;gosu --versionreports1.20 (go1.27.4 on linux/amd64; gc).Related: appwrite-labs/cloud#6671