File tree Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 2323 },
2424 "./local-features/nvs" : " latest" ,
2525 "ghcr.io/devcontainers/features/python:1" : {
26- "version" : " 3.10.8 " ,
27- "additionalVersions" : " 3.9.16 " ,
26+ "version" : " 3.10.13 " ,
27+ "additionalVersions" : " 3.9.18 " ,
2828 "installJupyterlab" : " true" ,
2929 "configureJupyterlabAllowOrigin" : " *" ,
3030 "useOryxIfAvailable" : " false"
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ update_python_package() {
3636
3737 sudo_if " $PYTHON_PATH -m pip uninstall --yes $PACKAGE "
3838 sudo_if " $PYTHON_PATH -m pip install --upgrade --no-cache-dir $PACKAGE ==$VERSION "
39+ sudo_if " $PYTHON_PATH -m pip show --no-python-version-warning $PACKAGE "
3940}
4041
4142update_conda_package () {
@@ -50,14 +51,8 @@ sudo_if /opt/conda/bin/python3 -m pip install --upgrade pip
5051# Temporary: Upgrade python packages due to security vulnerabilities
5152# They are installed by the conda feature and Conda distribution does not have the patches.
5253
53- # pyopenssl should be updated to be compatible with latest version of cryptography
54- update_conda_package pyopenssl " 23.2.0"
55-
5654# https://github.com/advisories/GHSA-v8gr-m533-ghj9
5755update_python_package /opt/conda/bin/python3 cryptography " 41.0.4"
5856
59- # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-32681
60- update_conda_package requests " 2.31.0"
61-
6257# https://github.com/advisories/GHSA-v845-jxx5-vc9f
6358update_conda_package urllib3 " 1.26.18"
Original file line number Diff line number Diff line change @@ -32,17 +32,15 @@ sudo_if() {
3232update_package () {
3333 PYTHON_PATH=$1
3434 PACKAGE=$2
35+ VERSION=$3
3536
3637 sudo_if " $PYTHON_PATH -m pip uninstall --yes $PACKAGE "
37- sudo_if " $PYTHON_PATH -m pip install --upgrade --no-cache-dir $PACKAGE "
38+ sudo_if " $PYTHON_PATH -m pip install --upgrade --no-cache-dir $PACKAGE ==$VERSION "
39+ sudo_if " $PYTHON_PATH -m pip show --no-python-version-warning $PACKAGE "
3840}
3941
4042# Temporary: Upgrade python packages due to security vulnerabilities
4143# They are installed by the base image (python) which does not have the patch.
4244
4345# https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-40897
44- update_package /usr/local/python/3.9.* /bin/python setuptools==65.5.1
45- update_package /usr/local/python/3.10.* /bin/python setuptools==68.0.0
46-
47- # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-32681
48- update_package /usr/local/python/3.10.* /bin/python requests==2.31.0
46+ update_package /usr/local/python/3.9.* /bin/python setuptools 65.5.1
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ checkPythonPackageVersion()
224224 PACKAGE=$2
225225 REQUIRED_VERSION=$3
226226
227- current_version=$( ${PYTHON_PATH} -c " import ${PACKAGE} ; print(${PACKAGE} .__version__ )" )
227+ current_version=$( ${PYTHON_PATH} -c " import importlib.metadata ; print(importlib.metadata.version(' ${PACKAGE} ') )" )
228228 check-version-ge " ${PACKAGE} -requirement" " ${current_version} " " ${REQUIRED_VERSION} "
229229}
230230
You can’t perform that action at this time.
0 commit comments