add VirusTotal ,AbuseIPDB threat intelligence to scan results

This commit is contained in:
rarebuffalo
2026-05-03 16:10:27 +05:30
parent 03fe240642
commit ef24b6b9fa
2 changed files with 286 additions and 0 deletions

View File

@@ -1,7 +1,12 @@
from datetime import datetime
from typing import Optional
from pydantic import BaseModel, Field
# Import the ThreatIntelReport schema from the service layer.
# We import it here for use in ScanResponse so the schema stays clean.
from app.services.threat_intel import ThreatIntelReport
class ScanRequest(BaseModel):
url: str = Field(..., description="The URL of the website to scan")
@@ -29,6 +34,8 @@ class ScanResponse(BaseModel):
layers: dict[str, LayerStatus]
issues: list[Issue]
created_at: datetime | None = None
# Step 3: Threat intelligence enrichment (optional — only present when API keys are set)
threat_intel: Optional[ThreatIntelReport] = None
class ScanHistoryItem(BaseModel):