Skip to content

Commit 594d51e

Browse files
Exclude constants
1 parent 06f2c03 commit 594d51e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import DataFlow
1010
class CredentialExpr extends Expr {
1111
CredentialExpr() {
1212
exists(Variable v | this = v.getAnAccess() |
13-
v.getName().regexpMatch([getCommonSensitiveInfoRegex(), "(?i).*(username).*"])
13+
v.getName().regexpMatch([getCommonSensitiveInfoRegex(), "(?i).*(username).*"]) and
14+
not v.isFinal()
1415
)
1516
}
1617
}

0 commit comments

Comments
 (0)