Skip to content

Commit 6097d4a

Browse files
yeshsuryaYeshwanth Nagaraj
andauthored
[feat]: vulnerabilities for proj 24 and few training image batch 2 (#4960)
* [feat]: Fix image vulnerabilities * [feat]: fix forecasting gpu * [feat]: Resolve vulnerabilities on train and proj 24 images * Update Dockerfile to fix vulnerabilities and upgrade packages Removed onnx installation and upgraded several packages including onnx to version 1.21.0 to address vulnerabilities. * Remove unnecessary conda run command in tensorflow-2.16-cuda12 --------- Co-authored-by: Yeshwanth Nagaraj <ynagaraj@microsoft.com>
1 parent 95155e7 commit 6097d4a

23 files changed

Lines changed: 98 additions & 43 deletions

File tree

assets/training/automl/environments/ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ RUN pip install --no-cache-dir \
1818

1919
# onnx and onnxruntime-training installation
2020
RUN pip uninstall -y onnxruntime
21-
RUN pip install onnx==1.21.0
2221
RUN pip uninstall -y onnxruntime-training
2322
RUN pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ onnxruntime-training==1.18.0
2423

@@ -45,7 +44,8 @@ RUN pip install --upgrade 'pillow>=12.1.1'
4544
# setuptools vendors jaraco.context internally; >=82.0.1 bundles the patched version (GHSA-58pv-8j8x-9vj2)
4645
# Override onnx to fix GHSA-cmw6-hcpp-c6jp, GHSA-538c-55jv-c5g9, GHSA-q56x-g2fj-4rj6, GHSA-p433-9wv8-28xj, GHSA-3r9x-f23j-gc73, GHSA-hqmj-h5c6-369m
4746
# Root cause: azureml-automl-runtime==1.62.0 (latest) pins onnx<=1.17.0; cannot upgrade parent
48-
RUN pip install --upgrade 'wheel>=0.46.2' 'cryptography>=46.0.5' 'setuptools>=82.0.1' 'distributed>=2026.1.0' 'filelock>=3.20.3' 'bokeh>=3.8.2' 'protobuf>=6.33.5'
47+
RUN pip install --upgrade 'wheel>=0.46.2' 'cryptography>=46.0.5' 'setuptools>=82.0.1' 'distributed>=2026.1.0' 'filelock>=3.20.3' 'bokeh>=3.8.2' 'protobuf>=6.33.5' 'onnx>=1.21.0'
48+
4949

5050
# Vulnerability patches for ptca environment
5151
# pytest override: GHSA-6w46-j5rx-g56g — from ACPT base image ptca env; base image not yet patched

assets/training/automl/environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ RUN pip list && \
9797
# Root cause: azureml-automl-dnn-nlp==1.62.0 (latest) pins transformers==4.53.0; cannot upgrade parent
9898
RUN pip install --no-cache-dir --no-deps 'transformers[sentencepiece,torch]==5.5.4'
9999

100+
# Override transformers to fix GHSA-69w3-r845-3855
101+
# Root cause: azureml-automl-dnn-nlp==1.62.0 (latest) pins transformers==4.53.0; cannot upgrade parent
102+
RUN pip install --no-cache-dir --no-deps 'transformers[sentencepiece,torch]==5.5.4'
103+
100104

101105
# Upgrade starlette, urllib3, bokeh, PyNaCl & filelock
102106
# NOTE: azureml-mlflow~=1.62.0 pins cryptography<46.0.0; upgrading anyway for CVE fix

assets/training/finetune_acft_image/environments/acft_image_medimageinsight_adapter_finetune/context/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ RUN pip install -r requirements.txt --no-cache-dir
2020
# onnx: transitive dep of onnxruntime; parent uses onnx>=1.16.0; override needed (GHSA-p433-9wv8-28xj etc.)
2121
# fastmcp: GHSA-rww4-4w9c-7733, GHSA-m8x7-r2rg-vh5g, GHSA-vv7q-7jx5-f767; >=3.2.0 required
2222
# requests: transitive dep of azure-core/mlflow; parents use loose floors (GHSA-gc5v-m9x4-r6x2)
23-
RUN pip install --no-cache-dir --upgrade pip==26.0 wheel==0.46.2 protobuf==6.33.5 cryptography==46.0.7 pyasn1==0.6.3 pillow==12.1.1 'fastmcp>=3.2.0' 'requests>=2.33.0' 'aiohttp>=3.13.4' 'onnx>=1.21.0'
23+
# Mako: transitive dep (mlflow → alembic → Mako); alembic uses unpinned Mako, cannot force via parent
24+
# pytest: standalone test dep from base image; no parent to upgrade
25+
RUN pip install --no-cache-dir --upgrade pip==26.0 wheel==0.46.2 protobuf==6.33.5 cryptography==46.0.7 pyasn1==0.6.3 pillow==12.2.0 'fastmcp>=3.2.0' 'requests>=2.33.0' 'aiohttp>=3.13.4' 'onnx>=1.21.0' 'Mako>=1.3.11' 'pytest>=9.0.3'
2426
# pip install updates the binary but conda-meta still references old versions; conda install syncs both
2527
RUN conda install -n ptca -y pip>=26.0.1 wheel>=0.46.2
2628
# vulnerability in base conda env

assets/training/finetune_acft_image/environments/acft_image_medimageinsight_adapter_finetune/context/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ gdown~=5.2.0
1111
opencv-python~=4.10.0.84
1212
pydicom~=2.4.0
1313
pandas==2.2.3
14-
mlflow==3.10.1
14+
mlflow==3.11.1
1515
setuptools==82.0.0
1616
filelock>=3.20.1

assets/training/finetune_acft_image/environments/acft_image_medimageinsight_embedding/context/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ RUN pip install -r requirements.txt --no-cache-dir
1515
# protobuf is a transitive dep of mlflow-skinny/onnx; parents use loose floors (>=3.12.0), cannot force 6.33.5
1616
# mlflow 3.5.0 has CVEs (CVE-2025-14287, CVE-2026-2033, CVE-2026-2635); upgrade after requirements install
1717
# azureml-mlflow pins mlflow-skinny<=3.5.0, so mlflow must be upgraded separately to avoid resolution conflict
18-
RUN pip install --no-cache-dir mlflow==3.10.1
18+
# mlflow 3.11.1: GHSA-fh64-r2vc-xvhr requires >=3.11.1
19+
RUN pip install --no-cache-dir mlflow==3.11.1
1920
# pyasn1 is a transitive dep (mlflow → databricks-sdk → google-auth → pyasn1-modules → pyasn1);
2021
# parent packages use loose floors so pip resolves to 0.6.2 which has CVE-2026-30922; override to >=0.6.3
2122
# onnx: transitive dep of onnxruntime; parent uses onnx>=1.16.0; override needed (GHSA-p433-9wv8-28xj etc.)
2223
# fastmcp: GHSA-rww4-4w9c-7733, GHSA-m8x7-r2rg-vh5g, GHSA-vv7q-7jx5-f767; >=3.2.0 required
2324
# requests: transitive dep of azure-core/mlflow; parents use loose floors (GHSA-gc5v-m9x4-r6x2)
24-
RUN pip install --no-cache-dir --upgrade protobuf==6.33.5 cryptography==46.0.7 pyasn1==0.6.3 pillow==12.1.1 wheel>=0.46.2 'fastmcp>=3.2.0' 'onnx>=1.21.0' 'requests>=2.33.0'
25+
# pillow: GHSA-whj4-6x5x-4v2j requires >=12.2.0; direct dep override
26+
# Mako: GHSA-v92g-xgxw-vvmm requires >=1.3.11; transitive via alembic→mlflow, alembic has no version floor on Mako so override needed
27+
# pytest: GHSA-6w46-j5rx-g56g requires >=9.0.3; installed by base image, no parent to upgrade so override needed
28+
RUN pip install --no-cache-dir --upgrade protobuf==6.33.5 cryptography==46.0.7 pyasn1==0.6.3 pillow==12.2.0 wheel>=0.46.2 'fastmcp>=3.2.0' 'onnx>=1.21.0' 'requests>=2.33.0' 'Mako>=1.3.11' 'pytest>=9.0.3'
2529

2630
# pip install updates the binary but conda-meta still references old versions; conda install syncs both
2731
RUN conda install -y -n ptca pip>=26.0.1 wheel>=0.46.2

assets/training/finetune_acft_image/environments/acft_image_medimageinsight_embedding/context/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ timm==0.9.12
1212
numpy==1.22.2
1313
einops==0.8.1
1414
fvcore==0.1.5.post20221221
15-
transformers==4.53.0
15+
transformers==5.5.4
1616
sentencepiece==0.2.1
1717
ftfy==6.3.1
18-
regex==2024.11.6
18+
regex==2026.4.4
1919
vision-datasets==0.2.7
2020
tenacity==9.0.0
2121
requests>=2.33.0

assets/training/finetune_acft_image/environments/acft_image_medimageinsight_embedding_generator/context/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ RUN conda install -y -n ptca pip>=26.0.1 wheel>=0.46.2
2626
# aiohttp: transitive dep of azure-core; parents use loose floors (GHSA-mwh4-6h8g-pg8w etc.)
2727
# onnx: transitive dep of onnxruntime; parent uses onnx>=1.16.0; override needed (GHSA-p433-9wv8-28xj etc.)
2828
# requests: transitive dep of azure-core/mlflow; parents use loose floors (GHSA-gc5v-m9x4-r6x2)
29+
# pytest comes from the base ACPT image (not a transitive dep of any requirements.txt package);
30+
# no parent package to upgrade — explicit override required (GHSA-6w46-j5rx-g56g)
31+
# Mako: transitive dep of mlflow → alembic → Mako; alembic uses loose floor (no version pin),
32+
# so upgrading mlflow/alembic won't force >=1.3.11 — explicit override required (GHSA-v92g-xgxw-vvmm)
2933
RUN /opt/conda/envs/ptca/bin/pip install --no-cache-dir --upgrade 'skops>=0.13.0' 'wheel>=0.46.2' \
30-
cryptography==46.0.7 'aiohttp>=3.13.4' 'onnx>=1.21.0' 'requests>=2.33.0'
34+
cryptography==46.0.7 'aiohttp>=3.13.4' 'onnx>=1.21.0' 'requests>=2.33.0' 'pytest>=9.0.3' \
35+
'Mako>=1.3.11'
3136

3237
# Upgrade requests, urllib3, aiohttpin the system Python (3.13) for fixing vulnerability
3338
# PyJWT 2.10.1 (CVE-2026-32597) is installed in the base conda env (python3.13) from ACPT base image; manually upgrading since base image hasn't been patched yet

assets/training/finetune_acft_image/environments/acft_image_medimageinsight_embedding_generator/context/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
azureml-acft-common-components=={{latest-pypi-version}}
22
azureml-acft-contrib-hf-nlp=={{latest-pypi-version}}
3-
mlflow==3.10.1
3+
mlflow==3.11.1
44
cloudpickle==2.2.1
55
colorama==0.4.6
66
einops==0.8.0
@@ -20,7 +20,7 @@ sentencepiece==0.2.1
2020
tenacity==9.0.0
2121
timm==1.0.13
2222
tornado>=6.5.5
23-
transformers==4.53.0
23+
transformers==5.0.0
2424
setuptools>=82.0.0
2525
filelock>=3.20.1
2626
pillow>=12.1.1

assets/training/finetune_acft_image/environments/acft_image_medimageparse_finetune/context/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ RUN pip install --no-cache-dir mlflow-skinny==3.10.1
2222
# nltk: GHSA-gfwx-w7gr-fvh7; >=3.9.4 required
2323
# pydicom: GHSA-v856-2rf8-9f28; requirements.txt pins ~=2.4.0 allowing vulnerable 2.4.4; override to >=2.4.5
2424
# requests: transitive dep of azure-core/mlflow; parents use loose floors (GHSA-gc5v-m9x4-r6x2)
25-
RUN pip install --no-cache-dir --upgrade pip==26.0 wheel==0.46.2 setuptools>=82.0.1 protobuf==6.33.5 cryptography==46.0.7 pillow==12.1.1 'requests>=2.33.0' 'aiohttp>=3.13.4' 'onnx>=1.21.0' 'nltk>=3.9.4' 'pydicom>=2.4.5'
25+
# pytest: transitive dep from base image; not a direct requirement of any parent package (GHSA-6w46-j5rx-g56g)
26+
RUN pip install --no-cache-dir --upgrade pip==26.0 wheel==0.46.2 setuptools>=82.0.1 protobuf==6.33.5 cryptography==46.0.7 pillow==12.2.0 'requests>=2.33.0' 'aiohttp>=3.13.4' 'onnx>=1.21.0' 'nltk>=3.9.4' 'pydicom>=2.4.5' 'pytest>=9.0.3'
2627
# pip install updates the binary but conda-meta still references old versions; conda install syncs both
2728
RUN conda install -n ptca -y pip>=26.0.1 wheel>=0.46.2
2829
# vulnerability in base conda env

assets/training/finetune_acft_image/environments/acft_image_medimageparse_finetune/context/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ azureml-dataprep==5.4.1
1010
timm==0.9.16
1111
opencv-python-headless==4.11.0.86
1212
deepspeed==0.15.1
13-
transformers==4.53.0
13+
transformers==5.0.0
1414
open-clip-torch==2.26.1
1515
sentencepiece==0.2.1
1616
peft==0.17.1

0 commit comments

Comments
 (0)