mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Added tests for arrays toSpliced with pop
This commit is contained in:
@@ -94,4 +94,17 @@
|
||||
|
||||
sink(["source"].filter((x) => x)); // NOT OK
|
||||
sink(["source"].filter((x) => !!x)); // NOT OK
|
||||
|
||||
var arr8 = [];
|
||||
arr8 = arr8.toSpliced(0, 0, "source");
|
||||
sink(arr8.pop()); // NOT OK -- Should be considered tainted, but it is not
|
||||
|
||||
var arr8_variant = [];
|
||||
arr8_variant = arr8_variant.toSpliced(0, 0, "safe", "source");
|
||||
arr8_variant.pop();
|
||||
sink(arr8_variant.pop()); // NOT OK -- Should be considered tainted, but it is not
|
||||
|
||||
var arr8_spread = [];
|
||||
arr8_spread = arr8_spread.toSpliced(0, 0, ...arr);
|
||||
sink(arr8_spread.pop()); // NOT OK -- Should be considered tainted, but it is not
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user