Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
hasFilteredFlowPath
1 parent 5637d57 commit 995efefCopy full SHA for 995efef
1 file changed
cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql
@@ -111,6 +111,10 @@ class TaintedPathConfiguration extends TaintTracking::Configuration {
111
112
predicate hasFilteredFlowPath(DataFlow::PathNode source, DataFlow::PathNode sink) {
113
this.hasFlowPath(source, sink) and
114
+ // The use of `isUserInput` in `isSink` in combination with `asSourceExpr` causes
115
+ // duplicate results. Filter these duplicates. The proper solution is to switch to
116
+ // using `LocalFlowSource` and `RemoteFlowSource`, but this currently only supports
117
+ // a subset of the cases supported by `isUserInput`.
118
not exists(DataFlow::PathNode source2 |
119
this.hasFlowPath(source2, sink) and
120
asSourceExpr(source.getNode()) = asSourceExpr(source2.getNode())
0 commit comments