Skip to content

fix: rebuild with patched packages and Go - #6

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/image-cves
Nov 11, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/image-cves

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

The published images carry Debian packages behind their security updates and a gosu built with Go 1.24.6. The helm chart reports 222 open high/critical Trivy findings against appwrite/postgres:0.1.0.

  • Build gosu 1.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.
  • Debian fixes come from rebuilding on the current postgres:<major> base plus the existing apt-get upgrade. Entrypoint, user and extensions are unchanged.

trivy image --severity HIGH,CRITICAL --ignore-unfixed --scanners vuln, linux/amd64, PG 18:

Package group 0.1.0 0.2.0 this PR
Go stdlib in gosu (v1.24.6) 26 26 0
Debian 13 packages (libheif, perl, util-linux, expat, curl, openssl, pcre2, …) 196 153 0
Total 222 179 0

tests/verify.sh passes for PG 17 and 18 in CI and locally for 18; gosu --version reports 1.20 (go1.27.4 on linux/amd64; gc).

Related: appwrite-labs/cloud#6671

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.
@appwrite

appwrite Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The cross-compilation matches the published amd64 and arm64 targets, and the replacement gosu is exercised during the image build.

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.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
Dockerfile Adds a cross-compiled gosu build stage and replaces the base image's gosu before the package upgrade.

Reviewed e9c36a5 · Details · Comment @appwrite review to re-run, or mention @appwrite with a question.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit f3e36d8 into main Nov 11, 2026
3 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/image-cves branch November 11, 2026 13:46
@ChiragAgg5k ChiragAgg5k self-assigned this Nov 12, 2026
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