Skip to content

Commit 7c635ec

Browse files
zeevmoneyclaude
andauthored
Fix Python dependency vulnerabilities (#301)
* Bump vulnerable Python dependencies and remove wheel from image - aiohttp: >=3.13.3 (CVE-2025-69223, CVE-2025-69227/28/29) - urllib3: >=2.6.3 (CVE-2025-66418, CVE-2025-66471, CVE-2026-21441) - protobuf: >=6.33.5 (CVE-2026-0994) - cryptography: >=46.0.5 added explicitly (CVE-2026-26007) - wheel: uninstalled after pip install in Dockerfile (CVE-2026-24049) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Bump Rust base image to 1.88 to fix cargo-chef MSRV cargo-chef now pulls cargo-platform@0.3.2 (requires rustc 1.88) and cargo_metadata@0.23.1 / guppy@0.17.25 (require rustc 1.86). The previous rust:1.85-alpine image can no longer build these tools. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 470a4e0 commit 7c635ec

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ARG OPA_BUILD=permit
88
# couldn't get this to work without the help of those two sources
99
# (1) this stage will be run always on current arch
1010
# zigbuild & Cargo targets added
11+
1112
FROM --platform=$BUILDPLATFORM rust:1.94-alpine AS rust_chef
1213
WORKDIR /app
1314
ENV PKGCONFIG_SYSROOTDIR=/
@@ -140,7 +141,7 @@ COPY ./requirements.txt ./requirements.txt
140141
RUN --mount=type=cache,target=/root/.cache/pip \
141142
pip install --upgrade pip setuptools && \
142143
pip install -r requirements.txt && \
143-
python -m pip uninstall -y pip setuptools && \
144+
python -m pip uninstall -y pip setuptools wheel && \
144145
rm -r /usr/local/lib/python3.10/ensurepip
145146

146147
USER permit

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
aiohttp>=3.12.14,<4
1+
aiohttp>=3.13.3,<4
22
fastapi>=0.115.6,<1
33
Jinja2>=3.1.2,<4
44
pydantic[email]>=1.9.1,<2
55
requests>=2.32.4,<3
6-
urllib3>=2.5.0,<3
6+
urllib3>=2.6.3,<3
77
gunicorn>=23.0.0,<24
88
tenacity>=8.0.1,<9
99
typer>=0.4.1,<1
@@ -15,6 +15,7 @@ scalar-fastapi==1.0.3
1515
httpx>=0.27.0,<1
1616
# TODO: change to use re2 in the future, currently not supported in alpine due to c++ library issues
1717
# google-re2 # use re2 instead of re for regex matching because it's simiplier and safer for user inputted regexes
18-
protobuf>=3.20.2 # not directly required, pinned by Snyk to avoid a vulnerability
18+
protobuf>=6.33.5 # pinned to avoid CVE-2026-0994
19+
cryptography>=46.0.5,<47 # pinned to avoid CVE-2026-26007
1920
opal-common==0.8.3
2021
opal-client==0.8.3

0 commit comments

Comments
 (0)