refactor isSanitizerEdge in clear-text-logging

This commit is contained in:
Erik Krogh Kristensen
2019-11-05 10:16:20 +01:00
parent 92dc759cf9
commit 2bd48db8cd

View File

@@ -36,10 +36,8 @@ module CleartextLogging {
override predicate isSanitizerEdge(DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel lbl) {
// Only unknown property reads on `process.env` propagate taint.
not lbl instanceof ProcessEnvLabel and
(not lbl instanceof ProcessEnvLabel or exists(succ.(DataFlow::PropRead).getPropertyName())) and
succ.(DataFlow::PropRead).getBase() = pred
or
exists(succ.(DataFlow::PropRead).getPropertyName())
}
override predicate isAdditionalFlowStep(