mirror of
https://github.com/github/codeql.git
synced 2026-05-24 08:07:07 +02:00
Add CodeQL support for Micronaut: add MaD models for HTTP, HTTP client and multipart (sources, sinks and summary propagation), new framework QLL modules (Controller, WebSocket, Config, Data, Security). Add library tests and query tests exercising request inputs, file uploads, HttpClient sinks (SSRF), header sinks (response-splitting) and redirect sinks (open-redirect), plus expected results and extractor options. Include Micronaut 4.x stubs used by the tests.
19 lines
425 B
Java
19 lines
425 B
Java
import io.micronaut.websocket.annotation.*;
|
|
import io.micronaut.websocket.WebSocketSession;
|
|
|
|
@ServerWebSocket("/chat/{room}")
|
|
class MicronautWebSocketTest {
|
|
|
|
void sink(Object o) {}
|
|
|
|
@OnMessage
|
|
void onMessage(String message, WebSocketSession session) {
|
|
sink(message); // $hasTaintFlow
|
|
}
|
|
|
|
@OnOpen
|
|
void onOpen(String room, WebSocketSession session) {
|
|
sink(room); // $hasTaintFlow
|
|
}
|
|
}
|