Skip to content

fix(security): upgrade dependencies for CVE remediation - #1370

Merged
kajalj22 merged 8 commits into
mainfrom
kajalj/cve-dep-upgrades
May 19, 2026
Merged

kajalj22 merged 8 commits into
mainfrom
kajalj/cve-dep-upgrades

Conversation

@kajalj22

@kajalj22 kajalj22 commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upgrade dependency version constraints for packages flagged by security vulnerability scan (CVE remediation).

Upgraded

Package From To File(s)
urllib3 >=2.6.3 >=2.7.0 pyproject.toml
ray unpinned >=2.55.1 pyproject.toml
transformers >=4.40.0 >=4.57.6 stirrup_agent/requirements.txt
pdfminer.six >=20240706 >=20251230 stirrup_agent/requirements.txt, gdpval/requirements.txt
Pillow mixed (unpinned / >=10 / ==12.1.1) ==12.2.0 all 6 servers standardized: aviary, reasoning_gym, stirrup_agent, ether0, grl_sokoban, vlm_eval_kit
wandb 0.25.0 0.27.0 uv.lock
GitPython 3.1.45 (transitive) >=3.1.50 pyproject.toml (new security floor pin)
mlflow 3.11.1 >=3.12.0 pyproject.toml (mlflow + mlflow-skinny)
pydantic ==2.10.6 ==2.13.4 cvdp/requirements.txt (cascading fix — ray 2.55.1 requires pydantic>=2.12)

Transitive updates via uv.lock regeneration

  • pydantic 2.11.7 → 2.13.4
  • pydantic-core 2.33.2 → 2.46.4
  • mlflow-tracing 3.11.1 → 3.12.0

Test plan

  • CI passes (pre-commit, unit tests)

🤖 Generated with Claude Code

kajalj22 and others added 2 commits May 1, 2026 12:54
Expand the CI/CD Requirements section with smart test selection details,
Fern docs preview workflow, full test suite on main, release process,
maintenance workflows, and a complete workflow reference table.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
Upgrade minimum version constraints for packages flagged by security
scan:

- urllib3: >=2.6.3 → >=2.7.0 (pyproject.toml)
- ray: unpinned → >=2.55.1 (pyproject.toml)
- transformers: >=4.40.0 → >=4.57.6 (stirrup_agent)
- pdfminer.six: >=20240706 → >=20251230 (stirrup_agent, gdpval)
- Pillow: >=10.0.0 → >=10.2.0 (stirrup_agent)
- Pillow: ==12.1.1 → ==12.2.0 (aviary, reasoning_gym)

uv.lock regenerated — also resolves pydantic 2.11.7→2.13.4 and
pydantic-core 2.33.2→2.46.4 as transitive updates.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
@kajalj22
kajalj22 requested a review from a team as a code owner May 19, 2026 17:43
@copy-pr-bot

copy-pr-bot Bot commented May 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

kajalj22 and others added 5 commits May 19, 2026 12:45
Standardize Pillow version across all servers to 12.2.0 for CVE
remediation consistency. Previously a mix of unpinned, >=10, >=10.2.0,
and ==12.2.0.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
ray>=2.55.1 requires pydantic>=2.12. The cvdp server pinned 2.10.6
which caused a resolution failure.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
Upgrade wandb to 0.27.0 and add explicit GitPython>=3.1.50 security
floor pin to remediate GitPython CVE (was 3.1.45 as transitive dep).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
Pin mlflow and mlflow-skinny to >=3.12.0. Also upgrades mlflow-tracing
to 3.12.0 as a transitive update.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
@anwithk
anwithk requested review from ananthsub and bxyu-nvidia May 19, 2026 20:18
@kajalj22
kajalj22 enabled auto-merge (squash) May 19, 2026 21:06
@kajalj22
kajalj22 merged commit 826972e into main May 19, 2026
5 checks passed
terrykong added a commit to NVIDIA-NeMo/RL that referenced this pull request May 28, 2026
545a07a was already on Gym's main branch but main has since advanced;
pin to the current tip (1e48f12). This range is docs/CI-only relative to
545a07a (no Gym package or pyproject change), so uv.lock is unaffected.
Gym main requires ray>=2.55.1 (CVE remediation, NVIDIA-NeMo/Gym#1370),
already reflected in NeMo-RL's ray pin on this branch.

Signed-off-by: Terry Kong <[email protected]>
agronskiy added a commit that referenced this pull request Jun 30, 2026
Remove pillow, matplotlib, scipy, scikit-learn, joblib, threadpoolctl,
contourpy, cycler, kiwisolver, and cffi from [tool.uv].exclude-dependencies,
and force pillow==12.2.0 via override-dependencies (keeps the #1370 CVE floor
against moviepy's conservative <12 cap).

Every responses_api_agents/* and resources_servers/* venv installs nemo-gym
editably and inherits this [tool.uv] config, so under uv >=0.11.24 these
packages were silently dropped (exit 0, no error) from server venvs that
depend on them -- e.g. GDPVal stirrup_agent crashed at startup on
`from PIL import Image`. Full root-cause analysis and affected-server list in
the PR description.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
agronskiy added a commit that referenced this pull request Jun 30, 2026
Remove pillow, matplotlib, scipy, scikit-learn, joblib, threadpoolctl,
contourpy, cycler, kiwisolver, and cffi from [tool.uv].exclude-dependencies,
and force pillow==12.2.0 via override-dependencies (keeps the #1370 CVE floor
against moviepy's conservative <12 cap).

Every responses_api_agents/* and resources_servers/* venv installs nemo-gym
editably and inherits this [tool.uv] config, so under uv >=0.11.24 these
packages were silently dropped (exit 0, no error) from server venvs that
depend on them -- e.g. GDPVal stirrup_agent crashed at startup on
`from PIL import Image`. Full root-cause analysis and affected-server list in
the PR description.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
agronskiy added a commit that referenced this pull request Jun 30, 2026
…vs need (#1835)

## Summary

`[tool.uv].exclude-dependencies` in the repo-root `pyproject.toml` -
added to slim full `mlflow`'s heavy transitive deps out of the **main**
env (#727) - also leaks into **every per-server venv** and silently
strips packages those servers explicitly depend on. Approx 12 servers
affected

This PR removes the packages that servers genuinely need from
`exclude-dependencies` and forces the `pillow==12.2.0` CVE floor via
`override-dependencies`.

## Root cause

Every `responses_api_agents/*` and `resources_servers/*` requirements
file installs nemo-gym editably (`-e nemo-gym[dev] @ ../../`). When `gym
env start` runs `uv pip install -r requirements.txt` from a server
directory, uv walks up, discovers the repo-root `[tool.uv]`, and applies
`exclude-dependencies` to **that server's whole resolution** — not just
the main env.

After uv version bump: the Dockerfile installs uv via `curl
astral.sh/uv/install.sh` (always latest):

| Image | uv | `exclude-dependencies` behavior | stirrup venv |
|---|---|---|---|
| `…b44e814f` (Apr) | 0.11.8 | excludes **transitive** only → direct
`Pillow` pin honored | pillow 12.2.0 ✅ |
| `…aad609d5` (Jun) | 0.11.24 | excludes **direct requirements too** |
pillow **dropped** ❌ |

Under uv ≥0.11.24 the install succeeds with exit 0 and just omits the
excluded packages.

## Affected sub-venvs

These build their venv from the repo checkout (deployment/CI image
**and** any dev running `gym env start` from a clone with uv ≥0.11.x).
Pure wheel installs are unaffected (`[tool.uv]` isn't in wheel
metadata).

### Direct (server's own requirements lists an excluded package)

| Sub-venv | Dropped (direct) |
|---|---|
| `responses_api_agents/stirrup_agent` | **pillow** |
| `resources_servers/arena_judge` | scipy, joblib, threadpoolctl,
scikit-learn |
| `resources_servers/aviary` | pillow |
| `resources_servers/ether0` | matplotlib, pillow, contourpy, cycler,
kiwisolver, scikit-learn, scipy, joblib, threadpoolctl |
| `resources_servers/grl_sokoban` | scipy, pillow |
| `resources_servers/longmt_eval` | scipy, joblib |
| `resources_servers/math_with_code` | scipy |
| `resources_servers/newton_bench` | scipy |
| `resources_servers/reasoning_gym` | matplotlib, pillow, cycler,
kiwisolver |
| `resources_servers/scicode` | scipy, matplotlib |
| `resources_servers/vlm_eval_kit` | matplotlib, pillow, scikit-learn |
| `resources_servers/wmt_translation` | scipy |

### Transitive (server requests a puller of an excluded dep)

| Sub-venv | Puller → dropped dep |
|---|---|
| `responses_api_agents/stirrup_agent` | seaborn→matplotlib+scipy,
weasyprint→pillow+cffi, reportlab→pillow |
| `resources_servers/grl_sokoban` | imageio→pillow |
| `resources_servers/longmt_eval` | torchvision→pillow |
| `resources_servers/wmt_translation` | torchvision→pillow |
| `resources_servers/vlm_eval_kit` | torchvision→pillow,
scikit-image→scipy+pillow+imageio, imageio→pillow, nltk→joblib |
| `resources_servers/cvdp` | nltk→joblib |
| `resources_servers/ifbench` | nltk→joblib |

(Only `stirrup_agent` is baked into the current GDPVal/nemotron image;
the rest fail wherever their own benchmark configs run.)

## The fix

`pyproject.toml`:

1. **Drop from `exclude-dependencies`** the packages servers depend on
(directly or hard-transitively): `cffi, contourpy, cycler, joblib,
kiwisolver, matplotlib, pillow, scikit-learn, scipy, threadpoolctl`. The
remaining entries are genuine mlflow-UI/server deps (flask, alembic,
sqlalchemy, graphene, …) no environment needs.
2. **Add `override-dependencies = ["pillow==12.2.0"]`** — keeps #1370's
CVE floor while overriding moviepy's conservative `<12` cap (12.2.0
works at runtime, as the older uv-0.11.8 image proves).

A short breadcrumb comment in the file points back to this PR so the
exclude list isn't re-broken later.

### Validation (in `aad609d5` image, with this exact edit applied)

`stirrup_agent`, `reasoning_gym`, `arena_judge` all resolve **exit 0**
with `pillow==12.2.0`, `matplotlib`, `scipy`, `scikit-learn`, `joblib`
present; full stirrup install → `import PIL, moviepy, stirrup, seaborn,
matplotlib, weasyprint` all succeed.

Signed-off-by: Alex Gronskiy <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
agronskiy added a commit that referenced this pull request Jun 30, 2026
…vs need (#1835)

## Summary

`[tool.uv].exclude-dependencies` in the repo-root `pyproject.toml` -
added to slim full `mlflow`'s heavy transitive deps out of the **main**
env (#727) - also leaks into **every per-server venv** and silently
strips packages those servers explicitly depend on. Approx 12 servers
affected

This PR removes the packages that servers genuinely need from
`exclude-dependencies` and forces the `pillow==12.2.0` CVE floor via
`override-dependencies`.

## Root cause

Every `responses_api_agents/*` and `resources_servers/*` requirements
file installs nemo-gym editably (`-e nemo-gym[dev] @ ../../`). When `gym
env start` runs `uv pip install -r requirements.txt` from a server
directory, uv walks up, discovers the repo-root `[tool.uv]`, and applies
`exclude-dependencies` to **that server's whole resolution** — not just
the main env.

After uv version bump: the Dockerfile installs uv via `curl
astral.sh/uv/install.sh` (always latest):

| Image | uv | `exclude-dependencies` behavior | stirrup venv |
|---|---|---|---|
| `…b44e814f` (Apr) | 0.11.8 | excludes **transitive** only → direct
`Pillow` pin honored | pillow 12.2.0 ✅ |
| `…aad609d5` (Jun) | 0.11.24 | excludes **direct requirements too** |
pillow **dropped** ❌ |

Under uv ≥0.11.24 the install succeeds with exit 0 and just omits the
excluded packages.

## Affected sub-venvs

These build their venv from the repo checkout (deployment/CI image
**and** any dev running `gym env start` from a clone with uv ≥0.11.x).
Pure wheel installs are unaffected (`[tool.uv]` isn't in wheel
metadata).

### Direct (server's own requirements lists an excluded package)

| Sub-venv | Dropped (direct) |
|---|---|
| `responses_api_agents/stirrup_agent` | **pillow** |
| `resources_servers/arena_judge` | scipy, joblib, threadpoolctl,
scikit-learn |
| `resources_servers/aviary` | pillow |
| `resources_servers/ether0` | matplotlib, pillow, contourpy, cycler,
kiwisolver, scikit-learn, scipy, joblib, threadpoolctl |
| `resources_servers/grl_sokoban` | scipy, pillow |
| `resources_servers/longmt_eval` | scipy, joblib |
| `resources_servers/math_with_code` | scipy |
| `resources_servers/newton_bench` | scipy |
| `resources_servers/reasoning_gym` | matplotlib, pillow, cycler,
kiwisolver |
| `resources_servers/scicode` | scipy, matplotlib |
| `resources_servers/vlm_eval_kit` | matplotlib, pillow, scikit-learn |
| `resources_servers/wmt_translation` | scipy |

### Transitive (server requests a puller of an excluded dep)

| Sub-venv | Puller → dropped dep |
|---|---|
| `responses_api_agents/stirrup_agent` | seaborn→matplotlib+scipy,
weasyprint→pillow+cffi, reportlab→pillow |
| `resources_servers/grl_sokoban` | imageio→pillow |
| `resources_servers/longmt_eval` | torchvision→pillow |
| `resources_servers/wmt_translation` | torchvision→pillow |
| `resources_servers/vlm_eval_kit` | torchvision→pillow,
scikit-image→scipy+pillow+imageio, imageio→pillow, nltk→joblib |
| `resources_servers/cvdp` | nltk→joblib |
| `resources_servers/ifbench` | nltk→joblib |

(Only `stirrup_agent` is baked into the current GDPVal/nemotron image;
the rest fail wherever their own benchmark configs run.)

## The fix

`pyproject.toml`:

1. **Drop from `exclude-dependencies`** the packages servers depend on
(directly or hard-transitively): `cffi, contourpy, cycler, joblib,
kiwisolver, matplotlib, pillow, scikit-learn, scipy, threadpoolctl`. The
remaining entries are genuine mlflow-UI/server deps (flask, alembic,
sqlalchemy, graphene, …) no environment needs.
2. **Add `override-dependencies = ["pillow==12.2.0"]`** — keeps #1370's
CVE floor while overriding moviepy's conservative `<12` cap (12.2.0
works at runtime, as the older uv-0.11.8 image proves).

A short breadcrumb comment in the file points back to this PR so the
exclude list isn't re-broken later.

### Validation (in `aad609d5` image, with this exact edit applied)

`stirrup_agent`, `reasoning_gym`, `arena_judge` all resolve **exit 0**
with `pillow==12.2.0`, `matplotlib`, `scipy`, `scikit-learn`, `joblib`
present; full stirrup install → `import PIL, moviepy, stirrup, seaborn,
matplotlib, weasyprint` all succeed.

Signed-off-by: Alex Gronskiy <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants