Skip to content

Commit 75d0c10

Browse files
authored
chore(cves) Fixes for latest CVEs (#7003)
* [alibi-detect-server] Fixing SNYK-PYTHON-URLLIB3-14192442 CVE * Skip few job in CI to save resources * Upgrade urrlib3 in alibi-explain-server component * Remove spacy tests to eliminate the CVE-2024-6345 vulnerability in setuptools dependency * Pin urllib3 in mlflowserver to get rid of CVE-2025-66471 * pin urllib3 for `tfserving_proxy` * Print deps tree to debug * Fix broken workflow after adding another `if` * Pin setuptools again to check deps tree * Try to manually add snyk ignore * Fix `--policy-path` arg * Try `--exclude-base-image-vulns` arg as well * Add pip freeze for server images * Make .snyk `ignore` section more specific * Enable all jobs in the python security tests * Upgrade tornado minor version in alibi-explain, alibi-detect * pin setuptools to exact version in tfserving_proxy
1 parent c521b3d commit 75d0c10

File tree

9 files changed

+54
-38
lines changed

9 files changed

+54
-38
lines changed

.github/workflows/security_tests_python_v1.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ jobs:
148148
export SERVER_IMAGE_TAG="sec-tests/${{ matrix.server }}-$(date +%s)-$(openssl rand -hex 4)"
149149
echo "SERVER_IMAGE_TAG=$SERVER_IMAGE_TAG" >> $GITHUB_ENV
150150
make IMAGE_NAME=$SERVER_IMAGE_TAG VERSION=test BASE_IMAGE=${{ needs.build-upload-scan-base-images.outputs.python_base_image_tag }}:test docker-build
151+
152+
- name: Capture pip freeze
153+
run: |
154+
docker run --rm $SERVER_IMAGE_TAG:test pip freeze > pip-freeze-${{ matrix.server }}.txt
155+
151156
- name: Scan
152157
id: scan
153158
uses: snyk/actions/docker@master
@@ -166,6 +171,12 @@ jobs:
166171
with:
167172
name: report-${{ matrix.server }}
168173
path: report-${{ matrix.server }}.txt
174+
175+
- name: Upload pip freeze
176+
uses: actions/upload-artifact@v4
177+
with:
178+
name: pip-freeze-${{ matrix.server }}
179+
path: pip-freeze-${{ matrix.server }}.txt
169180

170181
build-alibi-explain:
171182
needs: build-upload-scan-base-images

components/alibi-detect-server/poetry.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/alibi-detect-server/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ scikit-learn = "1.7.2"
1717
elasticsearch = "7.9.1"
1818

1919
sh = "^1.14.2"
20-
tornado = "^6.1"
20+
tornado = "^6.5.3"
2121
protobuf = "^5.29.1"
2222

2323
google-cloud-core = "1.4.1"

components/alibi-explain-server/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ RUN cp ./licenses/* /licenses
5252
# Install python spacy model to avoid issues in airgapped envs
5353
RUN python -m spacy download en_core_web_md
5454

55+
# Remove spacy tests to eliminate the CVE-2024-6345 vulnerability in setuptools dependency
56+
RUN rm -rf /opt/conda/lib/python3.12/site-packages/spacy/tests/
5557

5658
# Copy rest of the package
5759
COPY alibiexplainer alibiexplainer

components/alibi-explain-server/poetry.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/alibi-explain-server/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ transformers = "^4.53.0"
2020
catboost = "^1.2.8"
2121
tf-keras = "2.18.0"
2222

23-
tornado = "6.5.2"
23+
tornado = "6.5.3"
2424
protobuf = "5.29.5"
2525
joblib = "1.2.0"
2626
requests = "^2.32.5"
27-
urllib3 = "^2.5.0"
27+
urllib3 = "^2.6.0"
2828
jinja2 = "^3.1.6"
2929
werkzeug = "^3.1.3"
3030
pillow = "^10.4.0"

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"cryptography>=46.0.3",
4141
"pyyaml>=6.0.3",
4242
"click>=8.3.0",
43-
"urllib3>=2.5.0",
43+
"urllib3>=2.6.0",
4444
],
4545
extras_require=extras,
4646
entry_points={

servers/mlflowserver/mlflowserver/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PyYAML >= 6.0.3, < 7.0.0 # Python 3.12 compatiblity + CVE
22
requests >= 2.32.5
3+
urllib3 >= 2.6.0
34
pandas >= 2.3.3
45

56
# CVE-2023-47248, CVE-2023-6753, CVE-2023-6709

servers/tfserving_proxy/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ tensorflow-serving-api>=1.10.1
33
grpcio>=1.32.0 # Required for https://github.com/SeldonIO/seldon-core/issues/2787
44
grpcio-reflection>=1.32.0 # Required for https://github.com/SeldonIO/seldon-core/issues/2787
55
requests
6+
urllib3>=2.6.0
7+
setuptools==78.1.1

0 commit comments

Comments
 (0)