Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ ARG VERSION
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}

RUN uv sync --frozen --no-dev --extra live --extra postgres --extra kubernetes \
# The runtime only uses the uv-managed venv; drop the base image's bundled
# pip so its vendored packages (msgpack, pkg_resources) don't ship unused.
&& rm -rf /usr/local/lib/python*/site-packages/pip \
/usr/local/lib/python*/site-packages/pip-*.dist-info \
/usr/local/bin/pip* \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change, two things:

  1. This regresses silently. rm -rf on a non-matching glob exits 0, so a base image or Python minor change quietly restores pip and its vendored CVEs with nothing failing. Add to the same layer: && ! /usr/local/bin/python -c "import pip" 2>/dev/null \
  2. Please call out the pip removal in the PR body. The title says lock bumps only, so this image change is currently invisible in the release notes.

Qq: newer pip doesn't vendor pkg_resources, that comes from setuptools. Which path did the scanner actually flag?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip 26.2.1 (which the image has) has a vendored copy of pkg_resources (/usr/local/lib/python3.14/site-packages/pip/_vendor/pkg_resources/), and it's recorded in pip/_vendor/vendor.txt as setuptools==70.3.0. That manifest line is what the scanner keyed on

&& ! /usr/local/bin/python -c "import pip" 2>/dev/null \
&& groupadd --gid 1000 app \
&& useradd --uid 1000 --gid app --home-dir /app --no-log-init app \
&& chown -R app:app /app
Expand Down
19 changes: 16 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,30 @@ dependencies = [
"tabulate>=0.9.0",
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"python-multipart>=0.0.12",
"python-dotenv>=1.0.0",
"python-multipart>=0.0.32",
"python-dotenv>=1.2.2",
"opentelemetry-proto>=1.36.0",
"pyyaml>=6.0",
"httpx>=0.27.0",
# Security floors for CVE-affected transitive dependencies of the default install.
# None are imported directly, do not "clean up" as unused. pip does not read
# lockfiles, so installs from PyPI resolve from these floors alone.
"aiohttp>=3.14.3",
"authlib>=1.7.2",
"idna>=3.18",
"litellm>=1.85.7",
"nltk>=3.10.2",
"pyasn1>=0.6.4",
"requests>=2.34.2",
"urllib3>=2.7.0",
]

[project.optional-dependencies]
live = [
"mcp>=1.26.0",
"mcp>=1.28.1,<2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv.lock isn't shipped in the wheel and we publish to PyPI, so pip install agentevals-cli still resolves the vulnerable versions.

Please floor both at the locked versions. python-multipart especially, it parses the upload endpoints.

"httpx>=0.27.0",
"pyjwt>=2.13.0",
"pydantic-settings>=2.15.0",
]
streaming = [
"opentelemetry-sdk>=1.20.0",
Expand Down
Loading
Loading