mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Simplify CredentialExpr as the AddExpr step is included by TaintTracking::localTaintStep(node1, node2)
This commit is contained in:
@@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user