Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 079a622

Browse files
committed
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.
1 parent 6a08313 commit 079a622

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

  • javascript/ql/test/library-tests/TripleDot

javascript/ql/test/library-tests/TripleDot/tst.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,29 @@ function t10() {
112112
}
113113
target(source('t10.1'), source('t10.2'), source('t10.3'));
114114
}
115+
116+
function t11() {
117+
function target(x, y) {
118+
sink(x); // $ MISSING: hasTaintFlow=t11.1
119+
sink(y); // $ MISSING: hasTaintFlow=t11.1
120+
}
121+
target(...source('t11.1'));
122+
}
123+
124+
function t12() {
125+
function target(x, y) {
126+
sink(x);
127+
sink(y); // $ MISSING: hasTaintFlow=t12.1
128+
}
129+
target("safe", ...source('t12.1'));
130+
}
131+
132+
function t13() {
133+
function target(x, y, ...rest) {
134+
sink(x);
135+
sink(y); // $ MISSING: hasTaintFlow=t13.1
136+
sink(rest); // $ MISSING: hasTaintFlow=t13.1
137+
sink(rest[0]); // $ MISSING: hasTaintFlow=t13.1
138+
}
139+
target("safe", ...source('t13.1'));
140+
}

0 commit comments

Comments
 (0)