File tree Expand file tree Collapse file tree
csharp/ql/lib/semmle/code/csharp/frameworks/microsoft Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,9 +194,16 @@ class MicrosoftAspNetCoreMvcControllerBaseClass extends Class {
194194 }
195195}
196196
197- /** A subtype of `Microsoft.AspNetCore.Mvc.Controller` or `Microsoft.AspNetCore.Mvc.ControllerBase`. */
197+ /** A valid ASP.NET Core controller according to https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1 */
198198class MicrosoftAspNetCoreMvcController extends Class {
199199 MicrosoftAspNetCoreMvcController ( ) {
200+ exists ( Assembly a , string name |
201+ a .getName ( ) = name and
202+ (
203+ name = "Microsoft.AspNetCore.Mvc.Core" or
204+ name = "Microsoft.AspNetCore.Mvc.ViewFeatures"
205+ )
206+ ) and
200207 (
201208 this .getABaseType * ( ) instanceof MicrosoftAspNetCoreMvcControllerBaseClass or
202209 this .getABaseType * ( ) .getName ( ) .matches ( "%Controller" ) or
You can’t perform that action at this time.
0 commit comments