mirror of
https://github.com/github/codeql.git
synced 2026-03-23 16:06:47 +01:00
22 lines
736 B
Plaintext
22 lines
736 B
Plaintext
import csharp
|
|
|
|
class MyFlowSource extends DataFlow::Node {
|
|
MyFlowSource() {
|
|
exists(Expr e |
|
|
e = this.asExpr() |
|
|
e.(StringLiteral).getValue() = "taint source" or
|
|
e.(VariableAccess).getTarget().hasName("taintedDataContract") or
|
|
e.(VariableAccess).getTarget().hasName("taintedHttpRequest") or
|
|
e.(VariableAccess).getTarget().hasName("taintedTextBox")
|
|
)
|
|
or
|
|
this.asParameter().hasName("tainted")
|
|
or
|
|
exists(Expr e |
|
|
e = this.(DataFlow::Internal::ImplicitDelegateCallNode).getArgument() |
|
|
e.(DelegateCreation).getArgument().(MethodAccess).getTarget().hasName("TaintedMethod") or
|
|
e.(LambdaExpr).getExpressionBody().(StringLiteral).getValue() = "taint source"
|
|
)
|
|
}
|
|
}
|