import { Finding, ScanConfig, SeverityLevel, VulnerabilityType } from '../types/index.js'; import { Logger } from '../utils/Logger.js'; export declare abstract class BaseScanner { protected logger: Logger; protected name: string; protected description: string; protected supportedFileTypes: string[]; constructor(name: string, description: string, supportedFileTypes?: string[]); /** * Main scan method that should be implemented by subclasses */ abstract scan(path: string, config?: Partial): Promise; /** * Check if this scanner can handle the given file type */ canScan(filePath: string): boolean; /** * Get scanner information */ getInfo(): { name: string; description: string; supportedFileTypes: string[]; }; /** * Create a finding with common fields */ protected createFinding(type: VulnerabilityType, severity: SeverityLevel, title: string, description: string, location: { file: string; line?: number; column?: number; function?: string; context?: string; }, evidence: string, recommendation: string, options?: { cwe?: string[]; confidence?: number; tags?: string[]; }): Finding; /** * Generate a unique ID for scan results */ protected generateId(): string; /** * Log scan progress */ protected logProgress(message: string, data?: any): void; /** * Log scan error */ protected logError(message: string, error?: Error): void; /** * Validate scan configuration */ protected validateConfig(config: Partial): void; /** * Get file extension from path */ protected getFileExtension(filePath: string): string; /** * Check if file should be excluded based on patterns */ protected shouldExclude(filePath: string, excludePatterns?: string[]): boolean; /** * Check if file should be included based on patterns */ protected shouldInclude(filePath: string, includePatterns?: string[]): boolean; /** * Extract line context from file content */ protected getLineContext(content: string, lineNumber: number, contextLines?: number): string; /** * Calculate confidence score based on evidence strength */ protected calculateConfidence(evidence: string, pattern: string): number; /** * Get severity level based on vulnerability type and context */ protected getSeverityLevel(type: VulnerabilityType, context?: any): SeverityLevel; } //# sourceMappingURL=BaseScanner.d.ts.map