Repository navigation
docs: document the security model (pickle loading, security policy) - #841
Open
milton-minervino wants to merge 2 commits into
Open
milton-minervino wants to merge 2 commits into
milton-minervino wants to merge 2 commits into
Conversation
SmartExplainer.load, load_smartpredictor and load_pickle unpickle the given file, which can run arbitrary code. Their docstrings now say to load only files you created or trust, and that the type and manifest checks run after unpickling, so they offer no protection.
Explain how to report a vulnerability privately through GitHub, and what counts as one. Loading a pickled explainer, trust_remote_code=True and exposing the unauthenticated webapp are unsafe by design, so they are listed as such and reports about them are out of scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
SmartExplainer.load,load_smartpredictorandload_pickleunpickle the file they are given, which can run arbitrary code. Their docstrings now carry aWarningssection saying to load only files you created or trust.Shapash is meant to reload pickles the user saved (like
joblib.loadortorch.load), so the behaviour itself stays the same. The two public loaders' warnings also say that their type and manifest checks run only after unpickling, so they offer no protection.This PR also adds a
SECURITY.mdat the repo root that:trust_remote_code=True, exposing the unauthenticated webapp, and the data embedded in HTML reports.Docs-only change, no behaviour change.
Closes #807 (CodeQL CWE-502 findings)