UNPKG

vibe-coder-mcp

Version:

Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.

73 lines 2.43 kB
export interface PathValidationResult { valid: boolean; canonicalPath?: string; error?: string; securityViolation?: boolean; violationType?: 'traversal' | 'whitelist' | 'symlink' | 'absolute' | 'malformed'; auditInfo: { originalPath: string; timestamp: Date; validationTime: number; }; } export interface PathWhitelistConfig { allowedDirectories: string[]; allowedExtensions: string[]; blockedPatterns: RegExp[]; allowSymlinks: boolean; allowAbsolutePaths: boolean; maxPathLength: number; } export interface PathSecurityAuditEvent { id: string; type: 'validation_success' | 'validation_failure' | 'security_violation'; originalPath: string; canonicalPath?: string; violationType?: string; userAgent?: string; sessionId?: string; timestamp: Date; validationTime: number; stackTrace?: string; } export declare class PathSecurityValidator { private static instance; private config; private auditEvents; private auditCounter; private constructor(); static getInstance(config?: Partial<PathWhitelistConfig>): PathSecurityValidator; validatePath(filePath: string, _operation?: 'read' | 'write' | 'execute', context?: { sessionId?: string; userAgent?: string; }): Promise<PathValidationResult>; private createValidationResult; private containsTraversal; private isPathInWhitelist; private isExtensionAllowed; private isSymbolicLink; private logAuditEvent; getAuditEvents(filter?: { type?: PathSecurityAuditEvent['type']; violationType?: string; since?: Date; sessionId?: string; }): PathSecurityAuditEvent[]; getSecurityStatistics(): { totalValidations: number; successfulValidations: number; securityViolations: number; validationFailures: number; averageValidationTime: number; violationsByType: Record<string, number>; }; updateWhitelist(config: Partial<PathWhitelistConfig>): void; clearAuditEvents(): void; shutdown(): void; } export declare function validateSecurePath(filePath: string, operation?: 'read' | 'write' | 'execute', context?: { sessionId?: string; userAgent?: string; }): Promise<PathValidationResult>; export declare function getPathValidator(): PathSecurityValidator; //# sourceMappingURL=path-validator.d.ts.map