Skip to main content
Glama
test_security.py851 B
import pytest from adminmcp.core.security import SecurityValidator def test_security_validator_autonomous(): validator = SecurityValidator(mode="autonomous") assert validator.validate_command("rm -rf /") is True def test_security_validator_restricted(): validator = SecurityValidator(mode="restricted") assert validator.validate_command("ls -la") is True assert validator.validate_command("echo hello") is True # Test blocked commands assert validator.validate_command("rm -rf /") is False assert validator.validate_command("rm -r /etc") is False assert validator.validate_command("mkfs.ext4 /dev/sda") is False assert validator.validate_command(":(){ :|:& };:") is False def test_check_permissions(): validator = SecurityValidator() assert validator.check_permissions("execute_command") is True

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/frankausberlin/adminmcp'

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