File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
ruby/ql/lib/codeql/ruby/security Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,13 @@ module CleartextLogging {
85
85
*/
86
86
private class MaskingReplacerSanitizedNode extends SanitizerIn {
87
87
MaskingReplacerSanitizedNode ( ) {
88
- exists ( MaskingReplacerSanitizer maskCall , Variable v |
89
- maskCall .getMethodName ( ) = [ "sub!" , "gsub!" ] and
90
- v = maskCall .getReceiver ( ) .asExpr ( ) .getExpr ( ) .( VariableReadAccess ) .getVariable ( ) and
91
- v = this .asExpr ( ) .getExpr ( ) .( VariableReadAccess ) .getVariable ( ) and
92
- maskCall .asExpr ( ) .getASuccessor * ( ) = this .asExpr ( )
88
+ exists ( Ssa:: Definition def |
89
+ exists ( MaskingReplacerSanitizer maskCall |
90
+ maskCall .getMethodName ( ) = [ "sub!" , "gsub!" ] and
91
+ def .hasAdjacentReads ( maskCall .getReceiver ( ) .asExpr ( ) , this .asExpr ( ) )
92
+ )
93
+ or
94
+ def .hasAdjacentReads ( any ( MaskingReplacerSanitizedNode read ) .asExpr ( ) , this .asExpr ( ) )
93
95
)
94
96
}
95
97
}
You can’t perform that action at this time.
0 commit comments