Skip to content

update-module does not refresh dependency images rebuilt upstream under the same tag #6239

Open

Description

@jorgegv

Steps to reproduce

  • Install a module whose org.nethserver.images label references a third-party tag, e.g. ghcr.io/nethserver/roundcubemail:2.2.2 → docker.io/mariadb:10.11.19 docker.io/roundcube/roundcubemail:1.7.5-apache
  • Wait for upstream to rebuild that tag in place. Docker Hub official images are routinely rebuilt under the same version tag when their base OS gets security fixes: mariadb:10.11.19 was rebuilt on 2026-10-27, roundcube/roundcubemail:1.7.5-apache on 2026-11-09
  • Update the module (UI, or api-cli run update-module with the same or a newer module_url that keeps the same dependency tags)
  • Compare the local digest with the one the tag resolves to now:
    • runagent -m roundcubemail2 podman image inspect --format '{{.RepoDigests}}' docker.io/mariadb:10.11.19
    • curl -s https://hub.docker.com/v2/repositories/library/mariadb/tags/10.11.19 | jq '.images[] | select(.architecture=="amd64") | .digest'

Expected behavior

An update leaves the module running the image its tag currently resolves to, so upstream security rebuilds are delivered by the normal update path. Alternatively, if tags are meant to be immutable for reproducibility, org.nethserver.images pins them by digest, so every installation of a given module version runs identical bits.

Actual behavior

The rebuilt image is never fetched:

  • update-module/05pullimages exits early with "The module URL ... is already installed" when module_url equals IMAGE_URL.
  • Even with a new module release, the dependency images are fetched with podman-pull-missing, which pulls only when no local image has that tag. A same-tag rebuild is skipped.
  • Only "force": true runs a plain podman pull. Nothing in the UI or in apply-updates reports that a forced update would change anything.

Observed on a node with roundcubemail 2.2.2:

Image Local digest (amd64) Tag now resolves to (amd64)
docker.io/mariadb:10.11.19 sha256:ab2006938ed3… (built 2026-08-24) sha256:6c65a843396d…
docker.io/roundcube/roundcubemail:1.7.5-apache sha256:330fcb9bdce1… (built 2026-10-21) sha256:cbc4ffe3f9cd…

This has a security impact. A Trivy scan of the local roundcubemail:1.7.5-apache shows 3 CRITICAL findings; the current upstream image under the same tag has 1. The fixes for libbrotli1 (1.1.0-2+deb13u1) and linux-libc-dev (6.12.115-2) were published, but an up-to-date NS8 node does not receive them.

It also makes "same module version" ambiguous: a fresh install today pulls the new digest, while an existing install of the same version keeps the old one indefinitely.

Possible fixes:

  1. Pin org.nethserver.images by digest (image:tag@sha256:…), so installs are reproducible and image refreshes ship as module releases.
  2. Or have update-module / apply-updates compare local and remote digests, and treat a difference as an available update.
  3. Or at least expose an "update images" action in the UI that runs the forced path.

Components

  • NethServer 8 core ghcr.io/nethserver/core:3.25.0, Rocky Linux 9.8
  • Module ghcr.io/nethserver/roundcubemail:2.2.2, but the logic is in core (/usr/local/agent/actions/update-module/05pullimages, /usr/local/agent/bin/podman-pull-missing), so every module with org.nethserver.images is affected

See also


Found by an external image-drift check comparing running image digests with their tags' current registry digests.

Activity

  1. added
    bug
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions