Skip to content

Commit 64f00fd

Browse files
Napalysasgerf
andcommitted
Update javascript/ql/src/Quality/UnhandledStreamPipe.ql
Co-authored-by: Asger F <[email protected]>
1 parent 3cbc414 commit 64f00fd

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

javascript/ql/src/Quality/UnhandledStreamPipe.ql

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,18 @@ class ErrorHandlerRegistration extends DataFlow::MethodCallNode {
122122
}
123123

124124
/**
125-
* Models flow relationships between streams and related operations.
126-
* Connects destination streams to their corresponding pipe call nodes.
127-
* Connects streams to their chainable methods.
125+
* Holds if the stream in `node1` will propagate to `node2`.
128126
*/
129-
private predicate streamFlowStep(DataFlow::Node streamNode, DataFlow::Node relatedNode) {
127+
private predicate streamFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
130128
exists(PipeCall pipe |
131-
streamNode = pipe.getDestinationStream() and
132-
relatedNode = pipe
129+
node1 = pipe.getDestinationStream() and
130+
node2 = pipe
133131
)
134132
or
135133
exists(DataFlow::MethodCallNode chainable |
136134
chainable.getMethodName() = getChainableStreamMethodName() and
137-
streamNode = chainable.getReceiver() and
138-
relatedNode = chainable
135+
node1 = chainable.getReceiver() and
136+
node2 = chainable
139137
)
140138
}
141139

0 commit comments

Comments
 (0)