mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JS: Move some alerts to their correct location
One of the diffs look confusing but:
Previously parameter {2,3} where flagged, now parameter {1,2} are flagged.
Note that for command injection, the SystemCommandExecution is flagged
despite the test file claiming otherwise.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function countOccurrences(xs, p) { // $ Alert
|
||||
function countOccurrences(xs, p) {
|
||||
var count = 0;
|
||||
for (let x of xs)
|
||||
for (let x of xs) // $ Alert
|
||||
if (p())
|
||||
++count;
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user