[anaconda]-fixing security vulnerabilities GHSA-87hc-h4r5-73f7: Werkzeug, GHSA-c336-7962-wfj2: distributed and GHSA-8rrh-rw8j-w5fx: wheel#1790
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Anaconda devcontainer image to remediate reported Python package vulnerabilities by bumping affected package versions and aligning smoke tests with the new minimums.
Changes:
- Bump
wheel,Werkzeug, and adddistributedto the security patching flow. - Update Anaconda smoke tests to require the patched minimum versions.
- Patch-bump the Anaconda image manifest version.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/anaconda/.devcontainer/apply_security_patches.sh | Updates the list of vulnerable/pinned Python packages to install patched versions. |
| src/anaconda/test-project/test.sh | Raises minimum required versions for wheel/werkzeug and adds a version check for distributed. |
| src/anaconda/manifest.json | Patch version bump for the Anaconda image. |
| # vulnerabilities: | ||
| # werkzeug - [GHSA-f9vj-2wh5-fj8j] | ||
|
|
||
| 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.0.6" "jupyter-lsp=2.2.2" "scrapy=2.11.2" \ | ||
| "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" ) | ||
| 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" \ | ||
| "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" "distributed=2026.1.0" "wheel=0.46.2" ) |
There was a problem hiding this comment.
The header comment lists only a Werkzeug vulnerability (and references a different GHSA ID), but this script now also patches wheel and distributed. Please update the comment block to reflect the current GHSA IDs/packages being addressed so future maintainers know why these pins exist.
See below for a potential fix:
# Security-related version pins for known vulnerabilities in dependencies.
# This script currently enforces versions for packages including Werkzeug,
# distributed, wheel, and others listed in vulnerable_packages below.
# Specific GHSA IDs / advisories are tracked in the project security docs;
# keep this comment in sync if new vulnerable packages are added.
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" \
"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" "distributed=2026.1.0" "wheel=0.46.2" )
|
|
||
| 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.0.6" "jupyter-lsp=2.2.2" "scrapy=2.11.2" \ | ||
| "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" ) | ||
| 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" \ |
There was a problem hiding this comment.
vulnerable_packages uses Werkzeug=... with capital-W while other entries are lowercase. Since this name is also passed to conda search/conda install, the mixed casing can make the conda lookup/install unreliable (conda package names are typically lowercase). Consider switching this entry to werkzeug=... for consistency/reliability.
| 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" \ | |
| 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" \ |
| # Add an array for packages that should always pin to the provided version, | ||
| # even if higher version is available in conda channel | ||
| pin_to_required_version=("transformers" "imagecodecs" "brotli" "protobuf") | ||
| pin_to_required_version=("transformers" "imagecodecs" "brotli" "protobuf" "distributed") |
There was a problem hiding this comment.
Adding distributed to pin_to_required_version means the script will force-install exactly distributed==2026.1.0 even if the base image/conda channel already provides a newer (potentially more secure) version. Unless there is a specific compatibility reason to pin distributed, it would be safer to let it float to any version >= the required minimum and keep it out of the pin list.
| pin_to_required_version=("transformers" "imagecodecs" "brotli" "protobuf" "distributed") | |
| pin_to_required_version=("transformers" "imagecodecs" "brotli" "protobuf") |
Fixing security vulnerabilities for anacoda image. ref