mirror of
https://github.com/github/codeql.git
synced 2026-03-27 17:58:17 +01:00
20 lines
724 B
Plaintext
20 lines
724 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"
|
|
)
|
|
}
|
|
}
|