Skip to content

Commit b261145

Browse files
committed
Python: fix compilation
1 parent 571be8b commit b261145

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

python/ql/src/semmle/python/functions/ModificationOfParameterWithDefault.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
private import python
1010
import 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

0 commit comments

Comments
 (0)