mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
add a taint step through the ansi-to-html library
This commit is contained in:
@@ -337,3 +337,17 @@ class StripAnsiStep extends TaintTracking::SharedTaintStep {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A step through the [`ansi-to-html`](https://npmjs.org/package/ansi-to-html) library.
|
||||
*/
|
||||
class AnsiToHtmlStep extends TaintTracking::SharedTaintStep {
|
||||
override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(API::CallNode call |
|
||||
call = API::moduleImport("ansi-to-html").getInstance().getMember("toHtml").getACall()
|
||||
|
|
||||
pred = call.getArgument(0) and
|
||||
succ = call
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user