Unverified Commit 8d3e9aca authored by Alexander Smolyakov's avatar Alexander Smolyakov Committed by GitHub

[features/conda] Address CVE-2023-0286, CVE-2023-23931, and CVE-2022-40897 vulnerabilities (#518)

* [features/conda] Address CVE-2023-0286, CVE-2023-23931, and CVE-2022-40897 vulnerabilities

- Update `install.sh` to install updates for `cryptography` and `setuptools`  packages
- Add tests to verify `cryptography` and `setuptools`  packages version

* Bump feature version
parent 74959ec1
{ {
"id": "conda", "id": "conda",
"version": "1.0.8", "version": "1.0.9",
"name": "Conda", "name": "Conda",
"description": "A cross-platform, language-agnostic binary package manager", "description": "A cross-platform, language-agnostic binary package manager",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",
......
...@@ -114,8 +114,13 @@ if ! conda --version &> /dev/null ; then ...@@ -114,8 +114,13 @@ if ! conda --version &> /dev/null ; then
find "${CONDA_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s find "${CONDA_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
# Temporary due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23491 # Temporary fixes
# Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23491
install_user_package certifi install_user_package certifi
# Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-0286 and https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-23931
install_user_package cryptography
# Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-40897
install_user_package setuptools
fi fi
# Display a notice on conda when not running in GitHub Codespaces # Display a notice on conda when not running in GitHub Codespaces
......
...@@ -32,5 +32,11 @@ check-version-ge() { ...@@ -32,5 +32,11 @@ check-version-ge() {
certifiVersion=$(python -c "import certifi; print(certifi.__version__)") certifiVersion=$(python -c "import certifi; print(certifi.__version__)")
check-version-ge "certifi" "${certifiVersion}" "2022.12.07" check-version-ge "certifi" "${certifiVersion}" "2022.12.07"
cryptographyVersion=$(python -c "import cryptography; print(cryptography.__version__)")
check-version-ge "cryptography" "${cryptographyVersion}" "39.0.1"
setuptoolsVersion=$(python -c "import setuptools; print(setuptools.__version__)")
check-version-ge "setuptools" "${setuptoolsVersion}" "65.5.1"
# Report result # Report result
reportResults reportResults
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment