/** * Secure Path Validation Utility * * Provides centralized, robust path validation to prevent directory traversal * and other path-based security vulnerabilities. Replaces scattered validation * logic throughout the codebase. */ export interface PathValidationOptions { allowedExtensions?: string[]; mustExist?: boolean; allowRelative?: boolean; checkSymlinks?: boolean; } /** * Validates a path against security constraints and business rules * @param inputPath - Path to validate * @param allowedBase - Base directory that path must be within * @param options - Additional validation options * @returns Sanitized absolute path if valid, throws error if invalid */ export declare const validateSecurePath: (inputPath: string, allowedBase?: string, options?: PathValidationOptions) => string; /** * Validates multiple paths using the same criteria * @param paths - Array of paths to validate * @param allowedBase - Base directory that all paths must be within * @param options - Additional validation options * @returns Array of validated absolute paths */ export declare const validateSecurePaths: (paths: string[], allowedBase?: string, options?: PathValidationOptions) => string[]; export declare const createPathValidator: (allowedBase: string, options?: PathValidationOptions) => (path: string, overrideOptions?: PathValidationOptions) => string; export declare const VALIDATORS: { stubFile: (path: string, overrideOptions?: PathValidationOptions) => string; mockFile: (path: string, overrideOptions?: PathValidationOptions) => string; configFile: (path: string, overrideOptions?: PathValidationOptions) => string; testData: (path: string, overrideOptions?: PathValidationOptions) => string; }; //# sourceMappingURL=pathValidator.d.ts.map