mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
JS: More alert updates in UselessConditional
This commit is contained in:
@@ -67,7 +67,7 @@ async function awaitFlow(){
|
||||
|
||||
(function() {
|
||||
function f1(x) {
|
||||
x || y // $ Alert - but whitelisted
|
||||
x || y // OK
|
||||
}
|
||||
f1(true);
|
||||
|
||||
@@ -79,7 +79,7 @@ async function awaitFlow(){
|
||||
|
||||
function f3(x) {
|
||||
(function(){
|
||||
x || y // $ Alert - but whitelisted
|
||||
x || y // OK
|
||||
});
|
||||
}
|
||||
f3(true);
|
||||
@@ -150,7 +150,7 @@ async function awaitFlow(){
|
||||
var v = p();
|
||||
if (v) { // $ Alert
|
||||
}
|
||||
if (v) { // $ Alert - but not detected due to SSA limitations
|
||||
if (v) { // $ MISSING: Alert - due to SSA limitations
|
||||
}
|
||||
});
|
||||
|
||||
@@ -165,7 +165,7 @@ async function awaitFlow(){
|
||||
var v = findOrThrow();
|
||||
if (v) { // $ Alert
|
||||
}
|
||||
if (v) { // $ Alert - but not detected due to SSA limitations
|
||||
if (v) { // $ MISSING: Alert - due to SSA limitations
|
||||
}
|
||||
});
|
||||
|
||||
@@ -180,7 +180,7 @@ async function awaitFlow(){
|
||||
(function() {
|
||||
function outer(x) {
|
||||
addEventListener("click", () => {
|
||||
if (!x && something()) { // $ Alert - but whitelisted
|
||||
if (!x && something()) { // OK
|
||||
something();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user