/** * Agentic QE v3 - Compliance Pattern Analyzer * Detects security and compliance patterns in source code */ export interface PatternMatch { file: string; line: number; column?: number; snippet: string; pattern: string; severity: 'info' | 'warning' | 'critical'; } export interface CompliancePatternResult { category: string; passed: boolean; matches: PatternMatch[]; missingPatterns: string[]; } export interface EncryptionAnalysis { hasEncryption: boolean; encryptionLibraries: string[]; unencryptedDataHandling: PatternMatch[]; weakCrypto: PatternMatch[]; } export interface AccessControlAnalysis { hasAuthMiddleware: boolean; unprotectedRoutes: PatternMatch[]; missingRoleChecks: PatternMatch[]; hardcodedCredentials: PatternMatch[]; } export interface LoggingAnalysis { hasAuditLogging: boolean; sensitiveOperationsWithoutLogging: PatternMatch[]; sensitiveDataInLogs: PatternMatch[]; } export interface DataProtectionAnalysis { piiFields: PatternMatch[]; unmaskedPii: PatternMatch[]; missingValidation: PatternMatch[]; } export interface SecurityControlsAnalysis { hasRateLimiting: boolean; hasCsrfProtection: boolean; hasCors: boolean; hasInputValidation: boolean; missingControls: string[]; vulnerabilities: PatternMatch[]; } export declare class CompliancePatternAnalyzer { private readonly fileReader; constructor(); /** * Analyze encryption patterns in files */ analyzeEncryption(files: string[]): Promise; /** * Analyze access control patterns */ analyzeAccessControl(files: string[]): Promise; /** * Analyze logging patterns */ analyzeLogging(files: string[]): Promise; /** * Analyze data protection patterns */ analyzeDataProtection(files: string[]): Promise; /** * Analyze security controls */ analyzeSecurityControls(files: string[]): Promise; /** * Scan files for specific data types (PII, PHI, etc.) */ scanForDataTypes(files: string[], dataTypes: Array<'pii' | 'phi' | 'financial' | 'credentials' | 'biometric'>): Promise>; } export declare function getCompliancePatternAnalyzer(): CompliancePatternAnalyzer; //# sourceMappingURL=compliance-patterns.d.ts.map