containerfile: force reinstall jaraco.context to fix GHSA-58pv
Some checks failed
CI / Security Scan (push) Successful in 19s
CI / Lint & Format (push) Successful in 22s
CI / Advanced Security Tests (push) Successful in 16s
CI / Memory Leak Check (push) Successful in 20s
CI / Security Tests (push) Successful in 25s
CI / Unit Tests (push) Successful in 33s
CI / Fuzz Testing (push) Successful in 24s
CI / SBOM Generation (push) Successful in 20s
CI / Harbor Vulnerability Scan (push) Has been cancelled
CI / Build & Push Image (push) Has been cancelled
Some checks failed
CI / Security Scan (push) Successful in 19s
CI / Lint & Format (push) Successful in 22s
CI / Advanced Security Tests (push) Successful in 16s
CI / Memory Leak Check (push) Successful in 20s
CI / Security Tests (push) Successful in 25s
CI / Unit Tests (push) Successful in 33s
CI / Fuzz Testing (push) Successful in 24s
CI / SBOM Generation (push) Successful in 20s
CI / Harbor Vulnerability Scan (push) Has been cancelled
CI / Build & Push Image (push) Has been cancelled
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user