@@ -90,39 +90,37 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari
90
90
}
91
91
92
92
class RequiredSummaryComponentStack = Impl:: Public:: RequiredSummaryComponentStack ;
93
- // // This gives access to getNodeFromPath, which is not constrained to `CallNode`s
94
- // // as `resolvedSummaryBase` is.
95
- // private import semmle.python.frameworks.data.internal.ApiGraphModels as AGM
96
- //
97
- // private class SummarizedCallableFromModel extends SummarizedCallable {
98
- // string package;
99
- // string type;
100
- // string path;
101
- // SummarizedCallableFromModel() {
102
- // ModelOutput::relevantSummaryModel(package, type, path, _, _, _) and
103
- // this = package + ";" + type + ";" + path
104
- // }
105
- // override CallCfgNode getACall() {
106
- // exists(API::CallNode base |
107
- // ModelOutput::resolvedSummaryBase(package, type, path, base) and
108
- // result = base.getACall()
109
- // )
110
- // }
111
- // override ArgumentNode getACallback() {
112
- // exists(API::Node base |
113
- // base = AGM::getNodeFromPath(package, type, path) and
114
- // result = base.getAValueReachableFromSource()
115
- // )
116
- // }
117
- // override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
118
- // exists(string kind |
119
- // ModelOutput::relevantSummaryModel(package, type, path, input, output, kind)
120
- // |
121
- // kind = "value" and
122
- // preservesValue = true
123
- // or
124
- // kind = "taint" and
125
- // preservesValue = false
126
- // )
127
- // }
128
- // }
93
+
94
+ private class SummarizedCallableFromModel extends SummarizedCallable {
95
+ string type ;
96
+ string path ;
97
+
98
+ SummarizedCallableFromModel ( ) {
99
+ ModelOutput:: relevantSummaryModel ( type , path , _, _, _) and
100
+ this = type + ";" + path
101
+ }
102
+
103
+ override CallCfgNode getACall ( ) {
104
+ exists ( API:: CallNode base |
105
+ ModelOutput:: resolvedSummaryBase ( type , path , base ) and
106
+ result = base .getACall ( )
107
+ )
108
+ }
109
+
110
+ override ArgumentNode getACallback ( ) {
111
+ exists ( API:: Node base |
112
+ ModelOutput:: resolvedSummaryRefBase ( type , path , base ) and
113
+ result = base .getAValueReachableFromSource ( )
114
+ )
115
+ }
116
+
117
+ override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
118
+ exists ( string kind | ModelOutput:: relevantSummaryModel ( type , path , input , output , kind ) |
119
+ kind = "value" and
120
+ preservesValue = true
121
+ or
122
+ kind = "taint" and
123
+ preservesValue = false
124
+ )
125
+ }
126
+ }
0 commit comments