Skip to content

Commit 36bb5f5

Browse files
committed
Python: Fix hasFlowPath default implementation of isSink/2
If hasFlowPath was used, and isSink/2 was not overridden, hasFlowPath(src, sink) would not use isSink/1 to restrict the allowed TaintSink. This resulted in false-positives when we had flows with unrelated TaintSinks. FP: https://lgtm.com/projects/g/graphite-project/graphite-web/snapshot/1a8e7ffc2eab2210a73f30b03e9cdeb520a02057/files/webapp/graphite/dashboard/views.py#x2d486922081db956:1 Fixes #2081
1 parent 8896fa5 commit 36bb5f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/ql/src/semmle/python/dataflow/Configuration.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ module TaintTracking {
5151
*/
5252
predicate isSink(DataFlow::Node node, TaintKind kind) {
5353
exists(TaintSink sink |
54+
this.isSink(sink) and
5455
node.asCfgNode() = sink and
5556
sink.sinks(kind)
5657
)

0 commit comments

Comments
 (0)