@@ -72,11 +72,44 @@ private module Input implements InputSig<CsharpDataFlow> {
7272 }
7373
7474 predicate reverseReadExclude ( Node n ) { n .asExpr ( ) = any ( AwaitExpr ae ) .getExpr ( ) }
75- }
7675
77- import MakeConsistency< CsharpDataFlow , CsharpTaintTracking , Input >
76+ predicate missingArgumentCallExclude ( ArgumentNode arg ) {
77+ // TODO: Remove once object initializers are modeled properly
78+ arg .( Private:: PostUpdateNodes:: ObjectInitializerNode ) .getInitializer ( ) instanceof
79+ ObjectInitializer
80+ or
81+ // TODO: Remove once underlying issue is fixed
82+ exists ( QualifiableExpr qe |
83+ qe .isConditional ( ) and
84+ qe .getQualifier ( ) = arg .asExpr ( )
85+ )
86+ }
7887
79- query predicate multipleToString ( DataFlow:: Node n , string s ) {
80- s = strictconcat ( n .toString ( ) , "," ) and
81- strictcount ( n .toString ( ) ) > 1
88+ predicate multipleArgumentCallExclude ( ArgumentNode arg , DataFlowCall call ) {
89+ isArgumentNode ( arg , call , _) and
90+ (
91+ // TODO: Remove once object initializers are modeled properly
92+ arg =
93+ any ( Private:: PostUpdateNodes:: ObjectInitializerNode init |
94+ init .argumentOf ( call , _) and
95+ init .getInitializer ( ) .getNumberOfChildren ( ) > 1
96+ )
97+ or
98+ exists ( ControlFlow:: Nodes:: ElementNode cfn , ControlFlow:: Nodes:: Split split |
99+ exists ( arg .asExprAtNode ( cfn ) )
100+ |
101+ split = cfn .getASplit ( ) and
102+ not split = call .getControlFlowNode ( ) .getASplit ( )
103+ or
104+ split = call .getControlFlowNode ( ) .getASplit ( ) and
105+ not split = cfn .getASplit ( )
106+ )
107+ or
108+ call instanceof TransitiveCapturedDataFlowCall
109+ or
110+ call .( NonDelegateDataFlowCall ) .getDispatchCall ( ) .isReflection ( )
111+ )
112+ }
82113}
114+
115+ import MakeConsistency< CsharpDataFlow , CsharpTaintTracking , Input >
0 commit comments