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 88
99private import python
1010import semmle.python.dataflow.new.DataFlow
11- private import semmle.python.dataflow.new.internal.TaintTrackingPrivate as TTP
11+ private import semmle.python.ApiGraphs
1212
1313/**
1414 * Provides a data-flow configuration for detecting modifications of a parameters default value.
@@ -73,7 +73,13 @@ module ModificationOfParameterWithDefault {
7373 or
7474 // the target of a copy step is (presumably) a different object, and hence modifications of
7575 // 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" )
7783 }
7884 }
7985
You can’t perform that action at this time.
0 commit comments