Merge pull request #7169 from erik-krogh/useMatches

use matches instead of regexpMatch/prefix/suffix
This commit is contained in:
Anders Schack-Mulligen
2021-11-19 11:42:47 +01:00
committed by GitHub
11 changed files with 16 additions and 16 deletions

View File

@@ -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, ...
)
}
}