add taint step through the wrap-ansi library

This commit is contained in:
Erik Krogh Kristensen
2021-06-22 22:59:03 +02:00
parent 626a653401
commit e4427bb34a
4 changed files with 54 additions and 30 deletions

View File

@@ -228,3 +228,15 @@ class ColorsStep extends TaintTracking::SharedTaintStep {
)
}
}
/**
* A step through the [`wrap-ansi`](https://npmjs.org/package/wrap-ansi) library.
*/
class WrapAnsiStep extends TaintTracking::SharedTaintStep {
override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(API::CallNode call | call = API::moduleImport("wrap-ansi").getACall() |
pred = call.getArgument(0) and
succ = call
)
}
}