mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
use matches instead of regexpMatch
This commit is contained in:
@@ -20,7 +20,7 @@ class SensitiveInfoExpr extends Expr {
|
||||
SensitiveInfoExpr() {
|
||||
exists(Variable v | this = v.getAnAccess() |
|
||||
v.getName().regexpMatch(getCommonSensitiveInfoRegex()) and
|
||||
not v.getName().regexpMatch("token.*") // exclude ^token.* since sensitive tokens are usually in the form of accessToken, authToken, ...
|
||||
not v.getName().matches("token%") // exclude ^token.* since sensitive tokens are usually in the form of accessToken, authToken, ...
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user