Skip to content

Commit 34e04ff

Browse files
committed
Python: remove the imprecise container taint steps
1 parent 6c727b1 commit 34e04ff

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

Diff for: python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll

-31
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ private module Cached {
4444
or
4545
stringManipulation(nodeFrom, nodeTo)
4646
or
47-
containerStep(nodeFrom, nodeTo)
48-
or
4947
copyStep(nodeFrom, nodeTo)
5048
or
5149
DataFlowPrivate::forReadStep(nodeFrom, _, nodeTo)
@@ -162,35 +160,6 @@ predicate stringManipulation(DataFlow::CfgNode nodeFrom, DataFlow::CfgNode nodeT
162160
// TODO: Handle functions in https://docs.python.org/3/library/binascii.html
163161
}
164162

165-
/**
166-
* Holds if taint can flow from `nodeFrom` to `nodeTo` with a step related to containers
167-
* (lists/sets/dictionaries): literals, constructor invocation, methods. Note that this
168-
* is currently very imprecise, as an example, since we model `dict.get`, we treat any
169-
* `<tainted object>.get(<arg>)` will be tainted, whether it's true or not.
170-
*/
171-
predicate containerStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
172-
// construction by literal
173-
//
174-
// TODO: once we have proper flow-summary modeling, we might not need this step any
175-
// longer -- but there needs to be a matching read-step for the store-step, and we
176-
// don't provide that right now.
177-
DataFlowPrivate::listStoreStep(nodeFrom, _, nodeTo)
178-
or
179-
DataFlowPrivate::setStoreStep(nodeFrom, _, nodeTo)
180-
or
181-
DataFlowPrivate::tupleStoreStep(nodeFrom, _, nodeTo)
182-
or
183-
DataFlowPrivate::dictStoreStep(nodeFrom, _, nodeTo)
184-
or
185-
// comprehension, so there is taint-flow from `x` in `[x for x in xs]` to the
186-
// resulting list of the list-comprehension.
187-
//
188-
// TODO: once we have proper flow-summary modeling, we might not need this step any
189-
// longer -- but there needs to be a matching read-step for the store-step, and we
190-
// don't provide that right now.
191-
DataFlowPrivate::comprehensionStoreStep(nodeFrom, _, nodeTo)
192-
}
193-
194163
/**
195164
* Holds if taint can flow from `nodeFrom` to `nodeTo` with a step related to copying.
196165
*/

0 commit comments

Comments
 (0)