spanwright
Version:
CLI tool to generate Cloud Spanner E2E testing framework projects with Go database tools and Playwright browser automation
24 lines • 957 B
TypeScript
/**
* Basic path traversal check
* @param basePath The base directory path
* @param targetPath The path to validate
* @returns true if the path is safe, false otherwise
*/
export declare function isSafePath(basePath: string, targetPath: string): boolean;
/**
* Basic path validation
* @param basePath The base directory path
* @param targetPath The path to validate
* @param operationName The name of the operation (for error messages)
* @throws SecurityError if the path is unsafe
*/
export declare function validatePath(basePath: string, targetPath: string, operationName: string): void;
/**
* Gets a safe path within a base directory
* @param basePath The base directory
* @param targetPath The target path to validate
* @returns The normalized absolute path if safe
* @throws SecurityError if the path is unsafe
*/
export declare function getSafePath(basePath: string, targetPath: string): string;
//# sourceMappingURL=security.d.ts.map