Skip to content

Commit 4e5c34d

Browse files
Anaconda - black - ghsa fj7x q9j7 g6q6 (#1101)
* [anaconda] - black - GHSA-fj7x-q9j7-g6q6 - patch security vulnerability * patched to found conda version >= required version * removing --override-channels attribute in conda search command as it would only install with pip then
1 parent 88d2d24 commit 4e5c34d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/anaconda/.devcontainer/apply_security_patches.sh

Lines changed: 2 additions & 2 deletions
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" )
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")
55

66
# Define the number of rows (based on the length of vulnerable_packages)
77
rows=${#vulnerable_packages[@]}
@@ -30,7 +30,7 @@ for ((i=0; i<rows; i++)); do
3030
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}"
3131
# Check whether conda channel has a greater or equal version available, so install from conda, otherwise use pip package manager
3232
channel_name="anaconda"
33-
CONDA_VERSION=$(conda search --override-channels "${packages_array[$i,0]}" -c "$channel_name" | \
33+
CONDA_VERSION=$(conda search "${packages_array[$i,0]}" -c "$channel_name" | \
3434
grep -E '^[[:alnum:]]' | \
3535
awk '{print $2}' | \
3636
sort -V | \

src/anaconda/test-project/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ checkCondaPackageVersion "mpmath" "1.3.0"
6262
checkCondaPackageVersion "urllib3" "1.26.17"
6363
checkCondaPackageVersion "pyarrow" "14.0.1"
6464
checkCondaPackageVersion "pydantic" "2.5.3"
65+
checkCondaPackageVersion "black" "24.4.2"
6566

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

0 commit comments

Comments
 (0)