Skip to content

Commit 69dbbcf

Browse files
committed
JS: Mark destructuring nodes as incomplete
1 parent faa4702 commit 69dbbcf

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

javascript/ql/src/semmle/javascript/dataflow/DataFlow.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,10 @@ module DataFlow {
12761276
nd instanceof TExceptionalInvocationReturnNode and cause = "call"
12771277
or
12781278
nd instanceof TExceptionalFunctionReturnNode and cause = "call"
1279+
or
1280+
exists(PropertyPattern p | nd = TPropNode(p)) and cause = "heap"
1281+
or
1282+
nd instanceof TElementPatternNode and cause = "heap"
12791283
}
12801284

12811285
/**
@@ -1294,9 +1298,6 @@ module DataFlow {
12941298
or
12951299
exists(ComprehensionBlock cb | def = cb.getIterator()) and
12961300
cause = "yield"
1297-
or
1298-
def.getTarget() instanceof DestructuringPattern and
1299-
cause = "heap"
13001301
}
13011302
import Nodes
13021303
import Sources

javascript/ql/test/library-tests/TaintTracking/BasicTaintTracking.expected

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,6 @@ typeInferenceMismatch
33
| addexpr.js:4:10:4:17 | source() | addexpr.js:6:3:6:14 | x |
44
| addexpr.js:11:15:11:22 | source() | addexpr.js:17:5:17:18 | value |
55
| addexpr.js:11:15:11:22 | source() | addexpr.js:19:3:19:14 | value |
6-
| destruct.js:15:7:15:14 | source() | destruct.js:4:11:4:25 | x: { y: { z } } |
7-
| destruct.js:15:7:15:14 | source() | destruct.js:4:14:4:25 | { y: { z } } |
8-
| destruct.js:15:7:15:14 | source() | destruct.js:4:16:4:23 | y: { z } |
9-
| destruct.js:15:7:15:14 | source() | destruct.js:4:19:4:23 | { z } |
10-
| destruct.js:15:7:15:14 | source() | destruct.js:4:21:4:21 | z |
11-
| destruct.js:15:7:15:14 | source() | destruct.js:7:10:7:14 | [[w]] |
12-
| destruct.js:15:7:15:14 | source() | destruct.js:7:10:7:14 | [[w]] |
13-
| destruct.js:15:7:15:14 | source() | destruct.js:7:11:7:13 | [w] |
14-
| destruct.js:15:7:15:14 | source() | destruct.js:7:11:7:13 | [w] |
15-
| destruct.js:15:7:15:14 | source() | destruct.js:7:12:7:12 | w |
16-
| destruct.js:15:7:15:14 | source() | destruct.js:10:11:10:25 | x: [ { y: q } ] |
17-
| destruct.js:15:7:15:14 | source() | destruct.js:10:14:10:25 | [ { y: q } ] |
18-
| destruct.js:15:7:15:14 | source() | destruct.js:10:16:10:23 | { y: q } |
19-
| destruct.js:15:7:15:14 | source() | destruct.js:10:16:10:23 | { y: q } |
20-
| destruct.js:15:7:15:14 | source() | destruct.js:10:18:10:21 | y: q |
216
| partialCalls.js:4:17:4:24 | source() | partialCalls.js:6:23:6:23 | y |
227
| partialCalls.js:4:17:4:24 | source() | partialCalls.js:9:20:9:20 | x |
238
#select

0 commit comments

Comments
 (0)