Skip to main content
Glama
test_sanitize_path.py565 B
import os, pytest from pathlib import Path from ._mcp_client import call_tool TOKEN = "TEST_TOKEN" @pytest.mark.asyncio async def test_overview_rejects_bad_extension(tmp_path): bad = tmp_path / "malicioso.zip" bad.write_bytes(b"not a pcap") # Limitar sandbox al tmp para esta prueba os.environ["PORT_HUNTER_ALLOWED_DIR"] = str(tmp_path) data = await call_tool("scan_overview", {"path": str(bad), "auth_token": TOKEN}) assert isinstance(data, dict) assert data.get("ok") is False assert data.get("error") == "unsupported_file_type"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abysswalkr/porthunter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server