Skip to content
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

add jsonpickle deserialization blacklist #707

Merged
merged 5 commits into from
Jul 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion bandit/blacklists/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
| | | - dill.Unpickler | |
| | | - shelve.open | |
| | | - shelve.DbfilenameShelf | |
| | | - jsonpickle.decode | |
+------+---------------------+------------------------------------+-----------+

B302: marshal
Expand Down Expand Up @@ -341,7 +342,8 @@ def gen_blacklist():
'dill.load',
'dill.Unpickler',
'shelve.open',
'shelve.DbfilenameShelf'],
'shelve.DbfilenameShelf',
'jsonpickle.decode'],
'Pickle and modules that wrap it can be unsafe when used to '
'deserialize untrusted data, possible security issue.'
))
Expand Down