Skip to content

Commit e1c7003

Browse files
committed
C#: Only consider directly public auto implemented properties with public getters and setters as being tainted.
1 parent ef0a3d0 commit e1c7003

File tree

1 file changed

+6
-1
lines changed
  • csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources

1 file changed

+6
-1
lines changed

csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Remote.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ abstract class AspNetCoreRemoteFlowSource extends RemoteFlowSource { }
179179
*/
180180
private class AspNetCoreRemoteFlowSourceMember extends TaintTracking::TaintedMember {
181181
AspNetCoreRemoteFlowSourceMember() {
182-
this.getDeclaringType() = any(AspNetCoreRemoteFlowSource source).getType()
182+
this.getDeclaringType() = any(AspNetCoreRemoteFlowSource source).getType() and
183+
this.isPublic() and
184+
not this.isStatic() and
185+
exists(Property p | p = this |
186+
p.isAutoImplemented() and p.getGetter().isPublic() and p.getSetter().isPublic()
187+
)
183188
}
184189
}
185190

0 commit comments

Comments
 (0)