Skip to content

Commit 2bd48db

Browse files
committed
refactor isSanitizerEdge in clear-text-logging
1 parent 92dc759 commit 2bd48db

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

javascript/ql/src/semmle/javascript/security/dataflow/CleartextLogging.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ module CleartextLogging {
3636

3737
override predicate isSanitizerEdge(DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel lbl) {
3838
// Only unknown property reads on `process.env` propagate taint.
39-
not lbl instanceof ProcessEnvLabel and
39+
(not lbl instanceof ProcessEnvLabel or exists(succ.(DataFlow::PropRead).getPropertyName())) and
4040
succ.(DataFlow::PropRead).getBase() = pred
41-
or
42-
exists(succ.(DataFlow::PropRead).getPropertyName())
4341
}
4442

4543
override predicate isAdditionalFlowStep(

0 commit comments

Comments
 (0)