mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
34 lines
504 B
JavaScript
34 lines
504 B
JavaScript
function test() {
|
|
let x = source();
|
|
|
|
if (isTypeA(x)) {
|
|
if (sanitizeA(x)) {
|
|
sink(x); // OK
|
|
} else {
|
|
sink(x); // NOT OK
|
|
}
|
|
|
|
if (sanitizeB(x)) {
|
|
sink(x); // NOT OK
|
|
} else {
|
|
sink(x); // NOT OK
|
|
}
|
|
} else {
|
|
if (sanitizeA(x)) {
|
|
sink(x); // NOT OK
|
|
} else {
|
|
sink(x); // NOT OK
|
|
}
|
|
|
|
if (sanitizeB(x)) {
|
|
sink(x); // OK
|
|
} else {
|
|
sink(x); // NOT OK
|
|
}
|
|
}
|
|
|
|
if (sanitizeA(x) && sanitizeB(x)) {
|
|
sink(x); // OK
|
|
}
|
|
}
|