src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.pytorchLoadSave.html

branch
eric7
changeset 10996
a3dc181d14e1
equal deleted inserted replaced
10995:f94a27bbf6c4 10996:a3dc181d14e1
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.pytorchLoadSave</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.pytorchLoadSave</h1>
10 <p>
11 Module implementing checks for the use of 'torch.load' and 'torch.save'.
12 </p>
13
14 <h3>Global Attributes</h3>
15 <table>
16 <tr><td>None</td></tr>
17 </table>
18
19 <h3>Classes</h3>
20 <table>
21 <tr><td>None</td></tr>
22 </table>
23
24 <h3>Functions</h3>
25 <table>
26 <tr>
27 <td><a href="#checkPytorchLoadSave">checkPytorchLoadSave</a></td>
28 <td>Function to check for the use of 'torch.load' and 'torch.save'.</td>
29 </tr>
30 <tr>
31 <td><a href="#getChecks">getChecks</a></td>
32 <td>Public method to get a dictionary with checks handled by this module.</td>
33 </tr>
34 </table>
35
36 <hr />
37 <hr />
38 <a NAME="checkPytorchLoadSave" ID="checkPytorchLoadSave"></a>
39 <h2>checkPytorchLoadSave</h2>
40 <b>checkPytorchLoadSave</b>(<i>reportError, context, _config</i>)
41 <p>
42 Function to check for the use of 'torch.load' and 'torch.save'.
43 </p>
44 <p>
45 Using `torch.load` with untrusted data can lead to arbitrary code
46 execution, and improper use of `torch.save` might expose sensitive
47 data or lead to data corruption.
48 </p>
49
50 <dl>
51
52 <dt><i>reportError</i> (func)</dt>
53 <dd>
54 function to be used to report errors
55 </dd>
56 <dt><i>context</i> (SecurityContext)</dt>
57 <dd>
58 security context object
59 </dd>
60 <dt><i>_config</i> (dict)</dt>
61 <dd>
62 dictionary with configuration data (unused)
63 </dd>
64 </dl>
65 <div align="right"><a href="#top">Up</a></div>
66 <hr />
67 <hr />
68 <a NAME="getChecks" ID="getChecks"></a>
69 <h2>getChecks</h2>
70 <b>getChecks</b>(<i></i>)
71 <p>
72 Public method to get a dictionary with checks handled by this module.
73 </p>
74
75 <dl>
76 <dt>Return:</dt>
77 <dd>
78 dictionary containing checker lists containing checker function and
79 list of codes
80 </dd>
81 </dl>
82 <dl>
83 <dt>Return Type:</dt>
84 <dd>
85 dict
86 </dd>
87 </dl>
88 <div align="right"><a href="#top">Up</a></div>
89 <hr />
90 </body></html>

eric ide

mercurial