Skip to content

Commit 8754c45

Browse files
fix: Vulnerability scans (#12)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9e85624 commit 8754c45

7 files changed

Lines changed: 986 additions & 946 deletions

File tree

.dockleconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# This file is allows you to specify a list of files that is acceptable to Dockle
1+
# This file allows you to specify a list of files that is acceptable to Dockle
2+
# Use this file for overrides that should affect every app in the repository (currently one, our API)
3+
# For overrides specific to a particular app, use that app's .dockleconfig
24
# To allow multiple files, use a list of names, example below. Make sure to remove the leading #
3-
# DOCKLE_ACCEPT_FILES="file1,path/to/file2,file3/path,etc"
4-
# https://github.com/goodwithtech/dockle#accept-suspicious-environment-variables--files--file-extensions
5-
6-
DOCKLE_ACCEPT_FILES="app/.venv/lib/python3.12/site-packages/hayhooks/settings.py,app/.venv/lib/python3.12/site-packages/phoenix/otel/settings.py"
5+
# DOCKLE_ACCEPT_FILES=file1,path/to/file2,file3/path,etc
6+
# https://github.com/goodwithtech/dockle#accept-suspicious-environment-variables--files--file-extensions

.github/workflows/vulnerability-scans.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ jobs:
149149
if grep -q "^DOCKLE_ACCEPT_FILES=.*" ${{ steps.dockle-config.outputs.found_file }}; then
150150
grep -s '^DOCKLE_ACCEPT_FILES=' ${{ steps.dockle-config.outputs.found_file }} >> "$GITHUB_ENV"
151151
fi
152+
if grep -q "^DOCKLE_IGNORES=.*" ${{ steps.dockle-config.outputs.found_file }}; then
153+
grep -s '^DOCKLE_IGNORES=' ${{ steps.dockle-config.outputs.found_file }} >> "$GITHUB_ENV"
154+
fi
152155
153156
- name: Run Dockle container linter
154157
uses: erzz/dockle-action@v1.3.1

.grype.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ ignore:
1818
- fix-state: unknown
1919
# https://github.com/anchore/grype/issues/1172
2020
- vulnerability: GHSA-xqr8-7jwr-rhp7
21+
# These have been backported to Python 3.12.11, but not yet
22+
# updated in the grype database
23+
# See: https://security.snyk.io/package/linux/chainguard:latest/python-3.12
24+
- vulnerability: CVE-2025-8194
25+
- vulnerability: CVE-2025-6069

app/.dockleconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# This file is allows you to specify a list of files that is acceptable to Dockle
1+
# This file allows you to specify a list of files that is acceptable to Dockle
22
# To allow multiple files, use a list of names, example below. Make sure to remove the leading #
3-
# DOCKLE_ACCEPT_FILES="file1,path/to/file2,file3/path,etc"
3+
# DOCKLE_ACCEPT_FILES=file1,path/to/file2,file3/path,etc
44
# https://github.com/goodwithtech/dockle#accept-suspicious-environment-variables--files--file-extensions
5-
# DOCKLE_ACCEPT_FILES="file1,path/to/file2,file3/path,etc"
65

76
# Hayhooks has an out of the box example and it uses a settings file, we don't need or use it but need to ignore it
8-
DOCKLE_ACCEPT_FILES="app/.venv/lib/python3.12/site-packages/hayhooks/settings.py,app/.venv/lib/python3.12/site-packages/phoenix/otel/settings.py"
7+
DOCKLE_ACCEPT_FILES=app/.venv/lib/python3.12/site-packages/hayhooks/settings.py,app/.venv/lib/python3.12/site-packages/phoenix/otel/settings.py
8+
9+
# python:3.12-slim doesn't clear package caches after apt-get install; we do so in our own Dockerfile
10+
DOCKLE_IGNORES=DKL-DI-0005

app/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ RUN apt-get update \
1616
# https://pythonspeed.com/articles/security-updates-in-docker/
1717
&& apt-get upgrade --yes \
1818
&& apt-get install --no-install-recommends --yes \
19-
# build-essential \
20-
# libpq-dev \
21-
# postgresql \
22-
# wget \
2319
# Reduce the image size by clear apt cached lists
2420
# Complies with https://github.com/codacy/codacy-hadolint/blob/master/codacy-hadolint/docs/description/DL3009.md
2521
&& rm -rf /var/lib/apt/lists \
2622
&& rm -f /etc/ssl/private/ssl-cert-snakeoil.key
2723

24+
# The system version of this library in python:3.12-slim contains
25+
# a vulnerability, so upgrade it
26+
RUN pip install --no-cache-dir --upgrade urllib3==2.5.0
27+
2828
ARG RUN_UID
2929
ARG RUN_USER
3030

0 commit comments

Comments
 (0)