File tree Expand file tree Collapse file tree
ruby/ql/lib/codeql/ruby/security/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ module CleartextSources {
196196 HashLiteralPasswordSource ( ) {
197197 exists ( DataFlow:: Node val , CfgNodes:: ExprNodes:: HashLiteralCfgNode lit |
198198 name .regexpMatch ( maybePassword ( ) ) and
199- not name . regexpMatch ( notSensitiveRegexp ( ) ) and
199+ not nameIsNotSensitive ( name ) and
200200 // avoid safe values assigned to presumably unsafe names
201201 not val instanceof NonCleartextPassword and
202202 // hash = { name: val }
@@ -220,6 +220,7 @@ module CleartextSources {
220220 // avoid safe values assigned to presumably unsafe names
221221 not this instanceof NonCleartextPassword and
222222 name .regexpMatch ( maybePassword ( ) ) and
223+ not nameIsNotSensitive ( name ) and
223224 exists ( Assignment a |
224225 this .asExpr ( ) .getExpr ( ) = a .getRightOperand ( ) and
225226 a .getLeftOperand ( ) .getAVariable ( ) .getName ( ) = name
@@ -235,6 +236,7 @@ module CleartextSources {
235236
236237 ParameterPasswordSource ( ) {
237238 name .regexpMatch ( maybePassword ( ) ) and
239+ not nameIsNotSensitive ( name ) and
238240 not this instanceof NonCleartextPassword and
239241 exists ( Parameter p , LocalVariable v |
240242 v = p .getAVariable ( ) and
You can’t perform that action at this time.
0 commit comments