Skip to content

fix: various CVE updates, mcp url fix, ffmpeg builds#762

Open
mckornfield wants to merge 1 commit into
mainfrom
cve-ffmpeg-and-friends/mck
Open

fix: various CVE updates, mcp url fix, ffmpeg builds#762
mckornfield wants to merge 1 commit into
mainfrom
cve-ffmpeg-and-friends/mck

Conversation

@mckornfield

@mckornfield mckornfield commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • SDK clients can now be configured to connect via an explicitly provided base URL (sync and async).
    • Training images now ship refreshed FFmpeg/VLM media packages for Python 3.13 (including av, OpenCV, and Decord), sourced from newly built wheels.
  • Bug Fixes

    • Improved container security by patching vulnerable system libraries and cleaning out stale bundled artifacts.
  • Tests

    • Added unit coverage for explicit base URL behavior.
  • Chores

    • Updated version constraints for LangChain, Weights & Biases, and MCP; refreshed related wheel constraints and regenerated dependency exports.

@mckornfield
mckornfield requested review from a team as code owners July 17, 2026 17:22
@github-actions github-actions Bot added the fix label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds explicit base URL support to sync and async SDK factories, rebuilds and injects FFmpeg/VLM Python wheels into the training image, hardens a customizer runtime image, and updates dependency constraints and pins.

Changes

SDK base URL routing

Layer / File(s) Summary
SDK base URL contract and routing
packages/nmp_common/src/nmp/common/sdk_factory.py
SDK factories and providers accept and forward an optional base_url, disabling service routing when explicitly set.
MCP integration and SDK URL tests
services/core/entities/..., packages/nmp_common/tests/..., services/core/mcp/tests/...
MCP initialization uses the keyword argument, while sync and async tests verify explicit host and port preservation.

Multimedia wheels and runtime images

Layer / File(s) Summary
FFmpeg/VLM wheel production
docker/base/Dockerfile.python-wheels
Adds Python 3.13 OpenCV and decord2 wheel builds and exports them with existing FFmpeg/VLM artifacts.
Training image wheel replacement
docker-bake.hcl, docker/Dockerfile.nmp-rl-training
Wires the wheel image into the training build, removes bundled multimedia packages and caches, and reinstalls rebuilt wheels.
Customizer runtime hardening
docker/Dockerfile.nmp-customizer-tasks
Installs pinned runtime packages, upgrades selected OpenSSL packages, and removes stale system-site files and binaries.

Dependency constraint updates

Layer / File(s) Summary
Dependency version constraints
pyproject.toml, packages/.../pyproject.toml, plugins/.../pyproject.toml, docker/automodel/Dockerfile.nmp-automodel-base, third_party/requirements-main.txt, .github/wheel-constraints/...
Updates LangChain, wandb, mcp, and several exported dependency pins.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant SDKFactory
  participant NeMoPlatform
  participant URLPreparation
  Caller->>SDKFactory: create SDK with base_url
  SDKFactory->>NeMoPlatform: construct with explicit base_url
  SDKFactory->>URLPreparation: configure without service routing
  URLPreparation-->>Caller: preserve explicit host and port
Loading

Possibly related PRs

Suggested reviewers: ironcommit, crookedstorm

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: CVE updates, an MCP URL fix, and FFmpeg build updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cve-ffmpeg-and-friends/mck

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/nmp_common/src/nmp/common/sdk_factory.py (1)

136-166: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep base URL fallback and routing decisions consistent.

With base_url="", Lines 162 and 257 fall back to the configured URL, while Lines 166 and 261 disable service routing. Use the same base_url is not None predicate for both operations, or reject empty URLs explicitly.

Also applies to: 226-261

🤖 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 `@packages/nmp_common/src/nmp/common/sdk_factory.py` around lines 136 - 166,
Update get_platform_sdk and the corresponding async SDK factory to use
consistent base_url handling: either preserve an explicitly supplied empty
string for URL construction while disabling service routing, or reject empty
URLs before both decisions. Align the fallback expression and _create_url_router
use_service_routing predicate so both paths apply the same base_url presence
semantics.
🤖 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.

Outside diff comments:
In `@packages/nmp_common/src/nmp/common/sdk_factory.py`:
- Around line 136-166: Update get_platform_sdk and the corresponding async SDK
factory to use consistent base_url handling: either preserve an explicitly
supplied empty string for URL construction while disabling service routing, or
reject empty URLs before both decisions. Align the fallback expression and
_create_url_router use_service_routing predicate so both paths apply the same
base_url presence semantics.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d4d1eae1-7634-4af9-a090-ae596deaafe9

📥 Commits

Reviewing files that changed from the base of the PR and between 27c9a8d and 801d4c2.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • docker-bake.hcl
  • docker/Dockerfile.nmp-customizer-tasks
  • docker/Dockerfile.nmp-rl-training
  • docker/automodel/Dockerfile.nmp-automodel-base
  • docker/base/Dockerfile.python-wheels
  • packages/nemo_platform/pyproject.toml
  • packages/nmp_common/src/nmp/common/sdk_factory.py
  • packages/nmp_common/tests/sdk_factory/test_sdk.py
  • plugins/nemo-guardrails/pyproject.toml
  • pyproject.toml
  • services/core/entities/src/nmp/core/entities/mcp/server.py
  • services/core/mcp/tests/integration/smoke_test.py

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 25542/32751 78.0% 62.6%
Integration Tests 14733/31400 46.9% 19.2%

Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
@mckornfield
mckornfield force-pushed the cve-ffmpeg-and-friends/mck branch from 801d4c2 to 6650a5b Compare July 17, 2026 18:01
@mckornfield
mckornfield requested a review from a team as a code owner July 17, 2026 18:01

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 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 `@docker/Dockerfile.nmp-customizer-tasks`:
- Around line 84-88: Update the apt-get install command in the Dockerfile’s CVE
cleanup RUN step to include --no-install-recommends alongside --only-upgrade,
while preserving the existing openssl and libssl3t64 packages and cleanup
behavior.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5e956ee6-0807-442e-8ade-84e0eca52413

📥 Commits

Reviewing files that changed from the base of the PR and between 801d4c2 and 6650a5b.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .github/wheel-constraints/nemo-platform-services.txt
  • docker-bake.hcl
  • docker/Dockerfile.nmp-customizer-tasks
  • docker/Dockerfile.nmp-rl-training
  • docker/automodel/Dockerfile.nmp-automodel-base
  • docker/base/Dockerfile.python-wheels
  • packages/nemo_platform/pyproject.toml
  • packages/nmp_common/src/nmp/common/sdk_factory.py
  • packages/nmp_common/tests/sdk_factory/test_sdk.py
  • plugins/nemo-guardrails/pyproject.toml
  • pyproject.toml
  • services/core/entities/src/nmp/core/entities/mcp/server.py
  • services/core/mcp/tests/integration/smoke_test.py
  • third_party/requirements-main.txt
🚧 Files skipped from review as they are similar to previous changes (9)
  • docker/automodel/Dockerfile.nmp-automodel-base
  • plugins/nemo-guardrails/pyproject.toml
  • packages/nemo_platform/pyproject.toml
  • services/core/entities/src/nmp/core/entities/mcp/server.py
  • docker/Dockerfile.nmp-rl-training
  • pyproject.toml
  • services/core/mcp/tests/integration/smoke_test.py
  • docker/base/Dockerfile.python-wheels
  • packages/nmp_common/src/nmp/common/sdk_factory.py

Comment thread docker/Dockerfile.nmp-customizer-tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant