Skip to content

feat(release-images): rebuild images when a fresh build fixes vulnerabilities - #28

Merged
ChiragAgg5k merged 1 commit into
mainfrom
feat-cve-rebuild
Nov 13, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
feat-cve-rebuild

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Adds a rebuild job matrix to release-images (daily 08:00 UTC, after the Renovate release job). Per image repository:

  1. Skip if the latest version tag's image isn't published yet (a release from earlier today still building).
  2. Scan the published image with Trivy 0.76.1 (pinned by digest): fixable HIGH/CRITICAL only, counted as unique (CVE, package).
  3. If that's non-zero, build default-branch HEAD (--pull --no-cache, linux/amd64) and scan it.
  4. Release the next patch version at HEAD only when HEAD has strictly fewer findings. Equal or more = "rebuild does not help" (needs a newer base), which also prevents release loops.

The app token is minted only after the build, scoped to the one repository with contents: write. dryRun covers the new jobs. Counts and decisions go to the run summary.

Repository Published image Notes
appwrite/docker-browser appwrite/browser
appwrite/docker-geo appwrite/geo needs appwrite/docker-geo#21
appwrite/docker-base appwrite/base --target final
appwrite/docker-postgres appwrite/postgres PG 18 (default tag)
appwrite/embedding appwrite/embedding
appwrite/exiftool ghcr.io/appwrite/exiftool
appwrite/autogravity ghcr.io/appwrite/autogravity
appwrite/grafana-oncall ghcr.io/appwrite/grafana-oncall engine/, --target prod; pushes a v* tag because publish.yml creates the release itself
open-runtimes/executor openruntimes/executor needs open-runtimes/executor#277
utopia-php/docker-base appwrite/utopia-base:php-8.5-* a release promotes the main-commit image, so it scans php-8.5-<head sha> instead of building; needs utopia-php/docker-base#24

Local check: appwrite/geo:0.3.8 has 38 fixable findings (all libpq); a no-cache build of docker-geo#21 has 0.

Related: appwrite-labs/cloud#6671

…bilities

Distro package fixes reach an image only through a rebuild, and nothing triggered one while the base digest stayed put, so image repositories needed a hand release. Releasing only when the fresh build has strictly fewer fixable findings keeps a fix that needs a newer base from looping.
@appwrite

appwrite Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

Documents the rebuild process and repository enrollment requirements.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 3
File Change
.github/scripts/rebuild-images.sh Resolves image refs and versions, counts Trivy findings, and creates the release or tag.
.github/workflows/release-images.yml Adds per-repository scan/build/decision jobs and scopes the release token to the target repository.
README.md Documents vulnerability-driven image rebuilds and how to enroll repositories.
🔇 Filtered out · 1

Findings Hansi considered but did not post.

Finding Why
Distinguish missing images from registry errors Verifier: This is a robustness nit. A failed inspect skips the repo and the next scheduled run retries it, so nothing breaks. Telling a missing image apart from a registry error would mean parsing buildx stderr, which is brittle. The only cost is a misleading summary label.

Reviewed 811cef4 · 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 d8c0f5a into main Nov 13, 2026
2 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the feat-cve-rebuild branch November 13, 2026 14:25
@ChiragAgg5k ChiragAgg5k self-assigned this Nov 16, 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