@@ -13,6 +13,7 @@ private import FlowSummaryImpl::Private
13
13
private import FlowSummaryImpl:: Public
14
14
private import semmle.code.csharp.Unification
15
15
private import semmle.code.csharp.dataflow.ExternalFlow
16
+ private import semmle.code.csharp.dataflow.FlowSummary as FlowSummary
16
17
17
18
/** Gets the parameter position of the instance parameter. */
18
19
ArgumentPosition instanceParameterPosition ( ) { none ( ) } // disables implicit summary flow to `this` for callbacks
@@ -84,6 +85,21 @@ DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) {
84
85
)
85
86
}
86
87
88
+ private predicate summaryElement0 (
89
+ DotNet:: Callable c , string input , string output , string kind , boolean generated
90
+ ) {
91
+ exists (
92
+ string namespace , string type , boolean subtypes , string name , string signature , string ext
93
+ |
94
+ summaryModel ( namespace , type , subtypes , name , signature , ext , input , output , kind , generated ) and
95
+ c = interpretElement ( namespace , type , subtypes , name , signature , ext )
96
+ )
97
+ }
98
+
99
+ private class SummarizedCallableExternal extends FlowSummary:: SummarizedCallable {
100
+ SummarizedCallableExternal ( ) { summaryElement0 ( this , _, _, _, _) }
101
+ }
102
+
87
103
/**
88
104
* Holds if an external flow summary exists for `c` with input specification
89
105
* `input`, output specification `output`, kind `kind`, and a flag `generated`
@@ -92,12 +108,7 @@ DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) {
92
108
predicate summaryElement (
93
109
DataFlowCallable c , string input , string output , string kind , boolean generated
94
110
) {
95
- exists (
96
- string namespace , string type , boolean subtypes , string name , string signature , string ext
97
- |
98
- summaryModel ( namespace , type , subtypes , name , signature , ext , input , output , kind , generated ) and
99
- c .asCallable ( ) = interpretElement ( namespace , type , subtypes , name , signature , ext )
100
- )
111
+ summaryElement0 ( c .asSummarizedCallable ( ) , input , output , kind , generated )
101
112
}
102
113
103
114
/**
0 commit comments