[rhoai-3.4] Fix CVEs: aiohttp, gitpython, pyjwt#2521
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (49)
🚧 Files skipped from review as they are similar to previous changes (40)
📝 WalkthroughWalkthroughDependency pins and generated ChangesPython dependency refresh
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@jupyter/pytorch`+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml:
- Around line 429-431: Revert the blocked package updates across all listed
lockfiles and requirements files, restoring the previously pinned versions and
removing their regenerated wheel artifacts: feast, jupyter-server, jupyterlab,
mistune, nltk, pip, and ujson. Apply the reversions at every specified site,
including the CUDA, ROCm, CPU, and llmcompressor variants; regenerate against
the correct constraints so any naturally restored transitive dependencies such
as orjson are included.
In `@runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml`:
- Line 2: Revert the regenerated pylock.toml changes at
runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml lines 2-2 and
jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml lines 2-2; do not update
per-image lock files in this CVE-fix PR, leaving lock regeneration to CI or
maintainers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 60f706cb-2c31-4ad4-a433-5d3d50038483
📒 Files selected for processing (49)
codeserver/ubi9-python-3.12/requirements.cpu.txtcodeserver/ubi9-python-3.12/uv.lock.d/pylock.cpu.tomldependencies/cve-constraints.txtjupyter/datascience/ubi9-python-3.12/requirements.cpu.txtjupyter/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.tomljupyter/minimal/ubi9-python-3.12/requirements.cpu.txtjupyter/minimal/ubi9-python-3.12/requirements.cuda.txtjupyter/minimal/ubi9-python-3.12/requirements.rocm.txtjupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.tomljupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cuda.tomljupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.rocm.tomljupyter/pytorch+llmcompressor/ubi9-python-3.12/requirements.cuda.txtjupyter/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.tomljupyter/pytorch/ubi9-python-3.12/requirements.cuda.txtjupyter/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.tomljupyter/rocm/pytorch/ubi9-python-3.12/requirements.rocm.txtjupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.tomljupyter/rocm/tensorflow/ubi9-python-3.12/pylock.tomljupyter/tensorflow/ubi9-python-3.12/requirements.cuda.txtjupyter/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.tomljupyter/trustyai/ubi9-python-3.12/requirements.cpu.txtjupyter/trustyai/ubi9-python-3.12/uv.lock.d/pylock.cpu.tomlmanifests/odh/base/jupyter-datascience-notebook-imagestream.yamlmanifests/odh/base/jupyter-pytorch-llmcompressor-imagestream.yamlmanifests/odh/base/jupyter-pytorch-notebook-imagestream.yamlmanifests/odh/base/jupyter-rocm-pytorch-notebook-imagestream.yamlmanifests/odh/base/jupyter-tensorflow-notebook-imagestream.yamlmanifests/rhoai/base/jupyter-datascience-notebook-imagestream.yamlmanifests/rhoai/base/jupyter-pytorch-llmcompressor-imagestream.yamlmanifests/rhoai/base/jupyter-pytorch-notebook-imagestream.yamlmanifests/rhoai/base/jupyter-rocm-pytorch-notebook-imagestream.yamlmanifests/rhoai/base/jupyter-tensorflow-notebook-imagestream.yamlrstudio/c9s-python-3.12/uv.lock.d/pylock.cpu.tomlrstudio/c9s-python-3.12/uv.lock.d/pylock.cuda.tomlrstudio/rhel9-python-3.12/uv.lock.d/pylock.cpu.tomlrstudio/rhel9-python-3.12/uv.lock.d/pylock.cuda.tomlruntimes/datascience/ubi9-python-3.12/requirements.cpu.txtruntimes/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.tomlruntimes/minimal/ubi9-python-3.12/requirements.cpu.txtruntimes/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.tomlruntimes/pytorch+llmcompressor/ubi9-python-3.12/requirements.cuda.txtruntimes/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.tomlruntimes/pytorch/ubi9-python-3.12/requirements.cuda.txtruntimes/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.tomlruntimes/rocm-pytorch/ubi9-python-3.12/requirements.rocm.txtruntimes/rocm-pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.tomlruntimes/rocm-tensorflow/ubi9-python-3.12/pylock.tomlruntimes/tensorflow/ubi9-python-3.12/requirements.cuda.txtruntimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
| @@ -1,5 +1,5 @@ | |||
| # This file was autogenerated by uv via the following command: | |||
| # uv pip compile pyproject.toml --output-file pylock.toml --format pylock.toml --generate-hashes --emit-index-url --python-version=3.12 --universal --no-annotate --no-emit-package odh-notebooks-meta-db-connectors-deps --no-emit-package odh-notebooks-meta-jupyterlab-datascience-deps --no-emit-package odh-notebooks-meta-jupyterlab-deps --no-emit-package odh-notebooks-meta-llmcompressor-deps --no-emit-package odh-notebooks-meta-runtime-elyra-deps --no-emit-package odh-notebooks-meta-runtime-datascience-deps --no-emit-package odh-notebooks-meta-workbench-datascience-deps --constraints ../../../dependencies/cve-constraints.txt --exclude-newer=2026-06-01T15:09:45Z --default-index=https://pypi.org/simple | |||
| # uv pip compile pyproject.toml --output-file pylock.toml --format pylock.toml --generate-hashes --emit-index-url --python-version=3.12 --universal --no-annotate --no-emit-package odh-notebooks-meta-db-connectors-deps --no-emit-package odh-notebooks-meta-jupyterlab-datascience-deps --no-emit-package odh-notebooks-meta-jupyterlab-deps --no-emit-package odh-notebooks-meta-llmcompressor-deps --no-emit-package odh-notebooks-meta-runtime-elyra-deps --no-emit-package odh-notebooks-meta-runtime-datascience-deps --no-emit-package odh-notebooks-meta-workbench-datascience-deps --constraints ../../../dependencies/cve-constraints.txt --exclude-newer=2026-07-15T07:47:09Z --default-index=https://pypi.org/simple | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Do not regenerate per-image pylock.toml files in CVE-fix PRs.
Based on learnings, do not regenerate or update per-image pylock.toml files as part of CVE-fix PRs. This avoids public-index vs RH-index diff noise (evidenced by the fallback to pypi.org/simple here). Lock regeneration for these files should be handled by CI/maintainers instead. Reverting these changes also cleanly removes the blocked package updates (such as ujson and jupyterlab) that were inadvertently pulled in.
runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml#L2-L2: revert the regeneration of this file.jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml#L2-L2: revert the regeneration of this file.
📍 Affects 2 files
runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml#L2-L2(this comment)jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml#L2-L2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml` at line 2, Revert the
regenerated pylock.toml changes at
runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml lines 2-2 and
jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml lines 2-2; do not update
per-image lock files in this CVE-fix PR, leaving lock regeneration to CI or
maintainers.
Source: Learnings
There was a problem hiding this comment.
The rocm-tensorflow images use pylock.toml (not uv.lock.d/) and are generated with public-index mode — this is the existing pattern for these images since they don't have uv.lock.d/ directories. The pylocks_generator.py auto command correctly detects this and uses public-index for them. The lockfile regeneration is intentional and follows the same pattern used for all previous CVE fixes on these images.
There was a problem hiding this comment.
@crackcodecamp Thanks for the clarification — that makes sense. Since rocm-tensorflow images rely on pylock.toml directly (no uv.lock.d/) and pylocks_generator.py auto correctly falls back to public-index mode for these, the regeneration here is expected and consistent with prior CVE-fix PRs. Withdrawing this concern.
✏️ Learnings added
Learnt from: crackcodecamp
Repo: red-hat-data-services/notebooks PR: 2521
File: runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml:2-2
Timestamp: 2026-07-15T08:17:00.496Z
Learning: Learnt from: crackcodecamp
Repo: red-hat-data-services/notebooks PR: 2521
File: runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml and jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
In red-hat-data-services/notebooks, the `rocm-tensorflow` and `jupyter/rocm/tensorflow` images do not have a `uv.lock.d/` directory; they use a single `pylock.toml` file directly, generated in public-index mode (falling back to `https://pypi.org/simple` rather than the RH internal index). This is the existing, intentional pattern for these images (since they lack `uv.lock.d/`), and `pylocks_generator.py auto` correctly detects this and regenerates `pylock.toml` for them as part of CVE-fix PRs. Do not flag regeneration of `pylock.toml` for these specific rocm-tensorflow images as unwanted drift; the general "don't regenerate per-image pylock.toml files in CVE-fix PRs" guidance applies to images that have `uv.lock.d/` directories with RH-index generation, not to these rocm-tensorflow images.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: jiridanek
Repo: red-hat-data-services/notebooks PR: 2192
File: runtimes/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml:55-58
Timestamp: 2026-05-05T11:18:20.110Z
Learning: In red-hat-data-services/notebooks, do not regenerate or update per-image pylock.toml files as part of CVE-fix PRs. This is intentional to avoid public-index vs RH-index diff noise; lock regeneration should be handled by CI/maintainers instead. During review, tolerate that pylock.toml may be stale relative to dependency overrides added in the corresponding pyproject.toml (e.g., pyproject overrides like pyasn1>=0.6.2), and check that deviations are intentional for the affected images rather than treating them as accidental drift.
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. aiohttp 3.13.5 → 3.14.1 across all affected images. Resolves: RHAIENG-5490
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. gitpython 3.1.46 → 3.1.50 across all affected images. Resolves: RHAIENG-6095, RHAIENG-6096, RHAIENG-6101
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. pyjwt 2.12.1 → 2.13.0 across all affected images. Resolves: RHAIENG-5796
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. mistune 3.2.0 → 3.3.3 across all affected images. Resolves: RHAIENG-6084, RHAIENG-5885
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. nltk 3.9.4 → 3.10.0 across affected images. Resolves: RHAIENG-5989, RHAIENG-5888
…=2.20.0 Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. jupyter-server 2.17.0 → 2.20.0 across all affected images. Resolves: RHAIENG-5833, RHAIENG-5852, RHAIENG-5802
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. jupyterlab 4.5.6 → 4.5.8 across all affected images. Resolves: RHAIENG-5897
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. ujson 5.12.0 → 5.13.0 across all affected images. Resolves: RHAIENG-5793
Adds constraint to dependencies/cve-constraints.txt, regenerates all lockfiles, and updates imagestream manifests. feast 0.61/0.62 → 0.63.0 across all affected images. Resolves: RHAIENG-5875
Adds constraint to dependencies/cve-constraints.txt and regenerates all lockfiles. pip 26.0.1 → 26.1.2 across all affected images. Resolves: RHOAIENG-64079
f49bc72 to
6e7f3d9
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jiridanek The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Batch CVE remediation for Notebooks Images on rhoai-3.4. Adds minimum version constraints to
dependencies/cve-constraints.txtand regenerates all lockfiles.CVEs Fixed
Jira References
What Changed
dependencies/cve-constraints.txt— added 3 constraints (aiohttp>=3.14.0, gitpython>=3.1.50, pyjwt>=2.13.0)uv.lock.d/pylock.*.tomlandrequirements.*.txtregenerated viapylocks_generator.py autoTesting
pytest tests/test_main.py— 11 passed, 18 skipped, 975 subtests passed (matches baseline)Not Included (blocked on RH internal PyPI index)
The following CVEs are pending — fix versions not yet available in the RH internal PyPI index:
Test plan
pytest tests/test_main.pypasses (11 passed, 975 subtests)/build-konflux/build-tensorflow-rocmSummary by CodeRabbit
orjsonpackage from selected CUDA/ROCm image dependencies.