Skip to content

fix: upgrade Debian packages in the gateway image - #504

Merged
guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
guanzhousongmicrosoft:developer/gateway-image-upgrade-packages
Nov 10, 2026
Merged

guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
guanzhousongmicrosoft:developer/gateway-image-upgrade-packages

Conversation

@guanzhousongmicrosoft

@guanzhousongmicrosoft guanzhousongmicrosoft commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

The published gateway image is built on debian:trixie-slim, which still ships zlib1g 1:1.3.dfsg+really1.3.1-1+b1 with two fixable HIGH CVEs (CVE-2026-76844, CVE-2026-85091). The Dockerfile only installs packages, so docker build --pull doesn't pick up the fix: a gateway built from main today against documentdb-local:pg17-1.0.0 still scans with both.

With apt-get upgrade, the same build moves zlib1g from …-1+b1 to …-1+deb13u1 and trivy reports 0 fixable HIGH/CRITICAL, checked on amd64 and arm64.

Plan after this merges

The engine stays at 1.0.0 (extension 1.0-0); only the images are rebuilt on patched Debian.

  1. Build the engine images from main with version=1.0.0. The extension and combined images come out clean without a change; the gateway needs this PR, which is why it has to land first.
  2. Release that candidate as documentdb:1.0.1, gateway:1.0.1 and documentdb-combined:18-1.0.1, with update_defaults=false. The 1.0.0 tags are not touched: the pull policy is IfNotPresent, so nodes that cached 1.0.0 would never fetch a new digest, and the fix needs a new tag.
  3. Users on operator 1.1.1 then set documentDbVersion=1.0.1. Pods roll onto the new images with no schema step.

For maintainers to decide afterwards: a 1.1.2 that makes 1.0.1 the default, and a patched PostgreSQL image for ImageVolume clusters, since the CNPG default 18.3-system-trixie carries the same two zlib CVEs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the gateway image change to pick up available Debian security fixes.

No open issues 🎉

What changed in this PR

Updates the gateway image build to apply Debian package fixes that may not yet be included in the debian:trixie-slim base image.

Changes:

  • Runs apt-get upgrade before installing gateway dependencies.
  • Adds a comment explaining why the package upgrade is needed.
File Description
.github/​dockerfiles/​Dockerfile_gateway_public_image Upgrades installed Debian packages to pick up available security fixes.

Review effort: Balanced

debian:trixie-slim still ships zlib1g with two fixable HIGH CVEs
(CVE-2026-76844, CVE-2026-85091), and installing packages on top
does not pull the fix.

Signed-off-by: Guanzhou Song <[email protected]>
@guanzhousongmicrosoft
guanzhousongmicrosoft force-pushed the developer/gateway-image-upgrade-packages branch from 3c98fd9 to 5ef197c Compare November 10, 2026 14:56
@guanzhousongmicrosoft
guanzhousongmicrosoft merged commit 51e1f7a into documentdb:main Nov 10, 2026
1 check passed
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.

4 participants