mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Improve handling of the 'author' word as an exception
This commit is contained in:
@@ -81,9 +81,9 @@ class AuthMethod extends SensitiveExecutionMethod {
|
||||
AuthMethod() {
|
||||
exists(string s | s = this.getName().toLowerCase() |
|
||||
s.matches(["%login%", "%auth%"]) and
|
||||
not s.matches([
|
||||
"get%", "set%", "parse%", "%loginfo%", "remove%", "clean%", "%unauth%", "%author%"
|
||||
])
|
||||
not s.matches(["get%", "set%", "parse%", "%loginfo%", "remove%", "clean%", "%unauth%"]) and
|
||||
// exclude "author", but not "authorize" or "authority"
|
||||
not s.regexpMatch(".*[aA]uthors?([A-Z0-9_].*|$)")
|
||||
) and
|
||||
not this.getDeclaringType().getASupertype*() instanceof TypeException
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user