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
88private import semmle.code.java.security.Sanitizers
99
1010/** 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 {
1217 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
1720 }
1821}
1922
You can’t perform that action at this time.
0 commit comments