File tree Expand file tree Collapse file tree
csharp/ql/lib/semmle/code/csharp/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,23 +52,24 @@ class IDbCommandConstructionSqlExpr extends SqlExpr, ObjectCreation {
5252class DapperCommandDefinitionMethodCallSqlExpr extends SqlExpr , ObjectCreation {
5353 DapperCommandDefinitionMethodCallSqlExpr ( ) {
5454 this .getObjectType ( ) instanceof Dapper:: CommandDefinitionStruct and
55- exists ( Conf c | c . hasFlow ( DataFlow:: exprNode ( this ) , _) )
55+ DapperCommandDefinitionMethodCallSql :: flow ( DataFlow:: exprNode ( this ) , _)
5656 }
5757
5858 override Expr getSql ( ) { result = this .getArgumentForName ( "commandText" ) }
5959}
6060
61- private class Conf extends DataFlow4:: Configuration {
62- Conf ( ) { this = "DapperCommandDefinitionFlowConfig" }
63-
64- override predicate isSource ( DataFlow:: Node node ) {
61+ private module DapperCommandDefitionMethodCallSqlConfig implements DataFlow:: ConfigSig {
62+ predicate isSource ( DataFlow:: Node node ) {
6563 node .asExpr ( ) .( ObjectCreation ) .getObjectType ( ) instanceof Dapper:: CommandDefinitionStruct
6664 }
6765
68- override predicate isSink ( DataFlow:: Node node ) {
66+ predicate isSink ( DataFlow:: Node node ) {
6967 exists ( MethodCall mc |
7068 mc .getTarget ( ) = any ( Dapper:: SqlMapperClass c ) .getAQueryMethod ( ) and
7169 node .asExpr ( ) = mc .getArgumentForName ( "command" )
7270 )
7371 }
7472}
73+
74+ private module DapperCommandDefinitionMethodCallSql =
75+ DataFlow:: Global< DapperCommandDefitionMethodCallSqlConfig > ;
You can’t perform that action at this time.
0 commit comments