feat(audit): P34 Exec-Summary Score-Einordnung — 'wo Sie stehen sollten'
CI / detect-changes (push) Successful in 10s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / validate-canonical-controls (push) Successful in 14s
CI / loc-budget (push) Failing after 16s
CI / go-lint (push) Has been skipped
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m46s
CI / test-go (push) Has been skipped
CI / iace-gt-coverage (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / test-python-backend (push) Successful in 43s
CI / test-python-document-crawler (push) Has been skipped
CI / detect-changes (push) Successful in 10s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / validate-canonical-controls (push) Successful in 14s
CI / loc-budget (push) Failing after 16s
CI / go-lint (push) Has been skipped
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m46s
CI / test-go (push) Has been skipped
CI / iace-gt-coverage (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / test-python-backend (push) Successful in 43s
CI / test-python-document-crawler (push) Has been skipped
_score_band_explanation: vier Baender (Sehr gut/Akzeptabel/Handlungs- bedarf/Erhoehtes Risiko) liefern Label + erwartete Handlung. Wird als neue Zeile unter den KPIs in der Exec-Summary gerendert (mit score-farbiger Linkmark). Sachlicher Ton — kein 'Vorstand muss sofort handeln', sondern realistische Empfehlung (z.B. '70-84: Branchen-Median, einmaliges Aufraeumen + Halbjahres-Check'). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,47 @@ def _fmt_eur_range(low: int, high: int) -> str:
|
||||
return f"{low:,}–{high:,} €".replace(",", ".")
|
||||
|
||||
|
||||
def _build_score_band_block(pct: int, color: str) -> list[str]:
|
||||
"""P34 — eine Zeile unter den KPIs: Score-Einordnung."""
|
||||
band, hint = _score_band_explanation(pct)
|
||||
return [
|
||||
f'<div style="margin-top:10px;padding:10px 14px;'
|
||||
f'background:rgba(255,255,255,0.04);border-left:3px solid {color};'
|
||||
f'border-radius:4px">'
|
||||
f'<div style="font-size:11px;color:#cbd5e1">'
|
||||
f'<strong style="color:{color}">{band} ({pct}%)</strong> — {hint}'
|
||||
f'</div></div>',
|
||||
]
|
||||
|
||||
|
||||
def _score_band_explanation(pct: int) -> tuple[str, str]:
|
||||
"""P34 — Was bedeutet der Score: wo MUESSTE man stehen.
|
||||
|
||||
Returns (label, what_to_expect)."""
|
||||
if pct >= 85:
|
||||
return (
|
||||
"Sehr gut", "Praxis-uebliche DSGVO-Risikolage. "
|
||||
"Standard-Pflege reicht — jaehrliche Pruefung empfohlen.",
|
||||
)
|
||||
if pct >= 70:
|
||||
return (
|
||||
"Akzeptabel", "Branchen-Median. Verbleibende Findings sind "
|
||||
"meist Formalia — Empfehlung: einmaliges Aufraeumen, dann "
|
||||
"Halbjahres-Check.",
|
||||
)
|
||||
if pct >= 50:
|
||||
return (
|
||||
"Handlungsbedarf", "Mehrere wesentliche Themen offen. "
|
||||
"Empfehlung: priorisierte Abarbeitung der HIGH-Findings "
|
||||
"binnen 4-8 Wochen mit DSB + Web-Team.",
|
||||
)
|
||||
return (
|
||||
"Erhoehtes Risiko", "Mehrere Kern-Pflichten fehlen oder sind "
|
||||
"veraltet. Empfehlung: kurzfristiger Termin mit DSB / Rechtsabteilung "
|
||||
"und Web-Team zur Priorisierung.",
|
||||
)
|
||||
|
||||
|
||||
def build_exec_summary_html(
|
||||
scorecard: dict | None,
|
||||
previous_scorecard: dict | None,
|
||||
@@ -117,6 +158,9 @@ def build_exec_summary_html(
|
||||
|
||||
'</table>',
|
||||
|
||||
# P34 — Score-Einordnung "wer wo stehen muss"
|
||||
*(_build_score_band_block(pct, score_color) if scorecard else []),
|
||||
|
||||
# CTAs
|
||||
'<div style="margin-top:14px;padding-top:12px;border-top:1px solid '
|
||||
'rgba(255,255,255,0.1);text-align:center">',
|
||||
|
||||
Reference in New Issue
Block a user