Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Adds HUNT (Sniper/Trend/Forge), CFO dashboard (burn rate + kill list), and a plugin-based Analyze side panel with caching and SSRF hardening.
36 lines
864 B
Python
36 lines
864 B
Python
"""
|
|
Analyze schemas (Alpha Terminal - Phase 2 Diligence).
|
|
|
|
Open-data-first: we return null + reason when data isn't available.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import datetime
|
|
from typing import Any, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class AnalyzeItem(BaseModel):
|
|
key: str
|
|
label: str
|
|
value: Optional[Any] = None
|
|
status: str = Field(default="info", description="pass|warn|fail|info|na")
|
|
source: str = Field(default="internal", description="internal|rdap|whois|dns|http|ssl|db|open_data")
|
|
details: dict[str, Any] = Field(default_factory=dict)
|
|
|
|
|
|
class AnalyzeSection(BaseModel):
|
|
key: str
|
|
title: str
|
|
items: list[AnalyzeItem] = Field(default_factory=list)
|
|
|
|
|
|
class AnalyzeResponse(BaseModel):
|
|
domain: str
|
|
computed_at: datetime
|
|
cached: bool = False
|
|
sections: list[AnalyzeSection]
|
|
|