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

Function test_scp_ssrf_gate_fires

tests/unit/test_input_handler.py:144–148  ·  view source on GitHub ↗

SSRF gate raises ValueError for an scp URL whose host resolves to a private IP.

()

Source from the content-addressed store, hash-verified

142
143
144def test_scp_ssrf_gate_fires() -> None:
145 """SSRF gate raises ValueError for an scp URL whose host resolves to a private IP."""
146 with patch("skillspector.input_handler._is_private_ip", return_value=True):
147 with pytest.raises(ValueError, match="private/internal IP"):
148 InputHandler()._validate_url_host("git@github.com:org/repo.git", ALLOWED_GIT_HOSTS)

Callers

nothing calls this directly

Calls 2

InputHandlerClass · 0.90
_validate_url_hostMethod · 0.80

Tested by

no test coverage detected