mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Consider MaD models ref whether a package should be considered an unknown external.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
*/
|
||||
|
||||
import go
|
||||
|
||||
private import semmle.go.dataflow.FlowSummary
|
||||
private import Xss
|
||||
private import SqlInjectionCustomizations
|
||||
private import RequestForgeryCustomizations
|
||||
@@ -148,10 +150,17 @@ Package getAPackageWithFunctionModels() {
|
||||
exists(getAMethodModelInPackage(result))
|
||||
}
|
||||
|
||||
/** Gets the name of a package that has at least one SummarizedCallable. */
|
||||
Package getAPackageWithSummarizedCallables() {
|
||||
result = any(SummarizedCallable c).asFunction().getPackage()
|
||||
}
|
||||
|
||||
/** Gets the name of a package which has models. */
|
||||
Package getAPackageWithModels() {
|
||||
result = getAPackageWithFunctionModels()
|
||||
or
|
||||
result = getAPackageWithSummarizedCallables()
|
||||
or
|
||||
// An incomplete list of packages which have been modeled but do not have any function models
|
||||
result.getPath() in [
|
||||
Logrus::packagePath(), GolangOrgXNetWebsocket::packagePath(), GorillaWebsocket::packagePath()
|
||||
|
||||
Reference in New Issue
Block a user