Skip to content

Commit 018b799

Browse files
[miniconda] - tqdm - GHSA-g7vv-2v7x-gj9p vulnerability (devcontainers#1059)
* [miniconda] - tqdm - GHSA-g7vv-2v7x-gj9p vulnerability * Update Dockerfile * Update test.sh * update files for pinning to required version * Update apply_security_patches.sh
1 parent 4e5c34d commit 018b799

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

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)