mirror of
https://github.com/github/codeql.git
synced 2026-05-12 02:09:27 +02:00
JS: Exclude error handling from auth calls
This commit is contained in:
@@ -147,8 +147,8 @@ class AuthorizationCall extends SensitiveAction, DataFlow::CallNode {
|
||||
AuthorizationCall() {
|
||||
exists(string s | s = this.getCalleeName() |
|
||||
// name contains `login` or `auth`, but not as part of `loginfo` or `unauth`;
|
||||
// also exclude `author`
|
||||
s.regexpMatch("(?i).*(login(?!fo)|(?<!un)auth(?!or\\b)|verify).*") and
|
||||
// also exclude `author` and words followed by `err` (as in `error`)
|
||||
s.regexpMatch("(?i).*(login(?!fo)|(?<!un)auth(?!or\\b)|verify)(?!err).*") and
|
||||
// but it does not start with `get` or `set`
|
||||
not s.regexpMatch("(?i)(get|set).*")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user