File tree Expand file tree Collapse file tree
csharp/ql/src/semmle/code/csharp
security/dataflow/flowsinks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,14 +83,19 @@ module Sources {
8383
8484/** Flow Sinks for the ServiceStack framework */
8585module Sinks {
86- private import semmle.code.csharp.security.dataflow.flowsinks.Remote
86+ private import semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink
8787
8888 /** RemoteFlow sinks for service stack */
89- class ServiceStackRemoteRequestParameter extends RemoteFlowSink {
89+ class ServiceStackRemoteRequestParameter extends ExternalLocationSink {
9090 ServiceStackRemoteRequestParameter ( ) {
9191 exists ( MethodCall mc |
92- mc .getTarget ( ) .hasQualifiedName ( "ServiceStack.IRestClient.Get" ) and
93- mc .getArgument ( 0 ) = this .asExpr ( )
92+ mc .getTarget ( ) .getQualifiedName ( ) in [
93+ "ServiceStack.IRestClient.Get" , "ServiceStack.IRestClient.Put" ,
94+ "ServiceStack.IRestClient.Post" , "ServiceStack.IRestClient.Delete" ,
95+ "ServiceStack.IRestClient.Post" , "ServiceStack.IRestClient.Put" ,
96+ "ServiceStack.IRestClient.Patch" , "ServiceStack.IRestClient.Send"
97+ ] and
98+ this .asExpr ( ) = mc .getAnArgument ( )
9499 )
95100 }
96101 }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import csharp
66private import Remote
77private import semmle.code.csharp.commons.Loggers
88private import semmle.code.csharp.frameworks.system.Web
9-
9+ private import semmle.code.csharp.frameworks.ServiceStack :: Sinks
1010/**
1111 * An external location sink.
1212 *
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ private import ExternalLocationSink
88private import Html
99private import semmle.code.csharp.security.dataflow.XSS
1010private import semmle.code.csharp.frameworks.system.web.UI
11- import semmle.code.csharp.frameworks.ServiceStack:: Sinks
11+ private import semmle.code.csharp.frameworks.ServiceStack:: Sinks
1212
1313/** A data flow sink of remote user output. */
1414abstract class RemoteFlowSink extends DataFlow:: Node { }
You can’t perform that action at this time.
0 commit comments