@@ -115,9 +115,9 @@ private module ArrayDataFlow {
115
115
* A step modeling the creation of an Array using the `Array.from(x)` method.
116
116
* The step copies the elements of the argument (set, array, or iterator elements) into the resulting array.
117
117
*/
118
- private class ArrayFrom extends DataFlow :: SharedFlowStep {
118
+ private class ArrayFrom extends PreCallGraphStep {
119
119
override predicate loadStoreStep (
120
- DataFlow:: Node pred , DataFlow:: Node succ , string fromProp , string toProp
120
+ DataFlow:: Node pred , DataFlow:: SourceNode succ , string fromProp , string toProp
121
121
) {
122
122
exists ( DataFlow:: CallNode call |
123
123
call = arrayFromCall ( ) and
@@ -135,9 +135,9 @@ private module ArrayDataFlow {
135
135
*
136
136
* Such a step can occur both with the `push` and `unshift` methods, or when creating a new array.
137
137
*/
138
- private class ArrayCopySpread extends DataFlow :: SharedFlowStep {
138
+ private class ArrayCopySpread extends PreCallGraphStep {
139
139
override predicate loadStoreStep (
140
- DataFlow:: Node pred , DataFlow:: Node succ , string fromProp , string toProp
140
+ DataFlow:: Node pred , DataFlow:: SourceNode succ , string fromProp , string toProp
141
141
) {
142
142
fromProp = arrayLikeElement ( ) and
143
143
toProp = arrayElement ( ) and
@@ -156,7 +156,7 @@ private module ArrayDataFlow {
156
156
/**
157
157
* A step for storing an element on an array using `arr.push(e)` or `arr.unshift(e)`.
158
158
*/
159
- private class ArrayAppendStep extends DataFlow :: SharedFlowStep {
159
+ private class ArrayAppendStep extends PreCallGraphStep {
160
160
override predicate storeStep ( DataFlow:: Node element , DataFlow:: SourceNode obj , string prop ) {
161
161
prop = arrayElement ( ) and
162
162
exists ( DataFlow:: MethodCallNode call |
@@ -187,7 +187,7 @@ private module ArrayDataFlow {
187
187
* A step for reading/writing an element from an array inside a for-loop.
188
188
* E.g. a read from `foo[i]` to `bar` in `for(var i = 0; i < arr.length; i++) {bar = foo[i]}`.
189
189
*/
190
- private class ArrayIndexingStep extends DataFlow :: SharedFlowStep {
190
+ private class ArrayIndexingStep extends PreCallGraphStep {
191
191
override predicate loadStep ( DataFlow:: Node obj , DataFlow:: Node element , string prop ) {
192
192
exists ( ArrayIndexingAccess access |
193
193
prop = arrayElement ( ) and
@@ -209,7 +209,7 @@ private module ArrayDataFlow {
209
209
* A step for retrieving an element from an array using `.pop()`, `.shift()`, or `.at()`.
210
210
* E.g. `array.pop()`.
211
211
*/
212
- private class ArrayPopStep extends DataFlow :: SharedFlowStep {
212
+ private class ArrayPopStep extends PreCallGraphStep {
213
213
override predicate loadStep ( DataFlow:: Node obj , DataFlow:: Node element , string prop ) {
214
214
exists ( DataFlow:: MethodCallNode call |
215
215
call .getMethodName ( ) = [ "pop" , "shift" , "at" ] and
@@ -276,7 +276,7 @@ private module ArrayDataFlow {
276
276
* A step modeling that `splice` can insert elements into an array.
277
277
* For example in `array.splice(i, del, e)`: if `e` is tainted, then so is `array
278
278
*/
279
- private class ArraySpliceStep extends DataFlow :: SharedFlowStep {
279
+ private class ArraySpliceStep extends PreCallGraphStep {
280
280
override predicate storeStep ( DataFlow:: Node element , DataFlow:: SourceNode obj , string prop ) {
281
281
exists ( DataFlow:: MethodCallNode call |
282
282
call .getMethodName ( ) = "splice" and
@@ -291,8 +291,8 @@ private module ArrayDataFlow {
291
291
* A step for modeling `concat`.
292
292
* For example in `e = arr1.concat(arr2, arr3)`: if any of the `arr` is tainted, then so is `e`.
293
293
*/
294
- private class ArrayConcatStep extends DataFlow :: SharedFlowStep {
295
- override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: Node succ , string prop ) {
294
+ private class ArrayConcatStep extends PreCallGraphStep {
295
+ override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: SourceNode succ , string prop ) {
296
296
exists ( DataFlow:: MethodCallNode call |
297
297
call .getMethodName ( ) = "concat" and
298
298
prop = arrayElement ( ) and
@@ -305,8 +305,8 @@ private module ArrayDataFlow {
305
305
/**
306
306
* A step for modeling that elements from an array `arr` also appear in the result from calling `slice`/`splice`/`filter`.
307
307
*/
308
- private class ArraySliceStep extends DataFlow :: SharedFlowStep {
309
- override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: Node succ , string prop ) {
308
+ private class ArraySliceStep extends PreCallGraphStep {
309
+ override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: SourceNode succ , string prop ) {
310
310
exists ( DataFlow:: MethodCallNode call |
311
311
call .getMethodName ( ) = [ "slice" , "splice" , "filter" ] and
312
312
prop = arrayElement ( ) and
@@ -319,7 +319,7 @@ private module ArrayDataFlow {
319
319
/**
320
320
* A step modeling that elements from an array `arr` are received by calling `find`.
321
321
*/
322
- private class ArrayFindStep extends DataFlow :: SharedFlowStep {
322
+ private class ArrayFindStep extends PreCallGraphStep {
323
323
override predicate loadStep ( DataFlow:: Node pred , DataFlow:: Node succ , string prop ) {
324
324
exists ( DataFlow:: CallNode call |
325
325
call = arrayFindCall ( pred ) and
@@ -382,7 +382,7 @@ private module ArrayLibraries {
382
382
* E.g. `array-union` that creates a union of multiple arrays, or `array-uniq` that creates an array with unique elements.
383
383
*/
384
384
DataFlow:: CallNode arrayCopyCall ( DataFlow:: Node array ) {
385
- result = API :: moduleImport ( [ "array-union" , "array-uniq" , "uniq" ] ) .getACall ( ) and
385
+ result = DataFlow :: moduleImport ( [ "array-union" , "array-uniq" , "uniq" ] ) .getACall ( ) and
386
386
array = result .getAnArgument ( )
387
387
}
388
388
@@ -401,8 +401,8 @@ private module ArrayLibraries {
401
401
/**
402
402
* A loadStoreStep for a library that copies the elements of an array into another array.
403
403
*/
404
- private class ArrayCopyLoadStore extends DataFlow :: SharedFlowStep {
405
- override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: Node succ , string prop ) {
404
+ private class ArrayCopyLoadStore extends PreCallGraphStep {
405
+ override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: SourceNode succ , string prop ) {
406
406
exists ( DataFlow:: CallNode call |
407
407
call = arrayCopyCall ( pred ) and
408
408
succ = call and
0 commit comments