diff --git a/Dockerfile b/Dockerfile index 16302cef..65adabad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,12 +19,15 @@ WORKDIR /app COPY ./requirements.txt requirements.txt -RUN pip install --no-cache-dir --upgrade pip -# Install the project dependencies -RUN python -m ensurepip --upgrade -# Bundled pip 25.0.1 wheel carries CVE-2025-8869, CVE-2026-3219/6357/8643 -RUN rm -f /usr/local/lib/python3.12/ensurepip/_bundled/pip-*.whl -RUN pip install --no-cache-dir -r requirements.txt +# Install the project dependencies, then drop pip: 26.2.1 (latest) vendors +# urllib3 2.7.0 (CVE-2026-97687, CVE-2026-97689) and krr never calls pip at +# runtime. One RUN so the upgraded pip never lands in an image layer. +# The bundled pip 25.0.1 wheel carries CVE-2025-8869, CVE-2026-3219/6357/8643. +RUN pip install --no-cache-dir --upgrade pip \ + && python -m ensurepip --upgrade \ + && rm -f /usr/local/lib/python3.12/ensurepip/_bundled/pip-*.whl \ + && pip install --no-cache-dir -r requirements.txt \ + && pip uninstall -y pip # Copy the rest of the application code COPY ./krr.py krr.py diff --git a/enforcer/requirements.txt b/enforcer/requirements.txt index df9d0da7..b5eace3a 100644 --- a/enforcer/requirements.txt +++ b/enforcer/requirements.txt @@ -9,4 +9,4 @@ prometheus-client==0.20.0 python-json-logger==3.3.0 kubernetes==26.1.0 pyasn1>=0.6.2 -urllib3==2.7.0 +urllib3==2.8.0 diff --git a/poetry.lock b/poetry.lock index d705dc97..85839eca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1901,13 +1901,13 @@ devenv = ["check-manifest", "pytest (>=4.3)", "pytest-cov", "pytest-mock (>=3.3) [[package]] name = "urllib3" -version = "2.7.0" +version = "2.8.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.10" files = [ - {file = "urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897"}, - {file = "urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c"}, + {file = "urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3"}, + {file = "urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63"}, ] [package.extras] @@ -1954,4 +1954,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<=3.12.9" -content-hash = "6f07ded37f837aefc3e5129c7695e68086ae570aadd2e70d30a61b42df1b19e8" +content-hash = "54b390b357ffe8e8533721f88e5db5317700565bd70e9b8e4d6ebbe3fac4cff6" diff --git a/pyproject.toml b/pyproject.toml index a06fb565..bc458801 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ pyyaml = "6.0.1" # pytest-asyncio >=1.3 (needed for pytest 9 / CVE-2025-71176) requires typing-extensions >=4.12 typing-extensions = ">=4.12.0,<5" idna = "3.15" -urllib3 = "^2.7.0" +urllib3 = "^2.8.0" setuptools = "^83.0.0" # transitive deps pinned for CVE fixes pillow = "^12.3.0" diff --git a/requirements.txt b/requirements.txt index 421e258d..0d924313 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,7 +51,7 @@ typer==0.7.0 ; python_version >= "3.10" and python_full_version < "3.13" typing-extensions==4.16.0 ; python_version >= "3.10" and python_full_version < "3.13" tzdata==2024.1 ; python_version >= "3.10" and python_full_version < "3.13" tzlocal==5.2 ; python_version >= "3.10" and python_full_version < "3.13" -urllib3==2.7.0 ; python_version >= "3.10" and python_full_version < "3.13" +urllib3==2.8.0 ; python_version >= "3.10" and python_full_version < "3.13" websocket-client==1.7.0 ; python_version >= "3.10" and python_full_version < "3.13" zipp==3.20.2 ; python_version >= "3.10" and python_full_version < "3.13" # required for tests