add support for the strip-json-comments library

This commit is contained in:
Erik Krogh Kristensen
2021-07-12 11:08:50 +02:00
parent 23c3be6860
commit 40aa970db3
4 changed files with 18 additions and 1 deletions

View File

@@ -78,3 +78,15 @@ private class JsonParserCallWithCallback extends JsonParserCall {
override DataFlow::SourceNode getOutput() { result = getCallback(1).getParameter(1) }
}
/**
* A taint step through the `strip-json-comments` library.
*/
private class StripJsonCommentsStep extends TaintTracking::SharedTaintStep {
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
exists(API::CallNode call | call = API::moduleImport("strip-json-comments").getACall() |
pred = call.getArgument(0) and
succ = call
)
}
}