File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
javascript/ql/test/library-tests/TripleDot Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -138,3 +138,28 @@ function t13() {
138
138
}
139
139
target ( "safe" , ...source ( 't13.1' ) ) ;
140
140
}
141
+
142
+ function t14 ( ) {
143
+ function target ( x , y , ...rest ) {
144
+ sink ( x ) ; // $ hasValueFlow=t14.1
145
+ sink ( y ) ; // $ hasValueFlow=t14.1
146
+ sink ( rest . pop ( ) ) ; // $ hasValueFlow=t14.1
147
+ sink ( rest ) ; // $ hasTaintFlow=t14.1
148
+ }
149
+ const args = new Array ( Math . floor ( Math . random ( ) * 10 ) ) ;
150
+ args . push ( source ( 't14.1' ) ) ;
151
+ target ( ...args ) ;
152
+ }
153
+
154
+ function t15 ( ) {
155
+ function target ( safe , x , y , ...rest ) {
156
+ sink ( safe ) ; // $ SPURIOUS: hasTaintFlow=t15.1
157
+ sink ( x ) ; // $ MISSING: hasValueFlow=t15.1 SPURIOUS: hasTaintFlow=t15.1
158
+ sink ( y ) ; // $ MISSING: hasValueFlow=t15.1 SPURIOUS: hasTaintFlow=t15.1
159
+ sink ( rest . pop ( ) ) ; // $ MISSING: hasValueFlow=t15.1 SPURIOUS: hasTaintFlow=t15.1
160
+ sink ( rest ) ; // $ hasTaintFlow=t15.1
161
+ }
162
+ const args = new Array ( Math . floor ( Math . random ( ) * 10 ) ) ;
163
+ args . push ( source ( 't15.1' ) ) ;
164
+ target ( 'safe' , ...args ) ;
165
+ }
You can’t perform that action at this time.
0 commit comments