mirror of
https://github.com/github/codeql.git
synced 2026-01-29 06:12:58 +01:00
Remove now-unnecessary bindingset annotations
This commit is contained in:
@@ -9,23 +9,18 @@ private import semmle.go.security.SafeUrlFlowCustomizations
|
||||
|
||||
module Beego {
|
||||
/** Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego`. */
|
||||
bindingset[result]
|
||||
string modulePath() { result = ["github.com/astaxie/beego", "github.com/beego/beego"] }
|
||||
|
||||
/** Gets the path for the root package of beego. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package(modulePath(), "") }
|
||||
|
||||
/** Gets the path for the context package of beego. */
|
||||
bindingset[result]
|
||||
string contextPackagePath() { result = package(modulePath(), "context") }
|
||||
|
||||
/** Gets the path for the logs package of beego. */
|
||||
bindingset[result]
|
||||
string logsPackagePath() { result = package(modulePath(), "logs") }
|
||||
|
||||
/** Gets the path for the utils package of beego. */
|
||||
bindingset[result]
|
||||
string utilsPackagePath() { result = package(modulePath(), "utils") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,6 @@ private import semmle.go.security.StoredXssCustomizations
|
||||
|
||||
module BeegoOrm {
|
||||
/** Gets the package name `github.com/astaxie/beego/orm`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/astaxie/beego", "orm") }
|
||||
|
||||
private class DbSink extends SQL::QueryString::Range {
|
||||
|
||||
@@ -6,7 +6,6 @@ import go
|
||||
|
||||
private module Chi {
|
||||
/** Gets the package name `github.com/go-chi/chi`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/go-chi/chi", "") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,6 @@ module Couchbase {
|
||||
* Note that v1 and v2 have different APIs, but the names are disjoint so there is no need to
|
||||
* distinguish between them.
|
||||
*/
|
||||
bindingset[result]
|
||||
string packagePath() {
|
||||
result =
|
||||
package([
|
||||
|
||||
@@ -7,7 +7,6 @@ import go
|
||||
|
||||
private module Echo {
|
||||
/** Gets the package name `github.com/labstack/echo`. */
|
||||
bindingset[result]
|
||||
private string packagePath() { result = package("github.com/labstack/echo", "") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,6 @@ import go
|
||||
*/
|
||||
module ElazarlGoproxy {
|
||||
/** Gets the package name. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/elazarl/goproxy", "") }
|
||||
|
||||
private class NewResponse extends HTTP::HeaderWrite::Range, DataFlow::CallNode {
|
||||
|
||||
@@ -44,7 +44,6 @@ module EmailData {
|
||||
}
|
||||
|
||||
/** Gets the package name `github.com/sendgrid/sendgrid-go/helpers/mail`. */
|
||||
bindingset[result]
|
||||
private string sendgridMail() {
|
||||
result = package("github.com/sendgrid/sendgrid-go", "helpers/mail")
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import go
|
||||
|
||||
/** Gets the package name `github.com/json-iterator/go`. */
|
||||
bindingset[result]
|
||||
private string packagePath() { result = package("github.com/json-iterator/go", "") }
|
||||
|
||||
/** A model of json-iterator's `Unmarshal` function, propagating taint from the JSON input to the decoded object. */
|
||||
|
||||
@@ -6,7 +6,6 @@ import go
|
||||
|
||||
private module EvanphxJsonPatch {
|
||||
/** Gets the package name `github.com/evanphx/json-patch`. */
|
||||
bindingset[result]
|
||||
private string packagePath() { result = package("github.com/evanphx/json-patch", "") }
|
||||
|
||||
private class MergeMergePatches extends TaintTracking::FunctionModel {
|
||||
|
||||
@@ -6,7 +6,6 @@ import go
|
||||
|
||||
private module Gin {
|
||||
/** Gets the package name `github.com/gin-gonic/gin`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/gin-gonic/gin", "") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,6 @@ import go
|
||||
*/
|
||||
module GoKit {
|
||||
/** Gets the package name. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/go-kit/kit", "") }
|
||||
|
||||
/**
|
||||
@@ -21,7 +20,6 @@ module GoKit {
|
||||
*/
|
||||
module Endpoint {
|
||||
/** Gets the package name. */
|
||||
bindingset[result]
|
||||
string endpointPackagePath() { result = package("github.com/go-kit/kit", "endpoint") }
|
||||
|
||||
// gets a function that returns an endpoint
|
||||
|
||||
@@ -5,7 +5,6 @@ import go
|
||||
*/
|
||||
private module GoRestfulHttp {
|
||||
/** Gets the package name `github.com/emicklei/go-restful`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/emicklei/go-restful", "") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,6 @@ import go
|
||||
*/
|
||||
module K8sIoApiCoreV1 {
|
||||
/** Gets the package name `k8s.io/api/core/v1`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("k8s.io/api", "core/v1") }
|
||||
|
||||
private class SecretDeepCopy extends TaintTracking::FunctionModel, Method {
|
||||
|
||||
@@ -7,7 +7,6 @@ import go
|
||||
*/
|
||||
module K8sIoApimachineryPkgRuntime {
|
||||
/** Gets the package name `k8s.io/apimachinery/pkg/runtime`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("k8s.io/apimachinery", "pkg/runtime") }
|
||||
|
||||
private class ConvertTypeToType extends TaintTracking::FunctionModel {
|
||||
|
||||
@@ -8,7 +8,6 @@ import go
|
||||
*/
|
||||
module K8sIoClientGo {
|
||||
/** Gets the package name `k8s.io/client-go/kubernetes/typed/core/v1`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("k8s.io/client-go", "kubernetes/typed/core/v1") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,6 @@ import go
|
||||
/** Provides models of commonly used functions in the `github.com/sirupsen/logrus` package. */
|
||||
module Logrus {
|
||||
/** Gets the package name `github.com/sirupsen/logrus`. */
|
||||
bindingset[result]
|
||||
string packagePath() {
|
||||
result = package(["github.com/sirupsen/logrus", "github.com/Sirupsen/logrus"], "")
|
||||
}
|
||||
|
||||
@@ -5,23 +5,19 @@ import go
|
||||
/** Provides models of commonly used functions and types in the protobuf packages. */
|
||||
module Protobuf {
|
||||
/** Gets the name of the modern protobuf top-level implementation package. */
|
||||
bindingset[result]
|
||||
string modernProtobufPackage() { result = package("google.golang.org/protobuf", "proto") }
|
||||
|
||||
/** Gets the name of the modern protobuf implementation's `protoiface` subpackage. */
|
||||
bindingset[result]
|
||||
string protobufIfacePackage() {
|
||||
result = package("google.golang.org/protobuf", "runtime/protoiface")
|
||||
}
|
||||
|
||||
/** Gets the name of the modern protobuf implementation's `protoreflect` subpackage. */
|
||||
bindingset[result]
|
||||
string protobufReflectPackage() {
|
||||
result = package("google.golang.org/protobuf", "reflect/protoreflect")
|
||||
}
|
||||
|
||||
/** Gets the name of a top-level protobuf implementation package. */
|
||||
bindingset[result]
|
||||
string protobufPackages() {
|
||||
result in [package("github.com/golang/protobuf", "proto"), modernProtobufPackage()]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ private import semmle.go.security.OpenUrlRedirectCustomizations
|
||||
/** Provides classes and methods modelling the Revel web framework. */
|
||||
module Revel {
|
||||
/** Gets the package name `github.com/revel/revel`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package(["github.com/revel", "github.com/robfig"], "revel") }
|
||||
|
||||
private class ControllerParams extends UntrustedFlowSource::Range, DataFlow::FieldReadNode {
|
||||
|
||||
@@ -101,11 +101,9 @@ module SQL {
|
||||
}
|
||||
|
||||
/** A string that might identify package `go-pg/pg` or a specific version of it. */
|
||||
bindingset[result]
|
||||
private string gopg() { result = package("github.com/go-pg/pg", "") }
|
||||
|
||||
/** A string that might identify package `go-pg/pg/orm` or a specific version of it. */
|
||||
bindingset[result]
|
||||
private string gopgorm() { result = package("github.com/go-pg/pg", "orm") }
|
||||
|
||||
/**
|
||||
@@ -219,7 +217,6 @@ module SQL {
|
||||
|
||||
module Gorm {
|
||||
/** Gets the package name for Gorm. */
|
||||
bindingset[result]
|
||||
string packagePath() {
|
||||
result = package(["github.com/jinzhu/gorm", "github.com/go-gorm/gorm", "gorm.io/gorm"], "")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import go
|
||||
*/
|
||||
module Spew {
|
||||
/** Gets the package path `github.com/davecgh/go-spew/spew`. */
|
||||
bindingset[result]
|
||||
private string packagePath() { result = package("github.com/davecgh/go-spew", "spew") }
|
||||
|
||||
private class SpewCall extends LoggerCall::Range, DataFlow::CallNode {
|
||||
|
||||
@@ -79,7 +79,6 @@ private class GoShCommandExecution extends SystemCommandExecution::Range, DataFl
|
||||
|
||||
module CryptoSsh {
|
||||
/** Gets the package path `golang.org/x/crypto/ssh`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("golang.org/x/crypto", "ssh") }
|
||||
|
||||
/**
|
||||
|
||||
@@ -90,7 +90,6 @@ module TestFile {
|
||||
/** Provides classes modelling Ginkgo. */
|
||||
module Ginkgo {
|
||||
/** Gets the package path `github.com/onsi/ginkgo`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/onsi/ginkgo", "") }
|
||||
|
||||
/** The Ginkgo `Fail` function, which always panics. */
|
||||
|
||||
@@ -300,24 +300,20 @@ module WebSocketReader {
|
||||
|
||||
module GorillaWebsocket {
|
||||
/** Gets the package name `github.com/gorilla/websocket`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/gorilla", "websocket") }
|
||||
}
|
||||
|
||||
module GolangOrgXNetWebsocket {
|
||||
/** Gets the package name `golang.org/x/net/websocket`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("golang.org/x/net", "websocket") }
|
||||
}
|
||||
|
||||
module NhooyrWebSocket {
|
||||
/** Gets the package name `nhooyr.io/websocket/`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("nhooyr.io/websocket", "") }
|
||||
}
|
||||
|
||||
module GobwasWs {
|
||||
/** Gets the package name `github.com/gobwas/ws`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("github.com/gobwas/ws", "") }
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import go
|
||||
/** Provides models of commonly used functions in the `golang.org/x/net/html` subpackage. */
|
||||
module XNetHtml {
|
||||
/** Gets the package name `golang.org/x/net/html`. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("golang.org/x/net", "html") }
|
||||
|
||||
private class EscapeString extends HtmlEscapeFunction, TaintTracking::FunctionModel {
|
||||
|
||||
@@ -191,7 +191,6 @@ module XPath {
|
||||
|
||||
module XmlPath {
|
||||
/** Gets the package name `github.com/go-xmlpath/xmlpath` or `gopkg.in/xmlpath`. */
|
||||
bindingset[result]
|
||||
string packagePath() {
|
||||
result = package(["github.com/go-xmlpath/xmlpath", "gopkg.in/xmlpath"], "")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import go
|
||||
*/
|
||||
module Yaml {
|
||||
/** Gets a package path for the Yaml package. */
|
||||
bindingset[result]
|
||||
string packagePath() { result = package("gopkg.in/yaml", "") }
|
||||
|
||||
private class MarshalFunction extends TaintTracking::FunctionModel, MarshalingFunction::Range {
|
||||
|
||||
@@ -9,7 +9,6 @@ import go
|
||||
*/
|
||||
module Zap {
|
||||
/** Gets the package path `go.uber.org/zap`. */
|
||||
bindingset[result]
|
||||
private string packagePath() { result = package("go.uber.org/zap", "") }
|
||||
|
||||
/** Gets a suffix for a method on `zap.SugaredLogger`. */
|
||||
|
||||
@@ -12,7 +12,6 @@ module Context {
|
||||
* The two packages are identical; before Go 1.7 it was only available
|
||||
* under `golang.org/x`; as of Go 1.7 it is included in the standard library.
|
||||
*/
|
||||
bindingset[result]
|
||||
private string packagePath() { result = ["context", package("golang.org/x/net", "context")] }
|
||||
|
||||
private class FunctionModels extends TaintTracking::FunctionModel {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nonexistent-test-pkg"
|
||||
"github.com/nonexistent/test"
|
||||
test2 "github.com/nonexistent/v2/test"
|
||||
_ "github.com/nonexistent/test"
|
||||
_ "github.com/nonexistent/v2/test"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| PackageName/test |
|
||||
| PackageName/v2/test |
|
||||
| github.com/nonexistent/test |
|
||||
| github.com/nonexistent/v2/test |
|
||||
|
||||
Reference in New Issue
Block a user