mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
add heuristic taint-step for potentially unmodelled libraries, and meta query for counting potential unmodelled steps
This commit is contained in:
@@ -17,3 +17,15 @@ private class HeuristicStringManipulationTaintStep extends TaintTracking::Shared
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** Any call to a library component where we assume taint from any argument to the result */
|
||||
private class HeuristicLibraryCallTaintStep extends TaintTracking::SharedTaintStep {
|
||||
override predicate heuristicStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(API::CallNode call |
|
||||
pred = call.getAnArgument() or // the plain argument
|
||||
pred = call.getAnArgument().(DataFlow::SourceNode).getAPropertyWrite().getRhs() // one property down
|
||||
|
|
||||
succ = call
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user