File tree Expand file tree Collapse file tree
python/ql/src/Security/CWE-327 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import python
2121import semmle.python.ApiGraphs
2222
23- CallNode unsafe_call ( string method_name ) {
24- result = API:: moduleImport ( "ssl" ) .getMember ( "wrap_socket" ) .getACall ( ) .asCfgNode ( ) and
25- not exists ( result .getArgByName ( "ssl_version" ) ) and
26- method_name = "deprecated method ssl.wrap_socket"
27- }
28-
29- from CallNode call , string method_name
30- where call = unsafe_call ( method_name )
23+ from DataFlow:: CallCfgNode call
24+ where
25+ call = API:: moduleImport ( "ssl" ) .getMember ( "wrap_socket" ) .getACall ( ) and
26+ not exists ( call .getArgByName ( "ssl_version" ) )
3127select call ,
32- "Call to " + method_name +
33- " does not specify a protocol, which may result in an insecure default being used."
28+ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
You can’t perform that action at this time.
0 commit comments