mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Add tests
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
import org.springframework.web.socket.handler.TextWebSocketHandler;
|
||||
import org.springframework.web.socket.WebSocketSession;
|
||||
import org.springframework.web.socket.WebSocketMessage;
|
||||
|
||||
|
||||
public class Test extends TextWebSocketHandler {
|
||||
void sink(Object o) {}
|
||||
|
||||
@Override
|
||||
public void handleMessage(WebSocketSession s, WebSocketMessage<?> m) {
|
||||
sink(s); // $hasTaintFlow
|
||||
sink(s.getAcceptedProtocol()); // $hasTaintFlow
|
||||
sink(s.getHandshakeHeaders()); // $hasTaintFlow
|
||||
sink(s.getPrincipal()); // $hasTaintFlow
|
||||
sink(s.getUri()); // $hasTaintFlow
|
||||
|
||||
sink(m); // $hasTaintFlow
|
||||
sink(m.getPayload()); // $hasTaintFlow
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/javax-servlet-2.5:${testdir}/../../../../stubs/apache-commons-logging-1.2
|
||||
@@ -0,0 +1,4 @@
|
||||
import java
|
||||
import utils.test.InlineFlowTest
|
||||
import DefaultFlowTest
|
||||
import TaintFlow::PathGraph
|
||||
Reference in New Issue
Block a user