/** * Shared file-scanning utilities for Vibe Audit Tier 1 tools. * * Security: * - Path traversal prevention (blocks ../, resolves to absolute, restricts to project dir) * - No symlink following (uses lstat) * - File size limits (1MB per file, 100 files per scan) * - Read-only operations only * * Reference: mcp-dev-checklist.md section 2-E (file system access) */ /** * Validate and normalize a project path. * Blocks path traversal, ensures the path exists and is a directory. */ export declare function validateProjectPath(projectPath: string): Promise; /** * Read a file safely within the project directory. * Returns null if the file doesn't exist or is a symlink. */ export declare function readProjectFile(projectRoot: string, relativePath: string): Promise; /** * Check if a file exists (non-symlink) within the project directory. */ export declare function fileExists(projectRoot: string, relativePath: string): Promise; export interface ScanOptions { /** File extensions to include (e.g., [".ts", ".js", ".tsx"]) */ extensions: string[]; /** Additional directories to exclude (merged with defaults) */ excludeDirs?: string[]; /** Maximum depth to scan */ maxDepth?: number; } /** * Recursively scan a project directory for files matching criteria. * Returns an array of relative file paths. */ export declare function scanProjectFiles(projectRoot: string, options: ScanOptions): Promise; /** * Mask a secret value for safe display. * Shows first 4 and last 4 characters, masks the rest. */ export declare function maskSecret(value: string): string; //# sourceMappingURL=file-scanner.d.ts.map