70 if p_x > 0: |
70 if p_x > 0: |
71 entropy += -p_x * math.log(p_x, 2) |
71 entropy += -p_x * math.log(p_x, 2) |
72 return entropy |
72 return entropy |
73 |
73 |
74 |
74 |
75 def checkHardcodedAwsKey(reportError, context, config): |
75 def checkHardcodedAwsKey(reportError, context, config): # noqa: U100 |
76 """ |
76 """ |
77 Function to check for potentially hardcoded AWS passwords. |
77 Function to check for potentially hardcoded AWS passwords. |
78 |
78 |
79 @param reportError function to be used to report errors |
79 @param reportError function to be used to report errors |
80 @type func |
80 @type func |