Skip to content

Commit 80bc5d9

Browse files
committed
JS: Update Vue test
1 parent d52ff3e commit 80bc5d9

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/DomBasedXss.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ module DomBasedXss {
1313
*/
1414
deprecated class Configuration = HtmlInjectionConfiguration;
1515

16+
/**
17+
* DEPRECATED. Use `Vue::VHtmlSourceWrite` instead.
18+
*/
19+
deprecated class VHtmlSourceWrite = Vue::VHtmlSourceWrite;
20+
1621
/**
1722
* A taint-tracking configuration for reasoning about XSS.
1823
*/

javascript/ql/test/library-tests/frameworks/Vue/tests.expected

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ instance
8181
| tst.js:94:2:96:3 | new Vue ... f,\\n\\t}) |
8282
| tst.js:99:2:104:3 | new Vue ... \\t\\t}\\n\\t}) |
8383
instance_heapStep
84-
| tst.js:102:20:102:29 | this.dataA | tst.js:100:18:100:19 | 42 | tst.js:102:20:102:29 | this.dataA |
85-
| tst.js:102:20:102:29 | this.dataA | tst.js:102:20:102:23 | this | tst.js:102:20:102:29 | this.dataA |
84+
| Unit | compont-with-route.vue:31:14:31:34 | this.$r ... ery.foo | compont-with-route.vue:2:8:2:21 | v-html=dataA |
85+
| Unit | single-component-file-1.vue:6:40:6:41 | 42 | single-component-file-1.vue:2:8:2:21 | v-html=dataA |
86+
| Unit | single-file-component-3-script.js:4:37:4:38 | 42 | single-file-component-3.vue:2:8:2:21 | v-html=dataA |
87+
| Unit | single-file-component-4.vue:15:14:15:15 | 42 | single-file-component-4.vue:2:8:2:21 | v-html=dataA |
88+
| Unit | single-file-component-5.vue:13:14:13:15 | 42 | single-file-component-5.vue:2:8:2:21 | v-html=dataA |
89+
| Unit | tst.js:100:18:100:19 | 42 | tst.js:102:20:102:29 | this.dataA |
8690
templateElement
8791
| compont-with-route.vue:1:1:3:11 | <template>...</> |
8892
| compont-with-route.vue:2:5:51:9 | <p>...</> |
@@ -109,12 +113,12 @@ templateElement
109113
| single-file-component-5.vue:4:1:16:9 | <script>...</> |
110114
| single-file-component-5.vue:17:1:18:8 | <style>...</> |
111115
vhtmlSourceWrite
112-
| compont-with-route.vue:31:14:31:34 | this.$r ... ery.foo | compont-with-route.vue:31:14:31:30 | this.$route.query | compont-with-route.vue:31:14:31:34 | this.$r ... ery.foo |
113-
| compont-with-route.vue:31:14:31:34 | this.$r ... ery.foo | compont-with-route.vue:31:14:31:34 | this.$r ... ery.foo | compont-with-route.vue:2:8:2:21 | v-html=dataA |
114-
| single-component-file-1.vue:6:40:6:41 | 42 | single-component-file-1.vue:6:40:6:41 | 42 | single-component-file-1.vue:2:8:2:21 | v-html=dataA |
115-
| single-file-component-3-script.js:4:37:4:38 | 42 | single-file-component-3-script.js:4:37:4:38 | 42 | single-file-component-3.vue:2:8:2:21 | v-html=dataA |
116-
| single-file-component-4.vue:15:14:15:15 | 42 | single-file-component-4.vue:15:14:15:15 | 42 | single-file-component-4.vue:2:8:2:21 | v-html=dataA |
117-
| single-file-component-5.vue:13:14:13:15 | 42 | single-file-component-5.vue:13:14:13:15 | 42 | single-file-component-5.vue:2:8:2:21 | v-html=dataA |
116+
| Unit | compont-with-route.vue:31:14:31:34 | this.$r ... ery.foo | compont-with-route.vue:2:8:2:21 | v-html=dataA |
117+
| Unit | single-component-file-1.vue:6:40:6:41 | 42 | single-component-file-1.vue:2:8:2:21 | v-html=dataA |
118+
| Unit | single-file-component-3-script.js:4:37:4:38 | 42 | single-file-component-3.vue:2:8:2:21 | v-html=dataA |
119+
| Unit | single-file-component-4.vue:15:14:15:15 | 42 | single-file-component-4.vue:2:8:2:21 | v-html=dataA |
120+
| Unit | single-file-component-5.vue:13:14:13:15 | 42 | single-file-component-5.vue:2:8:2:21 | v-html=dataA |
121+
| Unit | tst.js:100:18:100:19 | 42 | tst.js:102:20:102:29 | this.dataA |
118122
xssSink
119123
| compont-with-route.vue:2:8:2:21 | v-html=dataA |
120124
| single-component-file-1.vue:2:8:2:21 | v-html=dataA |

javascript/ql/test/library-tests/frameworks/Vue/tests.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ query predicate templateElement(Vue::Template::Element template) { any() }
2121
import semmle.javascript.security.dataflow.DomBasedXss
2222

2323
query predicate vhtmlSourceWrite(
24-
DomBasedXss::VHtmlSourceWrite w, DataFlow::Node pred, DataFlow::Node succ
24+
Vue::VHtmlSourceWrite w, DataFlow::Node pred, DataFlow::Node succ
2525
) {
2626
w.step(pred, succ)
2727
}

0 commit comments

Comments
 (0)