Skip to content

Commit 858c0e6

Browse files
committed
added support for remote flow sinks in the form of parameters to the function
ServiceStack.IRestClient.Get()
1 parent 402ed04 commit 858c0e6

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

csharp/ql/src/semmle/code/csharp/frameworks/ServiceStack.qll

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,21 @@ module Sources {
7878
}
7979
}
8080
}
81-
81+
/** Flow Sinks for the ServiceStack framework */
82+
module Sinks {
83+
private import semmle.code.csharp.security.dataflow.flowsinks.Remote
84+
85+
/** RemoteFlow sinks for service stack */
86+
class ServiceStackRemoteRequestParameter extends RemoteFlowSink {
87+
ServiceStackRemoteRequestParameter() {
88+
exists(MethodCall mc |
89+
mc.getTarget().hasQualifiedName("ServiceStack.IRestClient.Get") and
90+
mc.getArgument(0) = this.asExpr()
91+
)
92+
}
93+
}
94+
}
95+
8296
/** SQLi support for the ServiceStack framework */
8397
module SQL {
8498
private import semmle.code.csharp.security.dataflow.SqlInjection::SqlInjection

csharp/ql/src/semmle/code/csharp/security/dataflow/flowsinks/Remote.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ private import ExternalLocationSink
88
private import Html
99
private import semmle.code.csharp.security.dataflow.XSS
1010
private import semmle.code.csharp.frameworks.system.web.UI
11+
import semmle.code.csharp.frameworks.ServiceStack::Sinks
1112

1213
/** A data flow sink of remote user output. */
1314
abstract class RemoteFlowSink extends DataFlow::Node { }

0 commit comments

Comments
 (0)