Skip to main content
Glama
blade47

ShadowGit MCP Server

by blade47
security-constants.ts963 B
/** * Security constants for Git command validation */ // Read-only commands allowed for AI assistants export const SAFE_COMMANDS = new Set([ 'log', 'show', 'diff', 'status', 'describe', 'rev-parse', 'ls-files', 'ls-tree', 'cat-file', 'show-branch', 'shortlog', 'rev-list', 'blame' ]); // Dangerous arguments that should always be blocked export const DANGEROUS_PATTERNS = [ '--upload-pack', '--receive-pack', '--exec', '-c', // Block config overrides '--config', '-e', // Block -e flag '--git-dir', // Block repository override '--work-tree', // Block work tree override '-C' // Block directory change ]; // Check if an argument is dangerous export function isDangerousArg(arg: string): boolean { const lowerArg = arg.toLowerCase(); return DANGEROUS_PATTERNS.some(pattern => lowerArg === pattern || lowerArg.startsWith(pattern + '=') ); }

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/blade47/shadowgit-mcp'

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