monitoring: CVE-Alarme aggregiert pro Image + Receiver-Robustheit (gitops#51)
Entscheidung sorb 2026-08-01 (Option 1 aus #51): Alarme als count by (target, severity) statt pro CVE (~58 Serien statt ~1200), CVE-Details bleiben im Dashboard (trivy_vuln_info unveraendert). Receiver: inkrementelles save_state nach jedem Alarm, 1s-Sende-Drossel (Synapse rc_message), recent_resolved-Dedup gegen doppelte Fallback-Haken bei Batch-Retries, Teilfehler -> 502 liefert nur den Rest nach. Stumm-Route + Null-Receiver entfernt - Zustellung wieder scharf. promtool/amtool/py_compile gruen. UNGETESTET bis Deploy (Uebergabe-Issue). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKhFj1S3UdD6xL2fbWPeYj
This commit is contained in:
co-authored by
Claude Fable 5
parent
0bd77e28d8
commit
ff87cb25fb
@@ -58,21 +58,26 @@ groups:
|
||||
# Alle Regeln routen per room-Label in den Security-Raum.
|
||||
- name: axion-cve
|
||||
rules:
|
||||
- alert: TrivyCriticalVuln
|
||||
expr: trivy_vuln_info{severity="CRITICAL"} == 1
|
||||
# Aggregiert pro Image statt pro CVE (gitops#51, Entscheidung sorb
|
||||
# 2026-08-01): ~1000 Einzelalarme waeren Rauschen; die menschlich
|
||||
# handhabbare Einheit ist "Image X hat N kritische CVEs". Die
|
||||
# CVE-Details (Pflichtfelder) liegen im Grafana-Dashboard cve-overview,
|
||||
# die trivy_vuln_info-Einzelserien bleiben dafuer erhalten.
|
||||
- alert: TrivyCriticalVulns
|
||||
expr: count by (target, target_type, host) (trivy_vuln_info{severity="CRITICAL"}) > 0
|
||||
labels:
|
||||
severity: critical
|
||||
room: security
|
||||
annotations:
|
||||
summary: "{{ $labels.cve }} (CRITICAL) in {{ $labels.target }} [{{ $labels.target_type }}@{{ $labels.host }}] — Paket {{ $labels.pkg }} {{ $labels.installed }}{{ if $labels.fixed_version }}, Fix: {{ $labels.fixed_version }}{{ else }}, noch kein Fix{{ end }} — https://nvd.nist.gov/vuln/detail/{{ $labels.cve }}"
|
||||
- alert: TrivyHighVuln
|
||||
expr: trivy_vuln_info{severity="HIGH"} == 1
|
||||
summary: "{{ $labels.target }} [{{ $labels.target_type }}@{{ $labels.host }}]: {{ $value }} CRITICAL-CVEs — Details: https://selendis.axion1337.de/d/cve-overview"
|
||||
- alert: TrivyHighVulns
|
||||
expr: count by (target, target_type, host) (trivy_vuln_info{severity="HIGH"}) > 0
|
||||
for: 24h
|
||||
labels:
|
||||
severity: warning
|
||||
room: security
|
||||
annotations:
|
||||
summary: "{{ $labels.cve }} (HIGH) in {{ $labels.target }} [{{ $labels.target_type }}@{{ $labels.host }}] — Paket {{ $labels.pkg }} {{ $labels.installed }}{{ if $labels.fixed_version }}, Fix: {{ $labels.fixed_version }}{{ else }}, noch kein Fix{{ end }} — https://nvd.nist.gov/vuln/detail/{{ $labels.cve }}"
|
||||
summary: "{{ $labels.target }} [{{ $labels.target_type }}@{{ $labels.host }}]: {{ $value }} HIGH-CVEs (seit 24h offen) — Details: https://selendis.axion1337.de/d/cve-overview"
|
||||
- alert: TrivyScanStale
|
||||
expr: time() - trivy_last_scan_timestamp > 172800
|
||||
labels:
|
||||
|
||||
Reference in New Issue
Block a user