-
-
Notifications
You must be signed in to change notification settings - Fork 732
Conversation
This plugin checks for the use of torch.load and torch.save.
Using torch.load with untrusted data can lead to arbitrary code execution,
and improper use of torch.save might expose sensitive data or lead to data
corruption.
Using `torch.load` with untrusted data can lead to arbitrary code
execution, and improper use of `torch.save` might expose sensitive
data or lead to data corruption.
Signed-off-by: Luke Hinds
|
Bit of cleaning up to do, will get onto next week |
|
Closing and reopening to trigger precommit ci to auto fix this for you |
|
@sigmavirus24 / @ericwb I think I have reviewed most of the points now, fancy taking a second sweep? |
ericwb
left a comment
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.
Recently the trojansource plugin was merged which conflicts with this plugin ID of B613. Please change to B614
This plugin checks for the use of `torch.load` and `torch.save`.
Using `torch.load` with untrusted data can lead to arbitrary code
execution, and improper use of `torch.save` might expose sensitive
data or lead to data corruption.
Signed-off-by: Luke Hinds
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add missing save check
Signed-off-by: Luke Hinds
* Review fixes from 8b92a02
Signed-off-by: Luke Hinds
* Fix tox issues
Signed-off-by: Luke Hinds
* Review fixes
Signed-off-by: Luke Hinds
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_functional.py
* Update bandit/plugins/pytorch_load_save.py
Co-authored-by: Eric Brown
* Update bandit/plugins/pytorch_load_save.py
Co-authored-by: Eric Brown
* Update doc/source/plugins/b704_pytorch_load_save.rst
Co-authored-by: Eric Brown
* Update bandit/plugins/pytorch_load_save.py
Co-authored-by: Eric Brown
---------
Signed-off-by: Luke Hinds
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Brown
Signed-off-by: Eric Brown
What's the evidence for this? None of the references mention any security problems with |