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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch Load / Save Plugin #1114

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

lukehinds
Copy link
Member

My first plugin 馃帀

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.

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 <luke@stacklok.com>
@lukehinds
Copy link
Member Author

Bit of cleaning up to do, will get onto next week

@sigmavirus24
Copy link
Member

Closing and reopening to trigger precommit ci to auto fix this for you

@sigmavirus24 sigmavirus24 reopened this Mar 3, 2024
bandit/blacklists/calls.py Outdated Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Outdated Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Outdated Show resolved Hide resolved
bandit/blacklists/calls.py Outdated Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Outdated Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Show resolved Hide resolved
bandit/plugins/pytorch_load_save.py Show resolved Hide resolved
Signed-off-by: Luke Hinds <luke@stacklok.com>
Signed-off-by: Luke Hinds <luke@stacklok.com>
Signed-off-by: Luke Hinds <luke@stacklok.com>
@lukehinds
Copy link
Member Author

@sigmavirus24 / @ericwb I think I have reviewed most of the points now, fancy taking a second sweep?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants