mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
JS: Add some tests for missing handling of dynamic args in flow summaries
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
| library-tests/FlowSummary/tst.js:278 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
| library-tests/FlowSummary/tst.js:282 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
| library-tests/FlowSummary/tst.js:283 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
| library-tests/FlowSummary/tst.js:286 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
| library-tests/FlowSummary/tst.js:287 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
| library-tests/FlowSummary/tst.js:290 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
| library-tests/FlowSummary/tst.js:291 | expected an alert, but found none | NOT OK | ConsistencyConfig |
|
||||
|
||||
@@ -268,3 +268,26 @@ function m17() {
|
||||
sink(value); // NOT OK
|
||||
}
|
||||
}
|
||||
|
||||
function m18() {
|
||||
const staticParam0 = mkSummary("Argument[0]", "ReturnValue");
|
||||
const staticParam1 = mkSummary("Argument[1]", "ReturnValue");
|
||||
const dynamicParam0 = mkSummary("Argument[0..]", "ReturnValue");
|
||||
const dynamicParam1 = mkSummary("Argument[1..]", "ReturnValue");
|
||||
|
||||
sink(staticParam0(...source())); // NOT OK
|
||||
sink(staticParam0("safe", ...source())); // OK
|
||||
sink(staticParam0(source(), ...["safe"])); // NOT OK
|
||||
|
||||
sink(staticParam1(...source())); // NOT OK
|
||||
sink(staticParam1("safe", ...source())); // NOT OK
|
||||
sink(staticParam1(source(), ...["safe"])); // OK
|
||||
|
||||
sink(dynamicParam0(...source())); // NOT OK
|
||||
sink(dynamicParam0("safe", ...source())); // NOT OK
|
||||
sink(dynamicParam0(source(), ...["safe"])); // NOT OK
|
||||
|
||||
sink(dynamicParam1(...source())); // NOT OK
|
||||
sink(dynamicParam1("safe", ...source())); // NOT OK
|
||||
sink(dynamicParam1(source(), ...["safe"])); // OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user