JS: Add support for dateformat package

This commit is contained in:
Asger Feldthaus
2020-11-02 11:30:59 +00:00
parent 39c8226fba
commit 9418c6c8fe
2 changed files with 17 additions and 0 deletions

View File

@@ -71,3 +71,19 @@ private module Moment {
}
}
}
private module DateFormat {
/**
* Taint step of form: `x -> dateformat(..., x)`
*
* The format string can use single-quotes to include mostly arbitrary text.
*/
private class DateFormatStep extends TaintTracking::AdditionalTaintStep, DataFlow::CallNode {
DateFormatStep() { this = DataFlow::moduleImport("dateformat").getACall() }
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
pred = getArgument(1) and
succ = this
}
}
}