@@ -104,7 +104,7 @@ class MethodEndpoint extends Endpoint instanceof DataFlow::MethodNode {
104
104
105
105
/** Holds if this API has a supported summary. */
106
106
pragma [ nomagic]
107
- predicate hasSummary ( ) { none ( ) }
107
+ predicate hasSummary ( ) { this . getNode ( ) instanceof SummaryCallable }
108
108
109
109
/** Holds if this API is a known source. */
110
110
pragma [ nomagic]
@@ -116,7 +116,7 @@ class MethodEndpoint extends Endpoint instanceof DataFlow::MethodNode {
116
116
117
117
/** Holds if this API is a known neutral. */
118
118
pragma [ nomagic]
119
- predicate isNeutral ( ) { none ( ) }
119
+ predicate isNeutral ( ) { this . getNode ( ) instanceof NeutralCallable }
120
120
121
121
/**
122
122
* Holds if this API is supported by existing CodeQL libraries, that is, it is either a
@@ -183,6 +183,30 @@ class SourceCallable extends DataFlow::CallableNode {
183
183
}
184
184
}
185
185
186
+ /**
187
+ * A callable where there exists a MaD summary model that applies to it.
188
+ */
189
+ class SummaryCallable extends DataFlow:: CallableNode {
190
+ SummaryCallable ( ) {
191
+ exists ( string type , string path |
192
+ Util:: pathToMethod ( this , type , path ) and
193
+ summaryModel ( type , path , _, _, _)
194
+ )
195
+ }
196
+ }
197
+
198
+ /**
199
+ * A callable where there exists a MaD neutral model that applies to it.
200
+ */
201
+ class NeutralCallable extends DataFlow:: CallableNode {
202
+ NeutralCallable ( ) {
203
+ exists ( string type , string path |
204
+ Util:: pathToMethod ( this , type , path ) and
205
+ neutralModel ( type , path , _)
206
+ )
207
+ }
208
+ }
209
+
186
210
/**
187
211
* A module defined in source code
188
212
*/
0 commit comments