Skip to content

fix: remediate CVEs in app image dependencies#1896

Merged
EItanya merged 5 commits into
mainfrom
fix/cve-remediations-python-app
May 19, 2026
Merged

fix: remediate CVEs in app image dependencies#1896
EItanya merged 5 commits into
mainfrom
fix/cve-remediations-python-app

Conversation

@EItanya

@EItanya EItanya commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Remediates the actionable CVEs from a recent trivy + grype scan of the app image built from main.

  • Bumps vulnerable transitive Python deps via uv constraint-dependencies in python/pyproject.toml:
  • Installs uv from upstream ghcr.io/astral-sh/uv:0.11.15 via multi-stage COPY in python/Dockerfile instead of the Wolfi apk package, so the uv binary (and its Rust deps like rkyv) is pinned and bumpable independent of the Wolfi release cadence.
  • Overrides brace-expansion to 5.0.6 in the sandbox-runtime npm tree (CVE-2026-45149), mirroring the existing lodash-es override.

CVEs left unaddressed are not actionable here: CPython CVEs marked n/a (no upstream fix yet), pip CVE-2026-3219 (not-fixed), Alpine busybox/git findings in skills-init (no upstream patch).

Test plan

  • uv lock --check passes
  • docker build -f python/Dockerfile ./python succeeds
  • Built image: uv --version reports 0.11.15
  • Built image: aiohttp 3.13.5, cryptography 48.0.0, mako 1.3.12, python-dotenv 1.2.2, requests 2.34.2, sqlparse 0.5.5 installed
  • Built image: /opt/sandbox-runtime/node_modules/brace-expansion/package.json reports 5.0.6
  • Re-run trivy + grype on the app image built from this branch to confirm CVE counts drop

PR opened by Claude on behalf of @EItanya.

Bump vulnerable transitive Python deps via uv constraint-dependencies:
- aiohttp 3.13.3 -> 3.13.5 (CVE-2026-22815, -34515, -34516, -34525)
- cryptography 46.0.5 -> 48.0.0 (CVE-2026-39892)
- mako 1.3.10 -> 1.3.12 (CVE-2026-44307, -41205)
- python-dotenv 1.1.1 -> 1.2.2 (CVE-2026-28684)
- requests 2.32.5 -> 2.34.2 (CVE-2026-25645)
- sqlparse 0.5.3 -> 0.5.5 (GHSA-27jp-wm6q-gp25)

Install uv from upstream ghcr.io/astral-sh/uv:0.11.15 (multi-stage COPY)
instead of the Wolfi apk package so the uv binary (and its Rust deps like
rkyv) is pinned and updatable independent of the Wolfi release cadence.

Override brace-expansion to 5.0.6 in the sandbox-runtime npm tree
(CVE-2026-45149), mirroring the existing lodash-es override.

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Copilot AI review requested due to automatic review settings May 19, 2026 20:10
@github-actions github-actions Bot added the bug Something isn't working label May 19, 2026

Copilot AI left a comment

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.

Pull request overview

This PR aims to remediate CVEs reported in the app image by updating vulnerable transitive dependencies in the Python environment, pinning uv installation to a controllable upstream binary, and adjusting the sandbox-runtime npm dependency tree to pull in a patched brace-expansion.

Changes:

  • Updated uv constraint-dependencies and lockfile resolutions to newer (patched) versions of several Python packages (e.g., aiohttp, cryptography, mako, requests, sqlparse).
  • Switched python/Dockerfile to install uv via a multi-stage copy from ghcr.io/astral-sh/uv, instead of installing uv via Wolfi apk.
  • Added an explicit install of brace-expansion@5.0.6 during sandbox-runtime build to address an npm CVE.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
python/uv.lock Regenerated lockfile reflecting upgraded Python package versions and updated constraint list.
python/pyproject.toml Added/updated tool.uv.constraint-dependencies to force minimum versions for vulnerable transitive deps.
python/Dockerfile Copies uv/uvx from an upstream uv image and installs brace-expansion@5.0.6 in the sandbox-runtime build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/pyproject.toml Outdated
Comment thread python/pyproject.toml Outdated
EItanya and others added 4 commits May 19, 2026 16:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Resolves Next.js advisories flagged by trivy on the ui image:
- CVE-2026-44573, -44574, -44575 (Middleware/Proxy bypass)
- CVE-2026-44578 (SSRF)
- CVE-2026-44579 (DoS via connection)
- CVE-2026-45109 (Middleware/Proxy bypass in App Router)

Also picks up the msw mockServiceWorker.js refresh that npm install
regenerated to match the new msw transitive version.

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@chromatic-com

chromatic-com Bot commented May 19, 2026

Copy link
Copy Markdown

Warning

Testing paused

Monthly snapshot limit reached. Update your plan to get more snapshots and resume testing.

@EItanya EItanya merged commit 62bd371 into main May 19, 2026
30 checks passed
@EItanya EItanya deleted the fix/cve-remediations-python-app branch May 19, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants