|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.awsHardcodedPassword</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.awsHardcodedPassword</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing checks for potentially hardcoded AWS passwords. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>AWS_ACCESS_KEY_ID_MAX_ENTROPY</td></tr><tr><td>AWS_ACCESS_KEY_ID_REGEX</td></tr><tr><td>AWS_ACCESS_KEY_ID_SYMBOLS</td></tr><tr><td>AWS_SECRET_ACCESS_KEY_MAX_ENTROPY</td></tr><tr><td>AWS_SECRET_ACCESS_KEY_REGEX</td></tr><tr><td>AWS_SECRET_ACCESS_KEY_SYMBOLS</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 <tr><td>None</td></tr> |
|
23 </table> |
|
24 <h3>Functions</h3> |
|
25 |
|
26 <table> |
|
27 |
|
28 <tr> |
|
29 <td><a href="#checkHardcodedAwsKey">checkHardcodedAwsKey</a></td> |
|
30 <td>Function to check for potentially hardcoded AWS passwords.</td> |
|
31 </tr> |
|
32 <tr> |
|
33 <td><a href="#getChecks">getChecks</a></td> |
|
34 <td>Public method to get a dictionary with checks handled by this module.</td> |
|
35 </tr> |
|
36 <tr> |
|
37 <td><a href="#shannonEntropy">shannonEntropy</a></td> |
|
38 <td>Function to caclculate the Shannon entropy of some given data.</td> |
|
39 </tr> |
|
40 </table> |
|
41 <hr /> |
|
42 <hr /> |
|
43 <a NAME="checkHardcodedAwsKey" ID="checkHardcodedAwsKey"></a> |
|
44 <h2>checkHardcodedAwsKey</h2> |
|
45 <b>checkHardcodedAwsKey</b>(<i>reportError, context, config</i>) |
|
46 |
|
47 <p> |
|
48 Function to check for potentially hardcoded AWS passwords. |
|
49 </p> |
|
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 |
|
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 |
|
72 <p> |
|
73 Public method to get a dictionary with checks handled by this module. |
|
74 </p> |
|
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 <hr /> |
|
91 <a NAME="shannonEntropy" ID="shannonEntropy"></a> |
|
92 <h2>shannonEntropy</h2> |
|
93 <b>shannonEntropy</b>(<i>data, symbols</i>) |
|
94 |
|
95 <p> |
|
96 Function to caclculate the Shannon entropy of some given data. |
|
97 </p> |
|
98 <p> |
|
99 Source: |
|
100 http://blog.dkbza.org/2007/05/scanning-data-for-entropy-anomalies.html |
|
101 </p> |
|
102 <dl> |
|
103 |
|
104 <dt><i>data</i> (str)</dt> |
|
105 <dd> |
|
106 data to calculate the entropy for |
|
107 </dd> |
|
108 <dt><i>symbols</i> (str)</dt> |
|
109 <dd> |
|
110 allowed symbols |
|
111 </dd> |
|
112 </dl> |
|
113 <dl> |
|
114 <dt>Return:</dt> |
|
115 <dd> |
|
116 Shannon entropy of the given data |
|
117 </dd> |
|
118 </dl> |
|
119 <dl> |
|
120 <dt>Return Type:</dt> |
|
121 <dd> |
|
122 float |
|
123 </dd> |
|
124 </dl> |
|
125 <div align="right"><a href="#top">Up</a></div> |
|
126 <hr /> |
|
127 </body></html> |