/** * Security utilities for validating and sanitizing file paths */ /** * Validates a path doesn't contain traversal patterns */ export declare function isPathTraversalSafe(inputPath: string): boolean; /** * Resolves and validates a path within a base directory * Prevents directory traversal attacks by ensuring the resolved path * stays within the base directory. * Also resolves symlinks to prevent symlink-based path traversal attacks. * * @param basePath - The base directory to validate against * @param userPath - The user-provided path to validate * @param resolveSymlinks - Whether to resolve symlinks (default: true for security) * @returns The validated absolute path * @throws Error if path is outside base directory */ export declare function safeResolvePath(basePath: string, userPath: string, resolveSymlinks?: boolean): string; /** * Validates that a path exists and is accessible */ export declare function validatePathExists(filePath: string): boolean; /** * Validates an array of paths for security issues */ export declare function validatePaths(paths: string[], basePath: string): string[]; /** * Sanitizes environment variable values to prevent injection */ export declare function sanitizeEnvValue(value: string | undefined): string | undefined; /** * Validates a port number or string */ export declare function validatePort(port: unknown): boolean; //# sourceMappingURL=pathValidation.d.ts.map