From 0a2ed8302ab51a1e688aee18f12273c240b69da0 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 18 Jul 2024 07:45:03 +0100 Subject: [PATCH] Add test for websocket remote flow sources --- .../go/frameworks/WebSocket/RemoteFlowSources.expected | 9 +++++++++ .../semmle/go/frameworks/WebSocket/RemoteFlowSources.ql | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.expected create mode 100644 go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.expected b/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.expected new file mode 100644 index 00000000000..0124cf73218 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.expected @@ -0,0 +1,9 @@ +| WebSocketReadWrite.go:27:9:27:16 | selection of Header | +| WebSocketReadWrite.go:31:7:31:10 | definition of xnet | +| WebSocketReadWrite.go:35:3:35:7 | definition of xnet2 | +| WebSocketReadWrite.go:41:3:41:40 | ... := ...[1] | +| WebSocketReadWrite.go:44:3:44:48 | ... := ...[1] | +| WebSocketReadWrite.go:51:7:51:16 | definition of gorillaMsg | +| WebSocketReadWrite.go:55:3:55:10 | definition of gorilla2 | +| WebSocketReadWrite.go:61:3:61:38 | ... := ...[1] | +| WebSocketReadWrite.go:67:3:67:36 | ... := ...[0] | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.ql b/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.ql new file mode 100644 index 00000000000..9e68fd210ff --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/RemoteFlowSources.ql @@ -0,0 +1,3 @@ +import go + +select any(RemoteFlowSource rfs)