mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 14:00:20 -05:00
Implement Phase 4: ML threat detection, automated playbooks, and advanced reporting
Co-authored-by: mblanke <9078342+mblanke@users.noreply.github.com>
This commit is contained in:
32
backend/app/schemas/threat_score.py
Normal file
32
backend/app/schemas/threat_score.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List, Dict, Any
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class ThreatScoreBase(BaseModel):
|
||||
"""Base threat score schema"""
|
||||
score: float
|
||||
confidence: float
|
||||
threat_type: str
|
||||
description: Optional[str] = None
|
||||
indicators: Optional[List[Dict[str, Any]]] = None
|
||||
|
||||
|
||||
class ThreatScoreCreate(ThreatScoreBase):
|
||||
"""Schema for creating a threat score"""
|
||||
host_id: Optional[int] = None
|
||||
artifact_id: Optional[int] = None
|
||||
ml_model_version: Optional[str] = None
|
||||
|
||||
|
||||
class ThreatScoreRead(ThreatScoreBase):
|
||||
"""Schema for reading threat score data"""
|
||||
id: int
|
||||
tenant_id: int
|
||||
host_id: Optional[int]
|
||||
artifact_id: Optional[int]
|
||||
ml_model_version: Optional[str]
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user