Skip to content

Commit 8c5390b

Browse files
[Miniconda] Address CVE-2022-40897 and CVE-2022-40898 vulnerabilities (#510)
* [Miniconda] Address CVE-2022-40898 and CVE-2022-40897 vulnerabilities - Updated Dockerfile to install updated versions of `wheel` and `setuptools` packages - Added tests to verify `wheel` and `setuptools` minimum version - Updated manifest to include info about `wheel` and `setuptools packages * Dockerfile: Update comments
1 parent fe5915e commit 8c5390b

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/miniconda/.devcontainer/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bi
4949

5050
USER vscode
5151

52-
# Temporary: Upgrade 'cryptography' due to https://github.com/advisories/GHSA-39hc-v87j-747x
53-
# 'cryptography' is installed by the base image (continuumio/miniconda3) which does not have the patch.
54-
RUN python3 -m conda update -y cryptography
52+
# Temporary: Upgrade python packages due to mentioned CVEs
53+
# They are installed by the base image (continuumio/miniconda3) which does not have the patch.
54+
RUN python3 -m conda update -y \
55+
# https://github.com/advisories/GHSA-39hc-v87j-747x
56+
cryptography \
57+
# https://github.com/advisories/GHSA-r9hx-vwmv-q579
58+
setuptools \
59+
# https://github.com/advisories/GHSA-qwmp-2cf2-g9g6
60+
wheel
5561

5662
# [Optional] Uncomment this section to install additional OS packages.
5763
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

src/miniconda/manifest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
"pip": [
4040
"certifi",
4141
"cryptography",
42-
"pyOpenssl"
42+
"pyOpenssl",
43+
"setuptools",
44+
"wheel"
4345
],
4446
"other": {
4547
"git": {},

src/miniconda/test-project/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,11 @@ check-version-ge "cryptography-requirement" "${cryptography_version}" "38.0.3"
2323

2424
check "conda-update-conda" bash -c "conda update -y conda"
2525

26+
setuptools_version=$(python -c "import setuptools; print(setuptools.__version__)")
27+
check-version-ge "setuptools-requirement" "${setuptools_version}" "65.5.1"
28+
29+
wheel_version=$(python -c "import wheel; print(wheel.__version__)")
30+
check-version-ge "wheel-requirement" "${wheel_version}" " 0.38.1"
31+
2632
# Report result
2733
reportResults

0 commit comments

Comments
 (0)