We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d47bff commit 6d5f903Copy full SHA for 6d5f903
csharp/ql/src/semmle/code/csharp/frameworks/ServiceStack.qll
@@ -127,17 +127,12 @@ module XSS {
127
128
class XssExpr extends Expr {
129
XssExpr() {
130
- exists(ReturnStmt r |
131
- (
132
- r.getExpr().getType() instanceof StringType
133
- )
134
- |
135
- this = r.getExpr()
+ exists(ServiceClass service, ReturnStmt r |
+ this = r.getExpr() and
+ r.getEnclosingCallable() = service.getARequestMethod()
136
) or
137
exists(ObjectCreation oc |
138
- oc.getType().hasName("HttpResult") and
139
- oc.getAnArgument().getType() instanceof StringType
140
+ oc.getType().hasQualifiedName("ServiceStack.HttpResult") and
141
this = oc.getArgument(0)
142
)
143
}
0 commit comments