None
EN
Secure your machine learning with Semgrep
['Suha Sabi Hussain']
The Trail of Bits Blog
rules : - id : pickles-in-torch-distributed patterns : - pattern-either : - pattern : torch.distributed.broadcast_object_list(...) - pattern : torch.distributed.all_gather_object(...) - pattern : torch.distributed.gather_object(...) - pattern : torch.distributed.scatter_object_list(...) message : | Functions reliant on pickle can result in arbitrary code execution. To attack ML models, Ilia Shumailov et al. developed data ordering attacks wherein an attacker controls the order in which data is supplied to the model in order to prevent the model from learning or to inject backdoors. rules : - id : numpy-in-torch-datasets patterns : - pattern-either : - pattern : | class $X(Dataset): ... def __getitem__(...): ... np.random.randint(...) ... - pattern : | class $X(Dataset): ...