MCPcopy Create free account
hub / github.com/NVIDIA/SkillSpector / test_scp_disallowed_host_raises

Function test_scp_disallowed_host_raises

tests/unit/test_input_handler.py:126–129  ·  view source on GitHub ↗

_validate_url_host rejects an scp URL whose host is not in the allowlist.

()

Source from the content-addressed store, hash-verified

124
125
126def test_scp_disallowed_host_raises() -> None:
127 """_validate_url_host rejects an scp URL whose host is not in the allowlist."""
128 with pytest.raises(ValueError, match="not in the allowed hosts"):
129 InputHandler()._validate_url_host("git@malicious.internal:org/repo.git", ALLOWED_GIT_HOSTS)
130
131
132def test_scp_private_ip_raises() -> None:

Callers

nothing calls this directly

Calls 2

InputHandlerClass · 0.90
_validate_url_hostMethod · 0.80

Tested by

no test coverage detected