Skip to content

Commit 632cb8b

Browse files
authored
Simplify CredentialExpr as the AddExpr step is included by TaintTracking::localTaintStep(node1, node2)
1 parent d9cc3c6 commit 632cb8b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

java/ql/src/experimental/CWE-532/SensitiveInfoLog.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ private string getACredentialRegex() {
2020
result = "(?i)(.*username|url).*"
2121
}
2222

23-
/** The variable or concatenated string with the variable that keeps sensitive information judging by its name * */
23+
/** Variable keeps sensitive information judging by its name * */
2424
class CredentialExpr extends Expr {
2525
CredentialExpr() {
26-
exists(Variable v |
27-
(this.(AddExpr).getAnOperand() = v.getAnAccess() or this = v.getAnAccess())
28-
|
29-
v.getName().regexpMatch(getACredentialRegex())
30-
)
26+
exists(Variable v | this = v.getAnAccess() | v.getName().regexpMatch(getACredentialRegex()))
3127
}
3228
}
3329

0 commit comments

Comments
 (0)