Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

fix: patch base-image OS packages flagged by Trivy (12 CVEs) (#1604)

Kaif440014b59d5e
diff --git a/Dockerfile b/Dockerfile
index a41a953b..ea3a0e44 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -41,6 +41,30 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
WORKDIR /app
+# Debian trixie-security already ships fixed builds for these base-image OS
+# packages (Trivy library/semantica alerts #6151-#6162, all CVE-2026-*):
+# perl-base (7 CVEs across perl core, Storable, Archive::Tar and IO::Compress
+# - all fixed by the same upstream perl source upload), libpcre2-8-0 (2 CVEs),
+# libsqlite3-0 (2 CVEs, FTS5), and gzip (1 CVE, LZH decompression).
+#
+# --only-upgrade scopes this to just the 4 named packages instead of a
+# blanket `apt-get upgrade` (terrascan AC_DOCKER_0052, see the OpenSSL note
+# above), but deliberately WITHOUT a `pkg=version` pin like the setuptools
+# pin below: unlike PyPI, Debian's live mirrors only ever serve the current
+# point release of a package, not every historical one. A pin to today's
+# fixed version (e.g. perl-base=5.40.1-6+deb13u1) would 404 the day Debian
+# ships deb13u2 and break every build that hits this layer - CI, Cloud
+# Build, and local Compose alike. Leaving the version unpinned means apt
+# always resolves to whatever trixie-security currently has, which is
+# guaranteed >= today's fixed version since security repos never regress.
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends --only-upgrade \
+ perl-base \
+ libpcre2-8-0 \
+ libsqlite3-0 \
+ gzip \
+ && rm -rf /var/lib/apt/lists/*
+
RUN groupadd --system semantica \
&& useradd --system --gid semantica --home-dir /app --shell /usr/sbin/nologin semantica