This commit is contained in:
cokeBeer 2022-05-13 21:21:16 +08:00
Родитель 252b19063e
Коммит 808dde2fc1
1 изменённых файлов: 25 добавлений и 15 удалений

Просмотреть файл

@ -12,29 +12,39 @@ private import semmle.go.security.SafeUrlFlowCustomizations
* from the [Beego](https://github.com/beego/beego) package.
*/
module Beego {
/**
* Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego`
* or `github.com/beego/beego/v2`.
*/
string modulePath() {
result =
[
"github.com/astaxie/beego", "github.com/beego/beego",
"github.com/beego/beego/v2"
]
}
/** Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego` */
string modulePath() { result = ["github.com/astaxie/beego", "github.com/beego/beego"] }
/** Gets the v2 module path `github.com/beego/beego/v2` */
string v2modulePath() { result = "github.com/beego/beego/v2" }
/** Gets the path for the root package of beego. */
string packagePath() { result = package(modulePath(), ["", "server/web"]) }
string packagePath() {
result = package(modulePath(), "")
or
result = package(v2modulePath(), "server/web")
}
/** Gets the path for the context package of beego. */
string contextPackagePath() { result = package(modulePath(), ["context", "server/web/context"]) }
string contextPackagePath() {
result = package(modulePath(), "context")
or
result = package(v2modulePath(), "server/web/context")
}
/** Gets the path for the logs package of beego. */
string logsPackagePath() { result = package(modulePath(), ["logs", "core/logs"]) }
string logsPackagePath() {
result = package(modulePath(), "logs")
or
result = package(v2modulePath(), "core/logs")
}
/** Gets the path for the utils package of beego. */
string utilsPackagePath() { result = package(modulePath(), ["utils", "core/utils"]) }
string utilsPackagePath() {
result = package(modulePath(), "utils")
or
result = package(v2modulePath(), "core/utils")
}
/**
* `BeegoInput` sources of untrusted data.