File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
ruby/ql/lib/codeql/ruby/security/internal Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ module CleartextSources {
196
196
HashLiteralPasswordSource ( ) {
197
197
exists ( DataFlow:: Node val , CfgNodes:: ExprNodes:: HashLiteralCfgNode lit |
198
198
name .regexpMatch ( maybePassword ( ) ) and
199
- not name . regexpMatch ( notSensitiveRegexp ( ) ) and
199
+ not nameIsNotSensitive ( name ) and
200
200
// avoid safe values assigned to presumably unsafe names
201
201
not val instanceof NonCleartextPassword and
202
202
// hash = { name: val }
@@ -220,6 +220,7 @@ module CleartextSources {
220
220
// avoid safe values assigned to presumably unsafe names
221
221
not this instanceof NonCleartextPassword and
222
222
name .regexpMatch ( maybePassword ( ) ) and
223
+ not nameIsNotSensitive ( name ) and
223
224
exists ( Assignment a |
224
225
this .asExpr ( ) .getExpr ( ) = a .getRightOperand ( ) and
225
226
a .getLeftOperand ( ) .getAVariable ( ) .getName ( ) = name
@@ -235,6 +236,7 @@ module CleartextSources {
235
236
236
237
ParameterPasswordSource ( ) {
237
238
name .regexpMatch ( maybePassword ( ) ) and
239
+ not nameIsNotSensitive ( name ) and
238
240
not this instanceof NonCleartextPassword and
239
241
exists ( Parameter p , LocalVariable v |
240
242
v = p .getAVariable ( ) and
You can’t perform that action at this time.
0 commit comments