Model SecretInterface from k8s.io/client-go/kubernetes/typed/core/v1

This commit is contained in:
Owen Mansel-Chan
2020-12-09 07:28:00 +00:00
parent 3617a801db
commit 8fd055bc60
2 changed files with 30 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ import semmle.go.frameworks.Gin
import semmle.go.frameworks.Glog
import semmle.go.frameworks.GoRestfulHttp
import semmle.go.frameworks.K8sIoApimachineryPkgRuntime
import semmle.go.frameworks.K8sIoClientGo
import semmle.go.frameworks.Logrus
import semmle.go.frameworks.Macaron
import semmle.go.frameworks.Mux

View File

@@ -0,0 +1,29 @@
/** Provides models of commonly used functions in the `k8s.io/client-go/kubernetes/typed/core/v1` package. */
import go
/**
* Provides models of commonly used functions in the `k8s.io/client-go/kubernetes/typed/core/v1`
* package.
*/
module K8sIoClientGo {
/** Gets the package name. */
bindingset[result]
string packagePath() { result = package("k8s.io/client-go", "kubernetes/typed/core/v1") }
/**
* A model of `SecretInterface` methods that are sources of secret data.
*/
private class SecretInterfaceSourceMethod extends Method {
SecretInterfaceSourceMethod() {
this.implements(packagePath(), "SecretInterface", ["Get", "List", "Patch"])
}
}
/**
* A model of `SecretInterface` as a source of secret data.
*/
class SecretInterfaceSource extends DataFlow::Node {
SecretInterfaceSource() { this = any(SecretInterfaceSourceMethod g).getACall().getResult(0) }
}
}