-
-
Notifications
You must be signed in to change notification settings - Fork 715
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Got unexpected error on using torch.utils.cpp_extension.load function which has no weights_only argument https://docs.pytorch.org/docs/stable/cpp_extension.html#torch.utils.cpp_extension.load
Reproduction steps
# r.py
import torch
torch.utils.cpp_extension.load(**kwargs)bandit r.py>> Issue: [B614:pytorch_load] Use of unsafe PyTorch load
Severity: Medium Confidence: High
CWE: CWE-502 (https://cwe.mitre.org/data/definitions/502.html)
More Info: https://bandit.readthedocs.io/en/1.9.2/plugins/b614_pytorch_load.html
Location: ./r.py:3:0
2
3 torch.utils.cpp_extension.load(**kwargs)Expected behavior
No error
Bandit version
1.9.1 (Default)
Python version
3.14 (Default)
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working