mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
JS: Add tests showing missing taint flow
When the spread argument itself is tained and not inside any content, the read steps currently fail to propagate the data.
This commit is contained in:
@@ -112,3 +112,29 @@ function t10() {
|
||||
}
|
||||
target(source('t10.1'), source('t10.2'), source('t10.3'));
|
||||
}
|
||||
|
||||
function t11() {
|
||||
function target(x, y) {
|
||||
sink(x); // $ MISSING: hasTaintFlow=t11.1
|
||||
sink(y); // $ MISSING: hasTaintFlow=t11.1
|
||||
}
|
||||
target(...source('t11.1'));
|
||||
}
|
||||
|
||||
function t12() {
|
||||
function target(x, y) {
|
||||
sink(x);
|
||||
sink(y); // $ MISSING: hasTaintFlow=t12.1
|
||||
}
|
||||
target("safe", ...source('t12.1'));
|
||||
}
|
||||
|
||||
function t13() {
|
||||
function target(x, y, ...rest) {
|
||||
sink(x);
|
||||
sink(y); // $ MISSING: hasTaintFlow=t13.1
|
||||
sink(rest); // $ MISSING: hasTaintFlow=t13.1
|
||||
sink(rest[0]); // $ MISSING: hasTaintFlow=t13.1
|
||||
}
|
||||
target("safe", ...source('t13.1'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user