Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify CredentialExpr as the AddExpr step is included by TaintTrack…
…ing::localTaintStep(node1, node2)
  • Loading branch information
luchua-bc authored May 13, 2020
commit 632cb8b666083615394a509c839d19ca40a2bb6c
8 changes: 2 additions & 6 deletions java/ql/src/experimental/CWE-532/SensitiveInfoLog.ql
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ private string getACredentialRegex() {
result = "(?i)(.*username|url).*"
}

/** The variable or concatenated string with the variable that keeps sensitive information judging by its name * */
/** Variable keeps sensitive information judging by its name * */
class CredentialExpr extends Expr {
CredentialExpr() {
exists(Variable v |
(this.(AddExpr).getAnOperand() = v.getAnAccess() or this = v.getAnAccess())
|
v.getName().regexpMatch(getACredentialRegex())
)
exists(Variable v | this = v.getAnAccess() | v.getName().regexpMatch(getACredentialRegex()))
}
}

Expand Down