From 5f6442682fe1907b78631f75be4f47ddd73b7f36 Mon Sep 17 00:00:00 2001 From: shrish-browserstack Date: Fri, 23 Oct 2026 16:25:43 +0530 Subject: [PATCH] test(ssh): supply ssh module config in injection tests Co-Authored-By: Claude Opus 5.5 --- ssh/test_ssh_injection.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ssh/test_ssh_injection.py b/ssh/test_ssh_injection.py index 9b2a8f6..41b282a 100644 --- a/ssh/test_ssh_injection.py +++ b/ssh/test_ssh_injection.py @@ -24,6 +24,22 @@ MALICIOUS_USERNAME = "app;touch /tmp/pwned" +@pytest.fixture(autouse=True) +def ssh_module_config(mocker): + """Supply the ssh module config so tests don't depend on the host app's config.json.""" + mocker.patch.dict( + helpers.ACCESS_MODULES, + { + "ssh": { + "app_user": "app", + "engima_root_user": "root", + "private_key_path": "/dev/null", + "common_sudo_group": "sudo", + } + }, + ) + + # --------------------------------------------------------------------------- # # Pure validators # --------------------------------------------------------------------------- #