Skip to content

Commit e0b1a86

Browse files
committed
Java: Convert WebSocketMessageParameterSource to CSV based flow source
1 parent 193458e commit e0b1a86

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ private predicate sourceModelCsv(string row) {
170170
// SpringRestTemplateResponseEntityMethod
171171
"org.springframework.web.client;RestTemplate;false;exchange;;;ReturnValue;remote",
172172
"org.springframework.web.client;RestTemplate;false;getForEntity;;;ReturnValue;remote",
173-
"org.springframework.web.client;RestTemplate;false;postForEntity;;;ReturnValue;remote"
173+
"org.springframework.web.client;RestTemplate;false;postForEntity;;;ReturnValue;remote",
174+
// WebSocketMessageParameterSource
175+
"java.net.http;WebSocket$Listener;true;onText;(WebSocket,CharSequence,boolean);;Parameter[1];remote"
174176
]
175177
}
176178

java/ql/src/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,6 @@ private class ThriftIfaceParameterSource extends RemoteFlowSource {
158158
override string getSourceType() { result = "Thrift Iface parameter" }
159159
}
160160

161-
private class WebSocketMessageParameterSource extends RemoteFlowSource {
162-
WebSocketMessageParameterSource() {
163-
exists(WebsocketOnText t | t.getParameter(1) = this.asParameter())
164-
}
165-
166-
override string getSourceType() { result = "Websocket onText parameter" }
167-
}
168-
169161
/** Class for `tainted` user input. */
170162
abstract class UserInput extends DataFlow::Node { }
171163

0 commit comments

Comments
 (0)