Skip to content

add opencv-python to requirements.txt#2061

Open
guozijn wants to merge 1 commit intoProject-MONAI:mainfrom
guozijn:detection-requirements
Open

add opencv-python to requirements.txt#2061
guozijn wants to merge 1 commit intoProject-MONAI:mainfrom
guozijn:detection-requirements

Conversation

@guozijn
Copy link
Copy Markdown

@guozijn guozijn commented Apr 9, 2026

Summary by CodeRabbit

  • Chores
    • Updated project dependencies.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Walkthrough

The pull request adds opencv-python to the project's detection module dependencies in detection/requirements.txt, making OpenCV's Python bindings available as an install-time requirement.

Changes

Cohort / File(s) Summary
Dependency Addition
detection/requirements.txt
Added opencv-python package to extend the detection module's dependencies.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A carrot-eyed addition hops in,
OpenCV now wears a grin,
For images to see and detect,
Our vision library's been checked! ✨👁️

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided. The template requires a description section explaining the changes, but the author left it blank. Add a pull request description explaining why opencv-python was added and how it relates to the detection module.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding opencv-python to requirements.txt.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
detection/requirements.txt (1)

5-5: Pin opencv-python to a specific version for reproducibility and security.

The detection/requirements.txt file uses mixed version pinning (itk>=5.2 is pinned, while opencv-python and others are not). More importantly, recent security vulnerabilities in opencv-python require careful version management:

  • CVE-2025-53644 (heap buffer write) affects opencv-python versions 4.10.0 and 4.11.0; fixed in 4.12.0+
  • CVE-2024-1417 (heap buffer overflow) requires updating to a patched version
  • CVE-2023-4863 (libwebp bundled in wheels) is mitigated in opencv-python 4.8.1.78+

Consider pinning to a known-safe version (e.g., opencv-python>=4.13.0.92) to ensure reproducibility and prevent accidental installation of vulnerable versions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@detection/requirements.txt` at line 5, Update the unpinned dependency
"opencv-python" in detection/requirements.txt to a specific safe version to
ensure reproducibility and mitigate known CVEs (e.g., replace "opencv-python"
with "opencv-python>=4.13.0.92" or a fixed "opencv-python==4.13.0.92"); edit the
requirements line for "opencv-python" so the installer cannot pull vulnerable
releases and document the chosen version in the file comment or changelog.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@detection/requirements.txt`:
- Line 5: Update the unpinned dependency "opencv-python" in
detection/requirements.txt to a specific safe version to ensure reproducibility
and mitigate known CVEs (e.g., replace "opencv-python" with
"opencv-python>=4.13.0.92" or a fixed "opencv-python==4.13.0.92"); edit the
requirements line for "opencv-python" so the installer cannot pull vulnerable
releases and document the chosen version in the file comment or changelog.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85e9eb5f-a2bb-4704-826a-b28a7db1ee9b

📥 Commits

Reviewing files that changed from the base of the PR and between 9292800 and 1dc8d0a.

📒 Files selected for processing (1)
  • detection/requirements.txt

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.

1 participant