24 list of codes |
24 list of codes |
25 @rtype dict |
25 @rtype dict |
26 """ |
26 """ |
27 return { |
27 return { |
28 "Call": [ |
28 "Call": [ |
29 (checkInsecureVersion, ("S508",)), |
29 (checkInsecureVersion, ("S-508",)), |
30 (checkWeakCryptography, ("S509",)), |
30 (checkWeakCryptography, ("S-509",)), |
31 ], |
31 ], |
32 } |
32 } |
33 |
33 |
34 |
34 |
35 def checkInsecureVersion(reportError, context, _config): |
35 def checkInsecureVersion(reportError, context, _config): |
72 """ |
72 """ |
73 if ( |
73 if ( |
74 context.callFunctionNameQual == "pysnmp.hlapi.UsmUserData" |
74 context.callFunctionNameQual == "pysnmp.hlapi.UsmUserData" |
75 and context.callArgsCount < 3 |
75 and context.callArgsCount < 3 |
76 ): |
76 ): |
77 reportError(context.node.lineno - 1, context.node.col_offset, "S509", "M", "H") |
77 reportError(context.node.lineno - 1, context.node.col_offset, "S-509", "M", "H") |