File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
csharp/ql/src/semmle/code/csharp
security/dataflow/flowsinks Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,19 @@ module Sources {
83
83
84
84
/** Flow Sinks for the ServiceStack framework */
85
85
module Sinks {
86
- private import semmle.code.csharp.security.dataflow.flowsinks.Remote
86
+ private import semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink
87
87
88
88
/** RemoteFlow sinks for service stack */
89
- class ServiceStackRemoteRequestParameter extends RemoteFlowSink {
89
+ class ServiceStackRemoteRequestParameter extends ExternalLocationSink {
90
90
ServiceStackRemoteRequestParameter ( ) {
91
91
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 ( )
94
99
)
95
100
}
96
101
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import csharp
6
6
private import Remote
7
7
private import semmle.code.csharp.commons.Loggers
8
8
private import semmle.code.csharp.frameworks.system.Web
9
-
9
+ private import semmle.code.csharp.frameworks.ServiceStack :: Sinks
10
10
/**
11
11
* An external location sink.
12
12
*
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ private import ExternalLocationSink
8
8
private import Html
9
9
private import semmle.code.csharp.security.dataflow.XSS
10
10
private 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
12
12
13
13
/** A data flow sink of remote user output. */
14
14
abstract class RemoteFlowSink extends DataFlow:: Node { }
You can’t perform that action at this time.
0 commit comments