/** * Security Scanner Utility Functions */ import { VulnerabilityType, CodeContext } from './types.js'; /** * Generate unique finding ID */ export declare function generateFindingId(filePath: string, line: number, type: VulnerabilityType): string; /** * Extract code context around issue */ export declare function extractCodeContext(content: string, lineNumber: number, contextLines?: 2): CodeContext; /** * Calculate Shannon entropy for string */ export declare function calculateEntropy(str: string): number; /** * Check if file should be scanned */ export declare function shouldScanFile(filePath: string, excludePatterns: string[]): boolean; /** * Check if a line should be skipped (comments, examples, etc.) */ export declare function shouldSkipLine(line: string): boolean; /** * Truncate sensitive data for display in reports */ export declare function truncateSensitive(text: string, maxLength?: 20): string; /** * Check if a file path belongs to the security scanner itself * Used to avoid self-detection of patterns */ export declare function isScannerFile(filePath: string): boolean; /** * Check if a line should be skipped during XSS scanning * Skips pattern definitions, comments, and test code */ export declare function shouldSkipXSSLine(line: string): boolean; //# sourceMappingURL=utils.d.ts.map