Skip to content

Commit da1ee61

Browse files
sireeshajonnalagaddaCopilotabdurriq
authored
[anaconda]-Update vulnerable packages and versions in security patch script and test files (#1805)
* Update vulnerable packages and versions in security patch script and test files * Remove analysis file for Anaconda critical and high vulnerabilities * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Update mistune package version to 3.0.1 * Update script to use patched package versions --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: Abdurrahmaan Iqbal <[email protected]>
1 parent df7c169 commit da1ee61

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

src/anaconda/.devcontainer/apply_security_patches.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# vulnerabilities:
44
# werkzeug - [GHSA-f9vj-2wh5-fj8j]
55

6-
vulnerable_packages=( "mistune=3.0.1" "aiohttp=3.10.11" "cryptography=44.0.1" "h11=0.16.0" "jinja2=3.1.6" "jupyter_core=5.8.1" "protobuf=5.29.5" "requests=2.32.4" "setuptools=78.1.1" "transformers=4.53.0" "urllib3=2.5.0" "werkzeug=3.1.5" "jupyter-lsp=2.2.2" "scrapy=2.11.2" \
7-
"zipp=3.19.1" "tornado=6.4.2" "jupyterlab=4.4.8" "imagecodecs=2024.9.22" "fonttools=4.60.2" "pyarrow=17.0.0" "brotli=1.2.0" "filelock=3.20.1" "bokeh=3.8.2" "distributed=2026.1.0" "wheel=0.46.2" )
6+
patched_package_versions=( "mistune=3.0.1" "aiohttp=3.10.11" "cryptography=44.0.1" "h11=0.16.0" "jinja2=3.1.6" "jupyter_core=5.8.1" "protobuf=6.33.5" "requests=2.32.4" "setuptools=78.1.1" "transformers=4.53.0" "urllib3=2.5.0" "werkzeug=3.1.5" "jupyter-lsp=2.2.2" "scrapy=2.14.2"
7+
"zipp=3.19.1" "tornado=6.5.5" "jupyterlab=4.4.8" "imagecodecs=2024.9.22" "fonttools=4.60.2" "pyarrow=17.0.0" "brotli=1.2.0" "filelock=3.20.1" "bokeh=3.8.2" "distributed=2026.1.0" "wheel=0.46.2" "nltk=3.9.3" "black=26.3.1" "pyjwt=2.12.0" "pillow=12.1.1" "pyopenssl=26.0.0" "nbconvert=7.17.0" )
88

9-
# Define the number of rows (based on the length of vulnerable_packages)
10-
rows=${#vulnerable_packages[@]}
9+
# Define the number of rows (based on the length of patched_package_versions)
10+
rows=${#patched_package_versions[@]}
1111

1212
# Define the number of columns
1313
cols=2
@@ -18,8 +18,8 @@ declare -A required_versions
1818

1919
# Fill the 2D array
2020
for ((i=0; i<rows; i++)); do
21-
# Split each element of vulnerable_packages by the '=' sign
22-
IFS='=' read -ra parts <<< "${vulnerable_packages[$i]}"
21+
# Split each element of patched_package_versions by the '=' sign
22+
IFS='=' read -ra parts <<< "${patched_package_versions[$i]}"
2323
# Assign the parts to the 2D array
2424
packages_array["$i,0"]="${parts[0]}"
2525
packages_array["$i,1"]="${parts[1]}"
@@ -28,7 +28,7 @@ done
2828

2929
# Add an array for packages that should always pin to the provided version,
3030
# even if higher version is available in conda channel
31-
pin_to_required_version=("transformers" "imagecodecs" "brotli" "protobuf" "distributed")
31+
pin_to_required_version=("transformers" "imagecodecs" "brotli" "distributed")
3232

3333
# Function to check if a package is in the pin_to_required_version array
3434
function is_pin_to_required_version() {

src/anaconda/test-project/test.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,31 @@ check "usr-local-etc-config-does-not-exist" test ! -f "/usr/local/etc/gitconfig"
3131

3232
checkPythonPackageVersion "joblib" "1.2.0"
3333
checkPythonPackageVersion "cookiecutter" "2.1.1"
34-
checkPythonPackageVersion "mistune" "2.0.3"
34+
checkPythonPackageVersion "mistune" "3.0.1"
3535
checkPythonPackageVersion "numpy" "1.22"
3636
checkPythonPackageVersion "setuptools" "78.1.1"
3737
checkPythonPackageVersion "wheel" "0.46.2"
38-
checkPythonPackageVersion "nbconvert" "6.5.1"
38+
checkPythonPackageVersion "nbconvert" "7.17.0"
3939
checkPythonPackageVersion "werkzeug" "3.1.5"
4040
checkPythonPackageVersion "certifi" "2022.12.07"
4141
checkPythonPackageVersion "cryptography" "44.0.1"
4242
checkPythonPackageVersion "h11" "0.16.0"
4343
checkPythonPackageVersion "jupyter_core" "5.8.1"
44-
checkPythonPackageVersion "protobuf" "5.29.5"
44+
checkPythonPackageVersion "protobuf" "6.33.5"
4545
checkPythonPackageVersion "transformers" "4.53.0"
4646
checkPythonPackageVersion "mpmath" "1.3.0"
4747
checkPythonPackageVersion "aiohttp" "3.10.2"
48-
checkPythonPackageVersion "tornado" "6.4.2"
48+
checkPythonPackageVersion "tornado" "6.5.5"
4949
checkPythonPackageVersion "jupyter_server" "2.14.1"
5050
checkPythonPackageVersion "pyarrow" "17.0.0"
51-
checkPythonPackageVersion "pillow" "10.3.0"
51+
checkPythonPackageVersion "pillow" "12.1.1"
5252
checkPythonPackageVersion "jupyterlab" "4.4.8"
5353
checkPythonPackageVersion "notebook" "7.2.2"
5454
checkPythonPackageVersion "gitpython" "3.1.41"
5555
checkPythonPackageVersion "jupyter-lsp" "2.2.2"
5656
checkPythonPackageVersion "idna" "3.7"
5757
checkPythonPackageVersion "jinja2" "3.1.4"
58-
checkPythonPackageVersion "scrapy" "2.11.2"
58+
checkPythonPackageVersion "scrapy" "2.14.2"
5959
checkPythonPackageVersion "requests" "2.32.4"
6060
checkPythonPackageVersion "scikit-learn" "1.5.0"
6161
checkPythonPackageVersion "zipp" "3.19.1"
@@ -65,18 +65,19 @@ checkPythonPackageVersion "fonttools" "4.60.2"
6565
checkPythonPackageVersion "distributed" "2026.1.0"
6666
checkPythonPackageVersion "filelock" "3.20.1"
6767
checkPythonPackageVersion "bokeh" "3.8.2"
68+
checkPythonPackageVersion "pyjwt" "2.12.0"
6869

69-
checkCondaPackageVersion "pyopenssl" "24.2.1"
70+
checkCondaPackageVersion "pyopenssl" "26.0.0"
7071
checkCondaPackageVersion "requests" "2.32.4"
7172
checkCondaPackageVersion "pygments" "2.15.1"
7273
checkCondaPackageVersion "mpmath" "1.3.0"
7374
checkCondaPackageVersion "urllib3" "2.5.0"
7475
checkCondaPackageVersion "pyarrow" "17.0.0"
7576
checkCondaPackageVersion "pydantic" "2.5.3"
7677
checkCondaPackageVersion "tqdm" "4.66.4"
77-
checkCondaPackageVersion "black" "24.4.2"
78+
checkCondaPackageVersion "black" "26.3.1"
7879
checkCondaPackageVersion "streamlit" "1.37.0"
79-
checkCondaPackageVersion "nltk" "3.9"
80+
checkCondaPackageVersion "nltk" "3.9.3"
8081

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

0 commit comments

Comments
 (0)