src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/snmpSecurity.py

branch
eric7
changeset 11147
dee6e106b4d3
parent 11090
f5f5f5803935
equal deleted inserted replaced
11146:59e04f7003e9 11147:dee6e106b4d3
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):
50 ): 50 ):
51 # We called community data. Lets check our args 51 # We called community data. Lets check our args
52 reportError( 52 reportError(
53 context.node.lineno - 1, 53 context.node.lineno - 1,
54 context.node.col_offset, 54 context.node.col_offset,
55 "S508", 55 "S-508",
56 "M", 56 "M",
57 "H", 57 "H",
58 ) 58 )
59 59
60 60
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")

eric ide

mercurial