Skip to content

Commit da39c14

Browse files
committed
Python: comment out SummarizedCallableFromModel
1 parent 37fb27f commit da39c14

File tree

1 file changed

+36
-41
lines changed

1 file changed

+36
-41
lines changed

python/ql/lib/semmle/python/dataflow/new/FlowSummary.qll

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -69,44 +69,39 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari
6969
}
7070

7171
class RequiredSummaryComponentStack = Impl::Public::RequiredSummaryComponentStack;
72-
73-
// This gives access to getNodeFromPath, which is not constrained to `CallNode`s
74-
// as `resolvedSummaryBase` is.
75-
private import semmle.python.frameworks.data.internal.ApiGraphModels as AGM
76-
77-
private class SummarizedCallableFromModel extends SummarizedCallable {
78-
string package;
79-
string type;
80-
string path;
81-
82-
SummarizedCallableFromModel() {
83-
ModelOutput::relevantSummaryModel(package, type, path, _, _, _) and
84-
this = package + ";" + type + ";" + path
85-
}
86-
87-
override CallCfgNode getACall() {
88-
exists(API::CallNode base |
89-
ModelOutput::resolvedSummaryBase(package, type, path, base) and
90-
result = base.getACall()
91-
)
92-
}
93-
94-
override ArgumentNode getACallback() {
95-
exists(API::Node base |
96-
base = AGM::getNodeFromPath(package, type, path) and
97-
result = base.getAValueReachableFromSource()
98-
)
99-
}
100-
101-
override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
102-
exists(string kind |
103-
ModelOutput::relevantSummaryModel(package, type, path, input, output, kind)
104-
|
105-
kind = "value" and
106-
preservesValue = true
107-
or
108-
kind = "taint" and
109-
preservesValue = false
110-
)
111-
}
112-
}
72+
// // This gives access to getNodeFromPath, which is not constrained to `CallNode`s
73+
// // as `resolvedSummaryBase` is.
74+
// private import semmle.python.frameworks.data.internal.ApiGraphModels as AGM
75+
//
76+
// private class SummarizedCallableFromModel extends SummarizedCallable {
77+
// string package;
78+
// string type;
79+
// string path;
80+
// SummarizedCallableFromModel() {
81+
// ModelOutput::relevantSummaryModel(package, type, path, _, _, _) and
82+
// this = package + ";" + type + ";" + path
83+
// }
84+
// override CallCfgNode getACall() {
85+
// exists(API::CallNode base |
86+
// ModelOutput::resolvedSummaryBase(package, type, path, base) and
87+
// result = base.getACall()
88+
// )
89+
// }
90+
// override ArgumentNode getACallback() {
91+
// exists(API::Node base |
92+
// base = AGM::getNodeFromPath(package, type, path) and
93+
// result = base.getAValueReachableFromSource()
94+
// )
95+
// }
96+
// override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
97+
// exists(string kind |
98+
// ModelOutput::relevantSummaryModel(package, type, path, input, output, kind)
99+
// |
100+
// kind = "value" and
101+
// preservesValue = true
102+
// or
103+
// kind = "taint" and
104+
// preservesValue = false
105+
// )
106+
// }
107+
// }

0 commit comments

Comments
 (0)