-
Notifications
You must be signed in to change notification settings - Fork 55
Fix CVE's for caikit-nlp #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: rpancham <[email protected]>
edwardquarm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
gabe-l-hart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd like to keep support for older torch versions possible while also removing the upper bound. Assuming tests pass with the latest torch, this should be merge ready once we restore the known-working lower bound of 2.3.1.
| "sentence-transformers>=3.4.0,<3.5.0", | ||
| "tokenizers>=0.20.0", | ||
| "torch>=2.3.1,<2.9.0", | ||
| "torch>=2.8.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, we try to avoid requiring a lower bound like this since it disallows users that are stuck on older versions for one reason or another. I think the correct thing to do here is to simply remove the upper bound:
| "torch>=2.8.0", | |
| "torch>=2.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rpancham @gabe-l-hart is this change actually needed, or do we just need to explicitly build an image somewhere with torch 2.8?
I followed the CVEs, and it seems to be patched in 2.8+, but that should already be compatible with things as they are, right?
GHSA-887c-mr87-cxwp
GHSA-3749-ghw9-m3mg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my understanding, the CVE fix for PyTorch (GHSA-887c-mr87-cxwp) is included in torch 2.8.0+, so ensuring our image/tests use a patched version is sufficient from a security perspective. Because of that, we don’t need to keep the upper bound in pyproject.toml.
If the goal is to maintain compatibility with older torch versions, I can update the dependency to:
"torch>=2.3.1",
and remove the upper bound as suggested.
Please let me know if you'd like me to make this change — I can update the PR and sign off accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's go ahead and simply remove the upper bound. If CI passes, this will be a good additional piece of flexibility for users and will enable forward-compatible CVE fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rpancham Have you had a chance to circle back on this change?
Addresses: https://issues.redhat.com/browse/RHOAIENG-37431