mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
JS: SortTaintStep
This commit is contained in:
@@ -686,11 +686,13 @@ module TaintTracking {
|
||||
/**
|
||||
* A taint propagating data flow edge arising from sorting.
|
||||
*/
|
||||
private class SortTaintStep extends AdditionalTaintStep, DataFlow::MethodCallNode {
|
||||
SortTaintStep() { getMethodName() = "sort" }
|
||||
|
||||
private class SortTaintStep extends SharedTaintStep {
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
pred = getReceiver() and succ = this
|
||||
exists(DataFlow::MethodCallNode call |
|
||||
call.getMethodName() = "sort" and
|
||||
pred = call.getReceiver() and
|
||||
succ = call
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user