Skip to content

Commit dce97cb

Browse files
[miniconda] Update cryptography package due to GHSA-jm77-qphf-c4w8 (devcontainers#743)
* Bump `cryptography` package version * Update tests * Use separate environment for installation tests * Add information about conda channels
1 parent 10c097f commit dce97cb

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/miniconda/.devcontainer/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ FROM continuumio/miniconda3 as upstream
33
# Temporary: Upgrade python packages due to mentioned CVEs
44
# They are installed by the base image (continuumio/miniconda3) which does not have the patch.
55
RUN conda install \
6-
# https://github.com/pyca/cryptography/security/advisories/GHSA-5cpq-8wj7-hf2v
6+
# pyopenssl should be updated to be compatible with latest version of cryptography
77
pyopenssl=23.2.0 \
8-
cryptography=41.0.2 \
8+
# https://github.com/advisories/GHSA-jm77-qphf-c4w8
9+
cryptography=41.0.3 \
910
# https://github.com/advisories/GHSA-j8r2-6x86-q33q
1011
requests=2.31.0
1112

src/miniconda/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Given JavaScript front-end web client code written for use in conjunction with a
6767
}
6868
```
6969

70+
#### Using different Conda channels
71+
72+
This image is based on the `ContinuumIO/miniconda3` docker image, which has the conda and its dependencies (*installed from conda's default channel*) in the base environment. It is not recommended to install packages from different channels in one environment since it could cause conflicts. When installing a package from a different channel (e.g., `conda-forge`) is required, the better approach is to create a new conda environment.
73+
7074
#### Installing or updating Python utilities
7175

7276
This container installs all Python development utilities using [pipx](https://pipxproject.github.io/pipx/) to avoid impacting the global Python environment. You can use this same utility add additional utilities in an isolated environment. For example:

src/miniconda/test-project/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ check "gitconfig-contains-name" sh -c "cat /etc/gitconfig | grep 'name = devcont
1818

1919
check "usr-local-etc-config-does-not-exist" test ! -f "/usr/local/etc/gitconfig"
2020

21-
checkPythonPackageVersion "cryptography" "41.0.0"
21+
checkPythonPackageVersion "cryptography" "41.0.3"
2222
checkPythonPackageVersion "setuptools" "65.5.1"
2323
checkPythonPackageVersion "wheel" "0.38.1"
2424

25-
checkCondaPackageVersion "cryptography" "41.0.0"
25+
checkCondaPackageVersion "cryptography" "41.0.3"
2626
checkCondaPackageVersion "pyopenssl" "23.2.0"
2727
checkCondaPackageVersion "setuptools" "65.5.1"
2828
checkCondaPackageVersion "wheel" "0.38.1"
2929
checkCondaPackageVersion "requests" "2.31.0"
3030

3131
check "conda-update-conda" bash -c "conda update -y conda"
32-
check "conda-install-tensorflow" bash -c "conda install -c conda-forge --yes tensorflow"
33-
check "conda-install-pytorch" bash -c "conda install -c conda-forge --yes pytorch"
32+
check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-forge --yes tensorflow"
33+
check "conda-install-pytorch" bash -c "conda create --name test-env -c conda-forge --yes pytorch"
3434

3535
# Report result
3636
reportResults

0 commit comments

Comments
 (0)