File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
python/ql/src/Security/CWE-327 Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 20
20
import python
21
21
import semmle.python.ApiGraphs
22
22
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" ) )
31
27
select 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