File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
semmle/python/dataflow/new/internal Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ private API::Node paramikoSSHClientInstance() {
2424
2525from DataFlow:: CallCfgNode call , DataFlow:: Node arg , string name
2626where
27+ // see http://docs.paramiko.org/en/stable/api/client.html#paramiko.client.SSHClient.set_missing_host_key_policy
2728 call = paramikoSSHClientInstance ( ) .getMember ( "set_missing_host_key_policy" ) .getACall ( ) and
28- arg = call .getAnArg ( ) and
29+ arg in [ call .getArg ( 0 ) , call . getArgByName ( "policy" ) ] and
2930 (
3031 arg = unsafe_paramiko_policy ( name ) .getAUse ( ) or
3132 arg = unsafe_paramiko_policy ( name ) .getReturn ( ) .getAUse ( )
Original file line number Diff line number Diff line change @@ -193,13 +193,6 @@ class CallCfgNode extends CfgNode {
193193
194194 /** Gets the data-flow node corresponding to the named argument of the call corresponding to this data-flow node */
195195 Node getArgByName ( string name ) { result .asCfgNode ( ) = node .getArgByName ( name ) }
196-
197- /** Gets the data-flow node corresponding to an argument of the call corresponding to this data-flow node */
198- Node getAnArg ( ) {
199- exists ( int n | result = this .getArg ( n ) )
200- or
201- exists ( string name | result = this .getArgByName ( name ) )
202- }
203196}
204197
205198/**
You can’t perform that action at this time.
0 commit comments