/** * Content Screening Service - Phase 1 Security Layer * Provides security checkpoint for inbound file processing with threat detection */ export interface ScreenOptions { checkExtensionMismatch?: boolean; checkExecutableContent?: boolean; checkSuspiciousPatterns?: boolean; strictMode?: boolean; } export interface ScreenIssue { type: "extension_mismatch" | "executable_disguised" | "suspicious_pattern" | "unknown_type"; severity: "warning" | "error"; message: string; details?: Record; } export interface ScreenResult { filePath: string; passed: boolean; threatLevel: "none" | "low" | "medium" | "high"; detectedType: string; declaredExtension: string; issues: ScreenIssue[]; timestamp: Date; } export interface ScreeningReport { totalFiles: number; passedCount: number; failedCount: number; threatSummary: { none: number; low: number; medium: number; high: number; }; issuesByType: Record; timestamp: Date; results: ScreenResult[]; } export declare class ContentScreeningService { private readonly maxHeaderBytes; /** * Screen a single file for security threats */ screen(filePath: string, options?: ScreenOptions): Promise; /** * Screen multiple files in parallel */ screenBatch(filePaths: string[], options?: ScreenOptions): Promise; /** * Check if a file is allowed based on type restrictions */ isAllowed(filePath: string, allowedTypes?: string[]): Promise; /** * Generate a comprehensive screening report */ generateScreeningReport(results: ScreenResult[]): ScreeningReport; /** * Read the header and trailer bytes of a file for magic number detection */ private readFileHeaderAndTrailer; /** * Read the header bytes of a file for magic number detection (backward compatibility) */ private readFileHeader; /** * Detect file type from magic number */ private detectFileType; /** * Check if file extension matches detected type */ private checkExtensionMismatch; /** * Check for executable files masquerading as documents or images */ private checkExecutableMasquerading; /** * Check for suspicious filename patterns */ private checkSuspiciousPatterns; /** * Update threat level based on issues */ private updateThreatLevel; /** * Extract extension from detected type string */ private extractExtensionFromType; } export declare const contentScreeningService: ContentScreeningService; //# sourceMappingURL=content-screening.service.d.ts.map