UNPKG

@iota-big3/sdk-security

Version:

Advanced security features including zero trust, quantum-safe crypto, and ML threat detection

78 lines 2.69 kB
/** * @iota-big3/sdk-security - Clean Threat Detection * Minimal threat detection and ML security implementation */ import { EventEmitter } from 'events'; import type { SecuritySeverity, ThreatDetectionConfig } from './types'; export declare class ThreatDetectionManager extends EventEmitter { readonly isEnabled: boolean; private config; private threats; private scanners; private isInitialized; constructor(config: ThreatDetectionConfig); initialize(): Promise<void>; private initializeMLDetection; private initializeRealTimeScanning; private initializeAnomalyDetection; scanTarget(target: string, scanType?: ThreatScanType): Promise<ThreatScanResult>; detectAnomalies(data: unknown[]): Promise<AnomalyResult[]>; recordThreat(threat: ThreatInfo): void; getThreat(threatId: string): ThreatInfo | undefined; getThreats(limit?: number): ThreatInfo[]; mitigateThreat(threatId: string, action: MitigationAction): Promise<boolean>; addScanner(scanner: ThreatScanner): void; removeScanner(scannerId: string): boolean; getScanners(): ThreatScanner[]; private generateId; shutdown(): Promise<void>; getStats(): { isInitialized: boolean; threatsCount: number; scannersCount: number; config: ThreatDetectionConfig; isEnabled: boolean; }; } export interface ThreatInfo { id: string; type: ThreatType; severity: SecuritySeverity; source: string; target: string; description: string; detectedAt: number; status: 'ACTIVE' | 'MITIGATED' | 'FALSE_POSITIVE'; mitigationAction?: MitigationAction; mitigatedAt?: number; } export type ThreatType = 'MALWARE' | 'PHISHING' | 'DDoS' | 'BRUTE_FORCE' | 'SQL_INJECTION' | 'XSS' | 'PRIVILEGE_ESCALATION' | 'DATA_EXFILTRATION' | 'ANOMALOUS_BEHAVIOR'; export type ThreatScanType = 'QUICK' | 'FULL' | 'DEEP' | 'TARGETED'; export interface ThreatScanResult { id: string; target: string; scanType: ThreatScanType; startTime: number; endTime: number; status: 'RUNNING' | 'COMPLETED' | 'FAILED'; threatsFound: ThreatInfo[]; riskScore: number; recommendations: string[]; } export interface AnomalyResult { id: string; type: string; severity: SecuritySeverity; confidence: number; description: string; timestamp: number; } export interface ThreatScanner { id: string; name: string; type: ThreatScanType; enabled: boolean; lastRun?: number; } export type MitigationAction = 'BLOCK_IP' | 'QUARANTINE' | 'ALERT_ADMIN' | 'RATE_LIMIT' | 'DISABLE_ACCOUNT' | 'ISOLATE_SYSTEM'; //# sourceMappingURL=threat-detection.d.ts.map