mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Merge pull request #435 from owen-mc/use-implements-where-possible
Use `implements` for interface methods
This commit is contained in:
@@ -74,7 +74,7 @@ module Revel {
|
||||
}
|
||||
|
||||
private class ServerCookieGetValue extends TaintTracking::FunctionModel, Method {
|
||||
ServerCookieGetValue() { this.hasQualifiedName(packagePath(), "ServerCookie", "GetValue") }
|
||||
ServerCookieGetValue() { this.implements(packagePath(), "ServerCookie", "GetValue") }
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
inp.isReceiver() and outp.isResult()
|
||||
@@ -83,7 +83,7 @@ module Revel {
|
||||
|
||||
private class ServerMultipartFormGetFiles extends TaintTracking::FunctionModel, Method {
|
||||
ServerMultipartFormGetFiles() {
|
||||
this.hasQualifiedName(packagePath(), "ServerMultipartForm", ["GetFiles", "GetValues"])
|
||||
this.implements(packagePath(), "ServerMultipartForm", ["GetFiles", "GetValues"])
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
|
||||
@@ -34,9 +34,9 @@ private class DefaultSafeExternalAPIFunction extends SafeExternalAPIFunction {
|
||||
this.(Method).hasQualifiedName(package("golang.org/x/oauth2", ""), "Config", "Exchange") or
|
||||
this.hasQualifiedName(package("golang.org/x/crypto", "bcrypt"), "CompareHashAndPassword") or
|
||||
this.hasQualifiedName(package("golang.org/x/crypto", "bcrypt"), "GenerateFromPassword") or
|
||||
this.(Method).hasQualifiedName("hash", "Hash", "Sum") or
|
||||
this.(Method).hasQualifiedName("hash", "Hash32", "Sum32") or
|
||||
this.(Method).hasQualifiedName("hash", "Hash64", "Sum64") or
|
||||
this.(Method).implements("hash", "Hash", "Sum") or
|
||||
this.(Method).implements("hash", "Hash32", "Sum32") or
|
||||
this.(Method).implements("hash", "Hash64", "Sum64") or
|
||||
this.hasQualifiedName("crypto/sha256", "Sum256") or
|
||||
this.hasQualifiedName("crypto/md5", "Sum") or
|
||||
this.hasQualifiedName("crypto/sha1", "Sum")
|
||||
|
||||
Reference in New Issue
Block a user