Update python/ql/src/experimental/semmle/python/security/injection/CsvInjection.qll

Co-authored-by: yoff <lerchedahl@gmail.com>
This commit is contained in:
haby0
2022-03-30 22:54:30 +08:00
committed by GitHub
parent 8f2013c32e
commit 1e6893e230

View File

@@ -22,15 +22,15 @@ class CsvInjectionFlowConfig extends TaintTracking::Configuration {
}
private class StartsWithCheck extends DataFlow::BarrierGuard {
Attribute attr;
DataFlow::MethodCallNode mc;
StartsWithCheck() {
this.(CallNode).getNode().getFunc() = attr and
attr.getName() = "startswith"
this = mc.asCfgNode() and
mc.calls(_, "startswith")
}
override predicate checks(ControlFlowNode node, boolean branch) {
node = attr.getObject().getAFlowNode() and
node = mc.getObject().asCfgNode() and
branch = true
}
}