@@ -125,16 +125,21 @@ module SqlExecuteConfig implements DataFlow::ConfigSig {
125125/** Tracks flow from SQL queries that update a database to the argument of an execute method call. */
126126module SqlExecuteFlow = TaintTracking:: Global< SqlExecuteConfig > ;
127127
128+ /** Provides classes and predicates representing call paths. */
128129module CallGraph {
129- newtype TCallPathNode =
130+ private newtype TCallPathNode =
130131 TMethod ( Method m ) or
131132 TCall ( Call c )
132133
134+ /** A node in a call path graph */
133135 class CallPathNode extends TCallPathNode {
136+ /** Gets the method corresponding to this `CallPathNode`, if any. */
134137 Method asMethod ( ) { this = TMethod ( result ) }
135138
139+ /** Gets the call corresponding to this `CallPathNode`, if any. */
136140 Call asCall ( ) { this = TCall ( result ) }
137141
142+ /** Gets the string representation of this `CallPathNode`. */
138143 string toString ( ) {
139144 result = this .asMethod ( ) .toString ( )
140145 or
@@ -145,6 +150,7 @@ module CallGraph {
145150 [ viableCallable ( this .asCall ( ) ) , this .asCall ( ) .getCallee ( ) ] = result .asMethod ( )
146151 }
147152
153+ /** Gets a successor node of this `CallPathNode`, if any. */
148154 CallPathNode getASuccessor ( ) {
149155 this .asMethod ( ) = result .asCall ( ) .getEnclosingCallable ( )
150156 or
@@ -159,13 +165,15 @@ module CallGraph {
159165 )
160166 }
161167
168+ /** Gets the location of this `CallPathNode`. */
162169 Location getLocation ( ) {
163170 result = this .asMethod ( ) .getLocation ( )
164171 or
165172 result = this .asCall ( ) .getLocation ( )
166173 }
167174 }
168175
176+ /** Holds if `pred` has a successor node `succ`. */
169177 predicate edges ( CallPathNode pred , CallPathNode succ ) { pred .getASuccessor ( ) = succ }
170178}
171179
0 commit comments