Skip to content

Commit 059d6b0

Browse files
committed
Fix warning in ServiceStack.qll
1 parent 563dc62 commit 059d6b0

File tree

1 file changed

+20
-27
lines changed

1 file changed

+20
-27
lines changed

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

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,36 @@
77

88
import csharp
99

10-
/** Provides definitions related to the namespace `ServiceStack`. */
11-
module ServiceStack {
10+
/** A class representing a Service */
11+
class ServiceClass extends Class {
12+
ServiceClass() { this.getBaseClass+().getQualifiedName()="ServiceStack.Service" }
1213

13-
/** A class representing a Service */
14-
class ServiceClass extends Class {
15-
ServiceClass() { this.getBaseClass+().getQualifiedName()="ServiceStack.Service" }
16-
17-
/** Get a method that handles incoming requests */
18-
Method getARequestMethod() {
19-
result = this.getAMethod(["Post", "Get", "Put", "Delete", "Any", "Option", "Head"])
20-
}
14+
/** Get a method that handles incoming requests */
15+
Method getARequestMethod() {
16+
result = this.getAMethod(["Post", "Get", "Put", "Delete", "Any", "Option", "Head"])
2117
}
18+
}
2219

23-
/** Top-level Request DTO types */
24-
class RequestDTO extends Class {
25-
RequestDTO() {
26-
this.getABaseInterface().getQualifiedName() = ["ServiceStack.IReturn", "ServieStack.IReturnVoid"]
27-
}
20+
/** Top-level Request DTO types */
21+
class RequestDTO extends Class {
22+
RequestDTO() {
23+
this.getABaseInterface().getQualifiedName() = ["ServiceStack.IReturn", "ServieStack.IReturnVoid"]
2824
}
25+
}
2926

30-
/** Top-level Response DTO types */
31-
class ResponseDTO extends Class {
32-
ResponseDTO() {
33-
exists(RequestDTO req, ConstructedGeneric respInterface |
34-
req.getABaseInterface() = respInterface and
35-
respInterface.getUndecoratedName() = "IReturn" and
36-
respInterface.getATypeArgument() = this
37-
)
38-
}
27+
/** Top-level Response DTO types */
28+
class ResponseDTO extends Class {
29+
ResponseDTO() {
30+
exists(RequestDTO req, ConstructedGeneric respInterface |
31+
req.getABaseInterface() = respInterface and
32+
respInterface.getUndecoratedName() = "IReturn" and
33+
respInterface.getATypeArgument() = this
34+
)
3935
}
4036
}
4137

4238
/** Flow sources for the ServiceStack framework */
4339
module Sources {
44-
private import ServiceStack::ServiceStack
4540
private import semmle.code.csharp.security.dataflow.flowsources.Remote
4641
private import semmle.code.csharp.commons.Collections
4742

@@ -86,7 +81,6 @@ module Sources {
8681

8782
/** SQLi support for the ServiceStack framework */
8883
module SQL {
89-
private import ServiceStack::ServiceStack
9084
private import semmle.code.csharp.security.dataflow.SqlInjection::SqlInjection
9185

9286
/** SQLi sinks for ServiceStack */
@@ -133,7 +127,6 @@ module SQL {
133127

134128
/** XSS support for ServiceStack framework */
135129
module XSS {
136-
private import ServiceStack::ServiceStack
137130
private import semmle.code.csharp.security.dataflow.XSS::XSS
138131

139132
/** XSS sinks for ServiceStack */

0 commit comments

Comments
 (0)