File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
python/ql/src/semmle/python/functions Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
private import python
10
10
import semmle.python.dataflow.new.DataFlow
11
- private import semmle.python.dataflow.new.internal.TaintTrackingPrivate as TTP
11
+ private import semmle.python.ApiGraphs
12
12
13
13
/**
14
14
* Provides a data-flow configuration for detecting modifications of a parameters default value.
@@ -73,7 +73,13 @@ module ModificationOfParameterWithDefault {
73
73
or
74
74
// the target of a copy step is (presumably) a different object, and hence modifications of
75
75
// this object no longer matter for the purposes of this query.
76
- TTP:: copyStep ( _, node ) and state in [ true , false ]
76
+ copyTarget ( node ) and state in [ true , false ]
77
+ }
78
+
79
+ private predicate copyTarget ( DataFlow:: Node node ) {
80
+ node = API:: moduleImport ( "copy" ) .getMember ( [ "copy" , "deepcopy" ] ) .getACall ( )
81
+ or
82
+ node .( DataFlow:: MethodCallNode ) .calls ( _, "copy" )
77
83
}
78
84
}
79
85
You can’t perform that action at this time.
0 commit comments