UNPKG

@iota-big3/sdk-security

Version:

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

99 lines 2.98 kB
/** * @iota-big3/sdk-security - Security Scanner * SAST, DAST, SCA and other security scanning capabilities */ import { EventEmitter } from 'events'; import type { SecurityFinding, SecuritySeverity } from './types'; export type ScanType = 'SAST' | 'DAST' | 'SCA' | 'Container' | 'IaC' | 'Secret'; export interface ScanConfiguration { enabledScanners: ScanType[]; scheduledScans: boolean; scanOnCommit: boolean; severityThreshold: 'low' | 'medium' | 'high' | 'critical'; } export interface Scan { id: string; type: ScanType; target: string; context: string; status: 'running' | 'completed' | 'failed'; startTime: Date; endTime?: Date; findings: SecurityFinding[]; summary: ScanSummary; } export interface ScanSummary { totalFindings: number; criticalCount: number; highCount: number; mediumCount: number; lowCount: number; } export interface ScanSchedule { id: string; type: ScanType; target: string; schedule: string; lastRun?: Date; nextRun?: Date; } interface CustomScanner { name: string; scan: (target: string, context?: string) => Promise<{ findings: SecurityFinding[]; }>; } export declare class SecurityScanner extends EventEmitter { readonly isEnabled: boolean; private config; private logger; private scans; private schedules; private customScanners; private enabledScanners; private isInitialized; constructor(config: ScanConfiguration, logger: unknown); initialize(): Promise<void>; private initializeScanners; startScan(type: ScanType, target: string, context: string): Promise<string>; private performScan; runFullScan(target: string): Promise<Map<ScanType, any>>; getFindings(options?: { severityThreshold?: SecuritySeverity; }): SecurityFinding[]; getScans(): Scan[]; getEnabledScanners(): ScanType[]; enableScanner(type: ScanType): void; disableScanner(type: ScanType): void; addCustomScanner(type: string, scanner: CustomScanner): void; exportResults(scan: Scan, format: 'sarif' | 'json' | 'csv'): string; private exportSARIF; private exportJSON; private exportCSV; scheduleScan(schedule: { type: ScanType; target: string; schedule: string; }): string; cancelScheduledScan(scheduleId: string): void; getStats(): { isInitialized: boolean; totalScans: number; activeScans: number; enabledScanners: ScanType[]; findingsCount: number; schedules: number; config: { severityThreshold: "critical" | "high" | "medium" | "low"; scheduledScans: boolean; scanOnCommit: boolean; }; }; shutdown(): Promise<void>; private generateScanId; private generateScheduleId; private calculateSummary; private severityToSarifLevel; } export {}; //# sourceMappingURL=security-scanner.d.ts.map