Repository navigation
FIX untrist SVMs due to out of bounds index issue - #567
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change tightening default trust for libsvm-backed SVMs.
No open issues 🎉
What changed in this PR
Tightens skops’ default loading policy for libsvm-backed SVMs to mitigate out-of-bounds memory risks from crafted model files, while preserving explicit-trust loading.
Changes:
- Removes
SVC,NuSVC,SVR,NuSVR, andOneClassSVMfrom default trust, with a version gate for future upstream validation. - Adds risk explanations and documents how to load files from trusted sources.
- Adds tests for default rejection, version gating, and explicit-trust round trips.
| File | Description |
|---|---|
| skops/io/tests/test_persist.py | Tests SVM trust restrictions, diagnostic reasons, and explicit-trust loading. |
| skops/io/exceptions.py | Adds shared risk explanations for the five affected estimators. |
| skops/io/_trusted_types.py | Excludes libsvm estimators from default trust and introduces a validation-version gate. |
| docs/changes.rst | Documents the trust-policy change and explicit-trust override. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove them from trusted due to out of bound segfault issue.