mirror of
https://github.com/github/codeql.git
synced 2025-12-23 04:06:37 +01:00
filter out Controller suffixed class in non asp.net projects
This commit is contained in:
committed by
Michael Nebel
parent
3d281fbb71
commit
853a80bdbc
@@ -194,9 +194,16 @@ class MicrosoftAspNetCoreMvcControllerBaseClass extends Class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A subtype of `Microsoft.AspNetCore.Mvc.Controller` or `Microsoft.AspNetCore.Mvc.ControllerBase`. */
|
/** A valid ASP.NET Core controller according to https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1 */
|
||||||
class MicrosoftAspNetCoreMvcController extends Class {
|
class MicrosoftAspNetCoreMvcController extends Class {
|
||||||
MicrosoftAspNetCoreMvcController() {
|
MicrosoftAspNetCoreMvcController() {
|
||||||
|
exists(Assembly a, string name |
|
||||||
|
a.getName() = name and
|
||||||
|
(
|
||||||
|
name = "Microsoft.AspNetCore.Mvc.Core" or
|
||||||
|
name = "Microsoft.AspNetCore.Mvc.ViewFeatures"
|
||||||
|
)
|
||||||
|
) and
|
||||||
(
|
(
|
||||||
this.getABaseType*() instanceof MicrosoftAspNetCoreMvcControllerBaseClass or
|
this.getABaseType*() instanceof MicrosoftAspNetCoreMvcControllerBaseClass or
|
||||||
this.getABaseType*().getName().matches("%Controller") or
|
this.getABaseType*().getName().matches("%Controller") or
|
||||||
|
|||||||
Reference in New Issue
Block a user