Skip to content

Commit 32c28d0

Browse files
Merge branch 'main' into anaconda_tqdm_GHSA-g7vv-2v7x-gj9p
2 parents bdd7a76 + 018b799 commit 32c28d0

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/anaconda/.devcontainer/apply_security_patches.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
vulnerable_packages=( "pydantic=2.5.3" "joblib=1.3.1" "mistune=3.0.1" "werkzeug=3.0.3" "transformers=4.36.0" "pillow=10.3.0" "aiohttp=3.9.4" \
4-
"cryptography=42.0.4" "gitpython=3.1.41" "jupyter-lsp=2.2.2" "idna=3.7" "jinja2=3.1.4" "scrapy=2.11.2" "tqdm=4.66.4" )
4+
"cryptography=42.0.4" "gitpython=3.1.41" "jupyter-lsp=2.2.2" "idna=3.7" "jinja2=3.1.4" "scrapy=2.11.2" "black=24.4.2" "tqdm=4.66.4")
55

66
# Define the number of rows (based on the length of vulnerable_packages)
77
rows=${#vulnerable_packages[@]}

src/anaconda/test-project/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ checkCondaPackageVersion "urllib3" "1.26.17"
6363
checkCondaPackageVersion "pyarrow" "14.0.1"
6464
checkCondaPackageVersion "pydantic" "2.5.3"
6565
checkCondaPackageVersion "tqdm" "4.66.4"
66+
checkCondaPackageVersion "black" "24.4.2"
6667

6768
check "conda-update-conda" bash -c "conda update -y conda"
6869
check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-forge --yes tensorflow"

src/miniconda/.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM continuumio/miniconda3 as upstream
22

33
# Temporary: Upgrade python packages
4-
# COPY ./apply_security_patches.sh /tmp/apply_security_patches.sh
5-
# RUN chmod +x /tmp/apply_security_patches.sh
6-
# RUN /tmp/apply_security_patches.sh
4+
COPY ./apply_security_patches.sh /tmp/apply_security_patches.sh
5+
RUN chmod +x /tmp/apply_security_patches.sh
6+
RUN /tmp/apply_security_patches.sh
77

88
# Reset and copy updated files with updated privs to keep image size down
99
FROM mcr.microsoft.com/devcontainers/base:1-bullseye

src/miniconda/.devcontainer/apply_security_patches.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# define array of packages for pinning to the patched versions
44
# vulnerable_packages=( "package1=version1" "package2=version2" "package3=version3" )
5-
vulnerable_packages=( "" )
5+
vulnerable_packages=( "tqdm=4.66.4" )
66

77
# Define the number of rows (based on the length of vulnerable_packages)
88
rows=${#vulnerable_packages[@]}
@@ -31,7 +31,7 @@ for ((i=0; i<rows; i++)); do
3131
echo "${packages_array[$i,0]} version v${CURRENT_VERSION} installed by the base image is not greater or equal to the required: v${REQUIRED_VERSION}"
3232
# Check whether conda channel has a greater or equal version available, so install from conda, otherwise use pip package manager
3333
channel_name="anaconda"
34-
CONDA_VERSION=$(conda search --override-channels "${packages_array[$i,0]}" -c "$channel_name" | \
34+
CONDA_VERSION=$(conda search "${packages_array[$i,0]}" -c "$channel_name" | \
3535
grep -E '^[[:alnum:]]' | \
3636
awk '{print $2}' | \
3737
sort -V | \
@@ -53,4 +53,4 @@ for ((i=0; i<rows; i++)); do
5353
python3 -m pip install --upgrade --no-cache-dir "${packages_array[$i,0]}==${REQUIRED_VERSION}"
5454
fi
5555
fi
56-
done
56+
done

src/miniconda/test-project/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ checkCondaPackageVersion "wheel" "0.38.1"
2828
checkCondaPackageVersion "requests" "2.31.0"
2929
checkCondaPackageVersion "urllib3" "1.26.17"
3030
checkCondaPackageVersion "idna" "3.7"
31+
checkCondaPackageVersion "tqdm" "4.66.4"
3132

3233
check "conda-update-conda" bash -c "conda update -y conda"
3334
check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-forge --yes tensorflow"

0 commit comments

Comments
 (0)