add heuristic taint-step for potentially unmodelled libraries, and meta query for counting potential unmodelled steps

This commit is contained in:
Erik Krogh Kristensen
2022-06-15 20:27:30 +02:00
parent b16124d522
commit ce323e215b
2 changed files with 54 additions and 0 deletions

View File

@@ -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
)
}
}