|
7 | 7 |
|
8 | 8 | import csharp
|
9 | 9 |
|
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" } |
12 | 13 |
|
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"]) |
21 | 17 | }
|
| 18 | +} |
22 | 19 |
|
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"] |
28 | 24 | }
|
| 25 | +} |
29 | 26 |
|
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 | + ) |
39 | 35 | }
|
40 | 36 | }
|
41 | 37 |
|
42 | 38 | /** Flow sources for the ServiceStack framework */
|
43 | 39 | module Sources {
|
44 |
| - private import ServiceStack::ServiceStack |
45 | 40 | private import semmle.code.csharp.security.dataflow.flowsources.Remote
|
46 | 41 | private import semmle.code.csharp.commons.Collections
|
47 | 42 |
|
@@ -86,7 +81,6 @@ module Sources {
|
86 | 81 |
|
87 | 82 | /** SQLi support for the ServiceStack framework */
|
88 | 83 | module SQL {
|
89 |
| - private import ServiceStack::ServiceStack |
90 | 84 | private import semmle.code.csharp.security.dataflow.SqlInjection::SqlInjection
|
91 | 85 |
|
92 | 86 | /** SQLi sinks for ServiceStack */
|
@@ -133,7 +127,6 @@ module SQL {
|
133 | 127 |
|
134 | 128 | /** XSS support for ServiceStack framework */
|
135 | 129 | module XSS {
|
136 |
| - private import ServiceStack::ServiceStack |
137 | 130 | private import semmle.code.csharp.security.dataflow.XSS::XSS
|
138 | 131 |
|
139 | 132 | /** XSS sinks for ServiceStack */
|
|
0 commit comments