File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,40 @@ class AspNetServiceRemoteFlowSource extends AspNetRemoteFlowSource, DataFlow::Pa
115115 override string getSourceType ( ) { result = "ASP.NET web service input" }
116116}
117117
118+ /**
119+ * Taint members (transitively) on types used in
120+ * 1. Action method parameters.
121+ * 2. WebMethod parameters.
122+ *
123+ * Note, that this also impacts uses of such types in other contexts.
124+ */
125+ private class AspNetRemoteFlowSourceMember extends TaintTracking:: TaintedMember {
126+ AspNetRemoteFlowSourceMember ( ) {
127+ exists ( Type t , Type t0 | t = this .getDeclaringType ( ) |
128+ ( t = t0 or t = t0 .( ArrayType ) .getElementType ( ) ) and
129+ (
130+ t0 = any ( AspNetRemoteFlowSourceMember m ) .getType ( )
131+ or
132+ t0 = any ( ActionMethodParameter p ) .getType ( )
133+ or
134+ t0 = any ( AspNetServiceRemoteFlowSource source ) .getType ( )
135+ )
136+ ) and
137+ this .isPublic ( ) and
138+ not this .isStatic ( ) and
139+ (
140+ this =
141+ any ( Property p |
142+ p .isAutoImplemented ( ) and
143+ p .getGetter ( ) .isPublic ( ) and
144+ p .getSetter ( ) .isPublic ( )
145+ )
146+ or
147+ this = any ( Field f | f .isPublic ( ) )
148+ )
149+ }
150+ }
151+
118152/** A data flow source of remote user input (ASP.NET request message). */
119153class SystemNetHttpRequestMessageRemoteFlowSource extends AspNetRemoteFlowSource , DataFlow:: ExprNode
120154{
You can’t perform that action at this time.
0 commit comments