Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions ssh/test_ssh_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# --------------------------------------------------------------------------- #
Expand Down
Loading