Skip to content

Instantly share code, notes, and snippets.

@mjul
Created April 30, 2015 11:26
Show Gist options
  • Save mjul/aa511ddeee446a26ceb4 to your computer and use it in GitHub Desktop.
Save mjul/aa511ddeee446a26ceb4 to your computer and use it in GitHub Desktop.
NDepend - find ASP.NET web pages not using an authorization service
// <Name>Web pages that do not use the AuthorizationService</Name>
from t in JustMyCode.Types
where t.DeriveFrom("System.Web.UI.Page")
from pl in t.Methods
where pl.SimpleName == "Page_Load"
&& !pl.IsUsingType("Cyberdyne.AuthorizationService")
select new { t, t.BaseClass, pl.SimpleName }
@mjul
Copy link
Author

mjul commented Apr 30, 2015

I found this useful while reviewing a legacy system for security issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment