/**
 * The Hearth Sentinel — Type Definitions
 */

export interface ThreatEntry {
  cweId?: string;
  cveId?: string;
  owaspCategory: string;
  title: string;
  description: string;
  severity: 'critical' | 'high' | 'medium' | 'low';
  riskScore: number;
  affectedPattern?: string;
  remediation?: string;
  references: string[];
}

export interface ScanFinding {
  filePath: string;
  lineNumber?: number;
  codeSnippet?: string;
  vulnerability: string;
  severity: 'critical' | 'high' | 'medium' | 'low';
  confidence: number;
  remediation?: string;
  threatId?: string;
  owaspCategory?: string;
}

export interface ScanResult {
  scanId: string;
  status: 'completed' | 'failed';
  totalFiles: number;
  filesScanned: number;
  findings: ScanFinding[];
  criticalCount: number;
  highCount: number;
  mediumCount: number;
  lowCount: number;
  summary: string;
  duration: number;
}

export interface OwaspCategory {
  id: string;
  name: string;
  description: string;
  year: number;
  patterns: SecurityPattern[];
}

export interface SecurityPattern {
  name: string;
  cweId?: string;
  regex?: string;
  keywords: string[];
  severity: 'critical' | 'high' | 'medium' | 'low';
  description: string;
  remediation: string;
}
