From ac55cf95442fa99cbc52aa02f9e0a08b8e81ef0a Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Mon, 1 Dec 2025 20:41:59 +0000 Subject: [PATCH] Update test and qldoc --- python/ql/lib/semmle/python/frameworks/Websockets.qll | 2 +- .../frameworks/websockets/response_test.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Websockets.qll b/python/ql/lib/semmle/python/frameworks/Websockets.qll index 6690a6ec036..b4300fc5980 100644 --- a/python/ql/lib/semmle/python/frameworks/Websockets.qll +++ b/python/ql/lib/semmle/python/frameworks/Websockets.qll @@ -50,7 +50,7 @@ module Websockets { * calls, or a special parameter that will be set when functions are called by an external * library. * - * Use the predicate `WebSocket::instance()` to get references to instances of `websockets.asyncio.ServerConnection` and `websockets.sync.ServerConnection`. + * Use the predicate `ServerConnection::instance()` to get references to instances of `websockets.asyncio.ServerConnection` and `websockets.sync.ServerConnection`. */ abstract class InstanceSource extends DataFlow::LocalSourceNode { } diff --git a/python/ql/test/library-tests/frameworks/websockets/response_test.py b/python/ql/test/library-tests/frameworks/websockets/response_test.py index a4a0264e2c2..d7ad630d9cf 100644 --- a/python/ql/test/library-tests/frameworks/websockets/response_test.py +++ b/python/ql/test/library-tests/frameworks/websockets/response_test.py @@ -34,13 +34,14 @@ s5 = websockets.sync.router.unix_route(Map([ if __name__ == "__main__": import sys server = s1 - if len(sys.argv) > 1: - if sys.argv[1] == "kw": + args = sys.argv # $ threatModelSource[commandargs]=sys.argv + if len(args) > 1: + if args[1] == "kw": server = s2 - elif sys.argv[1] == "route": + elif args[1] == "route": server = s3 - elif sys.argv[1] == "unix": + elif args[1] == "unix": server = s4 - elif sys.argv[1] == "unix_route": + elif args[1] == "unix_route": server = s5 server.serve_forever() \ No newline at end of file