29 (checkNoCertificateValidation, ("S501",)), |
29 (checkNoCertificateValidation, ("S501",)), |
30 ], |
30 ], |
31 } |
31 } |
32 |
32 |
33 |
33 |
34 def checkNoCertificateValidation(reportError, context, config): # noqa: U100 |
34 def checkNoCertificateValidation(reportError, context, _config): |
35 """ |
35 """ |
36 Function to check for switched off certificate validation. |
36 Function to check for switched off certificate validation. |
37 |
37 |
38 @param reportError function to be used to report errors |
38 @param reportError function to be used to report errors |
39 @type func |
39 @type func |
40 @param context security context object |
40 @param context security context object |
41 @type SecurityContext |
41 @type SecurityContext |
42 @param config dictionary with configuration data |
42 @param _config dictionary with configuration data (unused) |
43 @type dict |
43 @type dict |
44 """ |
44 """ |
45 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete") |
45 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete") |
46 httpxAttrs = ("request", "stream", "Client", "AsyncClient") + httpVerbs |
46 httpxAttrs = ("request", "stream", "Client", "AsyncClient") + httpVerbs |
47 qualName = context.callFunctionNameQual.split(".")[0] |
47 qualName = context.callFunctionNameQual.split(".")[0] |