-
Notifications
You must be signed in to change notification settings - Fork 148
Supporting secure unpickling in PyRosetta #523
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
Merged
Merged
Changes from 51 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
ed66905
Initial commit
klimaj d6ebb3e
Update prefix pattern matching
klimaj 81cee73
Merge branch 'main' into unpickle
klimaj f1b100c
Add pickle alternatives
klimaj e48d6fd
Fix Exception in self.assertRaises
klimaj e870cdd
Update docstrings/exceptions
klimaj 708bde3
Set SecureSerializerBase._pickle_protocol to pickle.DEFAULT_PROTOCOL
klimaj 17abab2
Docstrings
klimaj 67724a0
Raise from caller
klimaj 6c83e0b
Define PyRosettaModuleNotFoundError
klimaj 24b3f85
Clean up
klimaj 071f7cb
Add packages
klimaj 15f08c0
Set digest_size=16
klimaj cc3248e
Update lru_cache
klimaj bfb506b
Raise exception from ex
klimaj 40b01cc
Allow copyreg methods depending on incoming stream pickle protocol
klimaj 30d86ca
Add numpy.array roundtrip test
klimaj ba377fc
Update module parsing under pyrosetta.rosetta namespace
klimaj 027f85f
Fix keyword argument
klimaj d0e2989
Fix SecureSerializerBase.from_base64
klimaj c336098
Fix _get_stream_protocol for protocol <= 2
klimaj 53c92cd
Clean up
klimaj 0c0ad09
Skip re-import
klimaj 67240f4
Update builtins
klimaj 5cbd5f1
Debug
klimaj 5467725
Revert "Debug"
klimaj ba9b0c1
Skip assertion that rosetta.so must be under the pyrosetta package ba…
klimaj 69ce7e3
Update unpickle exception handling
klimaj e2ceb7c
Prevent re-import; walk down attributes of imported virtual submodule
klimaj 40f0f60
Update self.assertIn calls
klimaj 0b19189
Update blocked globals
klimaj c48f2d8
raise UnpickleCompatibilityError for unpickle-allowed packages missin…
klimaj 8236ea5
Update typing
klimaj 4126b56
Clean up builtins parsing
klimaj 9dc01f3
Handle MemoryError and KeyboardInterrupt exceptions
klimaj 15eb2ba
Fix _get_stream_protocol if missing pickle.PROTO
klimaj 79eee40
Add type to builtins
klimaj d54a135
Clean up
klimaj 95f0237
Update disallowed builtins UnpickleSecurityError message
klimaj 49a17a5
Add tests for secure builtins roundtrip and disallowed packages
klimaj 0e12865
Add test for disallowed globals
klimaj 4a75a48
Add test for disallowed prefixes
klimaj 6eb7156
Add getattr(pickle, 'PROTO')
klimaj 470f43f
Make globals frozensets
klimaj f9efe92
Add _secure_packages variable
klimaj 3435ebd
Removing type
klimaj 818ab79
Add thread lock for mutating global variables
klimaj 5429899
Clean up
klimaj 6496966
Run secure_loads in Serialization.decompress_packed_pose method
klimaj a927295
Add warning for untrusted data in secure unpickling
rclune 2364cdc
Revise warning for secure unpickling in PyRosetta
rclune c2bc266
Remove imports
klimaj c0b6599
Update error messages reflecting import change
klimaj 76b33b0
Update unit test reflecting import change
klimaj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
@klimaj could you please elaborate why do we need these at top level? Ie: in general I would like to keep default import list lean (and these will not be useful unless distributed framework is enabled).
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.
@lyskov Good point! The original idea was for convenience, but on second thought, I agree that we don't want to clutter the
pyrosetta.*namespace. Also please note that these methods are still active outside of thepyrosetta.distributedframework, since these are for configuring the secure packages for thePose.cachedictionary.