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() {
24
24
25
25
from DataFlow:: CallCfgNode call , DataFlow:: Node arg , string name
26
26
where
27
+ // see http://docs.paramiko.org/en/stable/api/client.html#paramiko.client.SSHClient.set_missing_host_key_policy
27
28
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
29
30
(
30
31
arg = unsafe_paramiko_policy ( name ) .getAUse ( ) or
31
32
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 {
193
193
194
194
/** Gets the data-flow node corresponding to the named argument of the call corresponding to this data-flow node */
195
195
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
- }
203
196
}
204
197
205
198
/**
You can’t perform that action at this time.
0 commit comments