Skip to content

Commit 172a1ab

Browse files
fix(ci): apply security patches in production image build
Debian 13 (trixie) base has fixable high-severity CVEs. Adding apt-get upgrade after apt-get update to apply all available security patches at build time, so grype --only-fixed finds no remaining fixable vulns. Reverts the bookworm switch (grype flagged bookworm as EOL).
1 parent 03f8bf9 commit 172a1ab

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Engraphis — self-hosted AI memory engine. Local-first; you bring the LLM.
2-
FROM python:3.11-slim-bookworm@sha256:2e32f7d302adc1c37428355c1e646897c0c53f4fd60b6a551245fb90ee129f91 AS base
2+
FROM python:3.11-slim@sha256:a630a63cdb314e2d138a2fca3e375e319e8568346ffafac5b980f888630ac4f1 AS base
33

44
# ENGRAPHIS_HOST is deliberately NOT set here: docker-entrypoint.sh chooses IPv6 for a
55
# Railway deployment (which injects RAILWAY_SERVICE_NAME) and 0.0.0.0 for ordinary Docker.
@@ -25,6 +25,7 @@ WORKDIR /app
2525
# gosu lets the entrypoint drop from root to the non-root app user after fixing volume
2626
# permissions (see docker-entrypoint.sh). Installed here for good layer caching.
2727
RUN apt-get update \
28+
&& apt-get upgrade -y --no-install-recommends \
2829
&& apt-get install -y --no-install-recommends gosu tesseract-ocr \
2930
&& rm -rf /var/lib/apt/lists/*
3031

‎tests/test_release_infrastructure.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ def test_ci_and_release_audit_production_image_dependencies():
198198
assert "tesseract-ocr" in _text("Dockerfile")
199199
assert (
200200
_text("Dockerfile").splitlines()[1]
201-
== "FROM python:3.11-slim-bookworm@sha256:"
202-
"2e32f7d302adc1c37428355c1e646897c0c53f4fd60b6a551245fb90ee129f91 AS base"
201+
== "FROM python:3.11-slim@sha256:"
202+
"a630a63cdb314e2d138a2fca3e375e319e8568346ffafac5b980f888630ac4f1 AS base"
203203
)
204204
assert "Verify production image OCR runtime" in ci
205205
assert "Verify production image OCR runtime" in release

0 commit comments

Comments
 (0)