mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
JS: StringFormattingStep
This commit is contained in:
@@ -520,17 +520,12 @@ module TaintTracking {
|
||||
/**
|
||||
* A taint propagating data flow edge arising from string formatting.
|
||||
*/
|
||||
private class StringFormattingTaintStep extends AdditionalTaintStep {
|
||||
PrintfStyleCall call;
|
||||
|
||||
StringFormattingTaintStep() {
|
||||
this = call and
|
||||
call.returnsFormatted()
|
||||
}
|
||||
|
||||
private class StringFormattingTaintStep extends SharedTaintStep {
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
succ = this and
|
||||
(
|
||||
exists(PrintfStyleCall call |
|
||||
call.returnsFormatted() and
|
||||
succ = call
|
||||
|
|
||||
pred = call.getFormatString()
|
||||
or
|
||||
pred = call.getFormatArgument(_)
|
||||
|
||||
Reference in New Issue
Block a user