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.
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
from __future__ import annotations
|
|
|
|
from app.schemas.analyze import AnalyzeItem
|
|
from app.services.analyze.base import AnalyzerContribution, AnalyzeContext
|
|
from app.services.analyze.radio_test import run_radio_test
|
|
|
|
|
|
class RadioTestAnalyzer:
|
|
key = "radio_test"
|
|
ttl_seconds = 60 * 60 * 24 * 7 # deterministic, effectively stable
|
|
|
|
async def analyze(self, ctx: AnalyzeContext) -> list[AnalyzerContribution]:
|
|
radio = run_radio_test(ctx.domain)
|
|
item = AnalyzeItem(
|
|
key="radio_test",
|
|
label="Radio Test",
|
|
value=radio.status,
|
|
status=radio.status,
|
|
source="internal",
|
|
details={
|
|
"sld": radio.sld,
|
|
"syllables": radio.syllables,
|
|
"length": radio.length,
|
|
"has_hyphen": radio.has_hyphen,
|
|
"has_digits": radio.has_digits,
|
|
"rationale": radio.rationale,
|
|
},
|
|
)
|
|
return [AnalyzerContribution(quadrant="authority", items=[item])]
|
|
|