From 329563f4b9f8bf202e9022d86cf2422995e860d2 Mon Sep 17 00:00:00 2001 From: Username Date: Tue, 20 Jan 2026 08:23:53 +0100 Subject: [PATCH] containerfile: force reinstall jaraco.context to fix GHSA-58pv --- Containerfile.slim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Containerfile.slim b/Containerfile.slim index d8c2117..be173b5 100644 --- a/Containerfile.slim +++ b/Containerfile.slim @@ -20,7 +20,8 @@ RUN pip install --no-cache-dir --upgrade "pip>=25.3" wheel # Install Python dependencies (includes security pins from requirements.txt) COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt gunicorn +RUN pip install --no-cache-dir -r requirements.txt gunicorn && \ + pip install --no-cache-dir --force-reinstall "jaraco.context>=6.1.0" # Stage 2: Alpine runtime (minimal) @@ -32,7 +33,9 @@ LABEL description="Minimal secure pastebin REST API (Alpine)" # Apply security fixes to base image (versions from requirements.txt) COPY requirements.txt /tmp/ RUN pip install --no-cache-dir --upgrade pip && \ - pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt + pip install --no-cache-dir -r /tmp/requirements.txt && \ + pip install --no-cache-dir --force-reinstall "jaraco.context>=6.1.0" && \ + rm /tmp/requirements.txt # Create non-root user RUN addgroup -g 65532 -S flaskpaste && adduser -u 65532 -S -G flaskpaste flaskpaste