use matches instead of regexpMatch

This commit is contained in:
Erik Krogh Kristensen
2021-11-18 15:41:25 +01:00
parent 6c2713dd8b
commit 011fc20963
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, ...
)
}
}