@@ -18,32 +18,48 @@ private module Summaries {
1818 import EngineIntrinsics
1919}
2020
21- /** A callable with a flow summary, identified by a unique string. */
22- abstract class SummarizedCallable extends LibraryCallable , Impl:: Public:: SummarizedCallable {
23- bindingset [ this ]
24- SummarizedCallable ( ) { any ( ) }
25-
26- override predicate propagatesFlow (
27- string input , string output , boolean preservesValue , string model
28- ) {
29- this .propagatesFlow ( input , output , preservesValue ) and model = ""
30- }
21+ class Provenance = Impl:: Public:: Provenance ;
22+
23+ /** Provides the `Range` class used to define the extent of `SummarizedCallable`. */
24+ module SummarizedCallable {
25+ /** A callable with a flow summary, identified by a unique string. */
26+ abstract class Range extends LibraryCallable , Impl:: Public:: SummarizedCallable {
27+ bindingset [ this ]
28+ Range ( ) { any ( ) }
29+
30+ override predicate propagatesFlow (
31+ string input , string output , boolean preservesValue , Provenance p , boolean isExact ,
32+ string model
33+ ) {
34+ this .propagatesFlow ( input , output , preservesValue ) and
35+ p = "manual" and
36+ isExact = true and
37+ model = ""
38+ }
3139
32- /**
33- * Holds if data may flow from `input` to `output` through this callable.
34- *
35- * `preservesValue` indicates whether this is a value-preserving step or a taint-step.
36- */
37- predicate propagatesFlow ( string input , string output , boolean preservesValue ) { none ( ) }
38-
39- /**
40- * Gets the synthesized parameter that results from an input specification
41- * that starts with `Argument[s]` for this library callable.
42- */
43- DataFlow:: ParameterNode getParameter ( string s ) {
44- exists ( ParameterPosition pos |
45- DataFlowImplCommon:: parameterNode ( result , TLibraryCallable ( this ) , pos ) and
46- s = Impl:: Input:: encodeParameterPosition ( pos )
47- )
40+ /**
41+ * Holds if data may flow from `input` to `output` through this callable.
42+ *
43+ * `preservesValue` indicates whether this is a value-preserving step or a taint-step.
44+ */
45+ predicate propagatesFlow ( string input , string output , boolean preservesValue ) { none ( ) }
46+
47+ /**
48+ * Gets the synthesized parameter that results from an input specification
49+ * that starts with `Argument[s]` for this library callable.
50+ */
51+ DataFlow:: ParameterNode getParameter ( string s ) {
52+ exists ( ParameterPosition pos |
53+ DataFlowImplCommon:: parameterNode ( result , TLibraryCallable ( this ) , pos ) and
54+ s = Impl:: Input:: encodeParameterPosition ( pos )
55+ )
56+ }
4857 }
4958}
59+
60+ final private class SummarizedCallableFinal = SummarizedCallable:: Range ;
61+
62+ /** A callable with a flow summary, identified by a unique string. */
63+ final class SummarizedCallable extends SummarizedCallableFinal ,
64+ Impl:: Public:: RelevantSummarizedCallable
65+ { }
0 commit comments