eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.pytorchLoadSave

Module implementing checks for the use of 'torch.load' and 'torch.save'.

Global Attributes

None

Classes

None

Functions

checkPytorchLoadSave Function to check for the use of 'torch.load' and 'torch.save'.
getChecks Public method to get a dictionary with checks handled by this module.


checkPytorchLoadSave

checkPytorchLoadSave(reportError, context, _config)

Function to check 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.

reportError (func)
function to be used to report errors
context (SecurityContext)
security context object
_config (dict)
dictionary with configuration data (unused)
Up


getChecks

getChecks()

Public method to get a dictionary with checks handled by this module.

Return:
dictionary containing checker lists containing checker function and list of codes
Return Type:
dict
Up