fix(security): harden artifact serialization and loading - #2339
Open
XianBW (XianBW) wants to merge 15 commits into
Open
fix(security): harden artifact serialization and loading#2339XianBW (XianBW) wants to merge 15 commits into
XianBW (XianBW) wants to merge 15 commits into
Conversation
Collaborator
Author
|
Local verification update:
The branch also contains minimal CI compatibility fixes for current Node/commitlint, Plotly, MLflow, and Windows/Python 3.8 OSQP behavior. |
Collaborator
Author
|
Final verification: all 76 GitHub checks pass on commit |
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
trusted=Truewith a warningSecurity impact
This blocks the reported HIST object-deserialization path and the
pandas.read_pickle/namespace bypass inRestrictedUnpickler. Arbitrary Python pickle artifacts can still be loaded for compatibility, but only through an explicit trusted path.Compatibility
stock_indexmust now be JSON; the bundled mapping is migrated without changing its 735 entries.trusted=True. DataFrame, Series, ndarray, and supported Qlib data artifacts continue through restricted loading.artifact_root; callers using absolute paths outside it must set the intended root.Validation
py_compilefor changed Python filesgit diff --checkpandas.read_pickle,numpy.load,os.system,subprocess.Popen, and reduce payloadsFull project pytest is delegated to CI because the local base environment does not contain Qlib's complete optional dependency set.