UNPKG

vineguard-mcp-server-standalone

Version:

VineGuard MCP Server v2.1 - Intelligent QA Workflow System with advanced test generation for Jest/RTL, Cypress, and Playwright. Features smart project analysis, progressive testing strategies, and comprehensive quality patterns for React/Vue/Angular proje

59 lines 1.89 kB
/** * Input validation and sanitization module for VineGuard MCP Server * Prevents path traversal attacks, injection attacks, and malformed inputs */ export interface ValidationResult { isValid: boolean; sanitizedValue?: any; error?: string; } export declare class InputValidator { private static readonly MAX_PATH_LENGTH; private static readonly MAX_STRING_LENGTH; private static readonly ALLOWED_FILE_EXTENSIONS; /** * Validate and sanitize file paths to prevent path traversal attacks */ static validateFilePath(filePath: string, projectRoot?: string): ValidationResult; /** * Validate string inputs for command injection */ static validateString(input: string, maxLength?: number): ValidationResult; /** * Validate boolean inputs */ static validateBoolean(input: any): ValidationResult; /** * Validate number inputs */ static validateNumber(input: any, min?: number, max?: number): ValidationResult; /** * Validate array inputs */ static validateArray(input: any, allowedValues?: string[]): ValidationResult; /** * Validate test framework names */ static validateTestFramework(framework: string): ValidationResult; /** * Validate test type */ static validateTestType(testType: string): ValidationResult; /** * Validate severity levels */ static validateSeverity(severity: string): ValidationResult; /** * Validate project type */ static validateProjectType(projectType: string): ValidationResult; /** * Check if a file exists safely */ static fileExists(filePath: string): Promise<boolean>; /** * Validate and sanitize all tool arguments */ static validateToolArgs(toolName: string, args: any): ValidationResult; } //# sourceMappingURL=input-validator.d.ts.map