File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,15 @@ import semmle.code.java.frameworks.android.Compose
8
8
private import semmle.code.java.security.Sanitizers
9
9
10
10
/** A variable that may hold sensitive information, judging by its name. */
11
- class CredentialExpr extends Expr {
11
+ class VariableWithSensitiveName extends Variable {
12
+ VariableWithSensitiveName ( ) { this .getName ( ) .regexpMatch ( getCommonSensitiveInfoRegex ( ) ) }
13
+ }
14
+
15
+ /** A reference to a variable that may hold sensitive information, judging by its name. */
16
+ class CredentialExpr extends VarAccess {
12
17
CredentialExpr ( ) {
13
- exists ( Variable v | this = v .getAnAccess ( ) |
14
- v .getName ( ) .regexpMatch ( getCommonSensitiveInfoRegex ( ) ) and
15
- not this instanceof CompileTimeConstantExpr
16
- )
18
+ this .getVariable ( ) instanceof VariableWithSensitiveName and
19
+ not this instanceof CompileTimeConstantExpr
17
20
}
18
21
}
19
22
You can’t perform that action at this time.
0 commit comments