diff --git a/docs/AUDIT_2026-05-25_TODO.md b/docs/AUDIT_2026-05-25_TODO.md index 83984d4..3593f6e 100644 --- a/docs/AUDIT_2026-05-25_TODO.md +++ b/docs/AUDIT_2026-05-25_TODO.md @@ -15,8 +15,8 @@ Status: Arbeitsliste fuer die Umsetzung. Authelia-2FA/OIDC bleibt bewusst spaet, Kontext bewusst gesichert, bevor weitere Live-Aenderungen passieren: -1. Policy-Warnings triagieren: Plex Host-Netz, mutable Tags bei `ddns-updater`, `glances`, `scrutiny` und `monitoring-influxdb3-core` als Root-Ausnahme bewerten. -2. USV-Entscheidung treffen: aktuell ist keine funktionierende USV-Abschaltung nachgewiesen. +1. USV-Entscheidung treffen: aktuell ist keine funktionierende USV-Abschaltung nachgewiesen. +2. Externe Abhaengigkeiten und Recovery-Pfade vervollstaendigen. 3. Authelia 2FA/OIDC weiterhin nicht anfassen; das bleibt bewusst der letzte Block. ## Sprint 0 - Inventar und Baseline @@ -39,7 +39,7 @@ Kontext bewusst gesichert, bevor weitere Live-Aenderungen passieren: | erledigt | AdGuard Admin-Port auf Tailscale-IP binden | Live validiert: `ss -ltnp` zeigt `100.80.98.33:8082`, DNS auf Port 53 funktioniert, LAN-Zugriff auf `192.168.178.58:8082` schlaegt fehl | | erledigt | Alte Monitoring-Verzeichnisse entfernen | `ops/grafana-influxdb/` und `ops/loki/` sind aus dem aktiven Repo entfernt; Rollback erfolgt ueber Git-Historie | | erledigt | Komodo/Gitea-Restdrift bereinigen | alter Komodo-Stack `grafana` ist inert und ohne Repo-Pfad/Webhook; Gitea-Hook `35` und `komodo`-Self-Hook `11` sind inaktiv; aktive Gitea-Hooks haben keine Fehlstatus | -| offen | Policy-Warnings triagieren | Jede Warning ist behoben oder bewusst dokumentiert | +| erledigt | Policy-Warnings triagieren | Plex Host-Netz und digest-gepinnte mutable Tags sind dokumentierte Info-Ausnahmen; `monitoring-influxdb3-core` als Root-Ausnahme bleibt bewusst als Warning sichtbar | ## Sprint 2 - Storage und Recovery verbindlich machen diff --git a/docs/MIGRATION_LOG.md b/docs/MIGRATION_LOG.md index d063840..5734301 100644 --- a/docs/MIGRATION_LOG.md +++ b/docs/MIGRATION_LOG.md @@ -17,6 +17,12 @@ Dieses Dokument ist nur noch ein historischer Verlauf. Der aktuelle operative Ab ## Historische Meilensteine +### 2026-05-26 - Policy-Warnings triagiert + +- Plex `network_mode: host` wurde in den Policy-Ausnahmen als dokumentierte Discovery-Ausnahme erfasst. +- Mutable Tags bei `ddns-updater`, `glances` und `scrutiny` bleiben wegen vorhandener SHA256-Digests reproduzierbar gepinnt und werden im Policy-Report als Info-Ausnahmen sichtbar gehalten. +- `monitoring-influxdb3-core` bleibt als dokumentierte `user: "0"`-Ausnahme bewusst eine Warning, damit der Hardening-Punkt nicht aus dem Blick faellt. + ### 2026-05-26 - Hardware-/Capacity-Baseline abgeschlossen - Hardware-Inventar auf Host-Befund aktualisiert: BIOS AMI F21 vom 2025-06-19, Intel Raptor Lake SATA AHCI, Samsung NVMe Controller und Realtek RTL8125 2.5GbE mit aktuellem 1G-Link. diff --git a/ops/policy-checks/README.md b/ops/policy-checks/README.md index 29c7160..d61d794 100644 --- a/ops/policy-checks/README.md +++ b/ops/policy-checks/README.md @@ -32,6 +32,7 @@ powershell -ExecutionPolicy Bypass -File .\ops\policy-checks\check_repo.ps1 -Rep - Host-Port-Mappings - Traefik-Router mit `Host(...)` und Middleware-Standard fuer geschuetzte Admin-/Ops-Dienste - sichtbare Report-Punkte fuer dokumentierte Ausnahmen wie `user: "0"`, `privileged: true` oder `network_mode: host` +- digest-gepinnte mutable Tags bleiben sichtbar; nur explizit dokumentierte Ausnahmen werden als Info statt Warning gewertet ## Wichtige Betriebsregel diff --git a/ops/policy-checks/check_repo.ps1 b/ops/policy-checks/check_repo.ps1 index c1b35a1..77732e9 100644 --- a/ops/policy-checks/check_repo.ps1 +++ b/ops/policy-checks/check_repo.ps1 @@ -253,7 +253,11 @@ function Test-ServicePolicies { } if ($service.Image -match ':[Ll]atest(?:[-@]|$)') { - Add-Finding -Findings $Findings -Severity 'warning' -Code 'IMAGE001' -Target $targetBase -Message 'Image uses a latest tag. Prefer a concrete version tag, even when a digest is present.' + if (($service.Image -match '@sha256:') -and (Test-IdentityMatch -Service $service -Candidates $Exceptions.allowed_mutable_tag_identities)) { + Add-Finding -Findings $Findings -Severity 'info' -Code 'IMAGE002' -Target $targetBase -Message 'Image uses a latest tag but is digest-pinned and documented as an exception.' + } else { + Add-Finding -Findings $Findings -Severity 'warning' -Code 'IMAGE001' -Target $targetBase -Message 'Image uses a latest tag. Prefer a concrete version tag, even when a digest is present.' + } } $isDataService = $false @@ -362,6 +366,7 @@ $exceptionsRaw = Get-Content -LiteralPath $exceptionsPath -Raw | ConvertFrom-Jso $exceptions = @{ middleware_exempt_identities = @($exceptionsRaw.middleware_exempt_identities) allowed_root_identities = @($exceptionsRaw.allowed_root_identities) + allowed_mutable_tag_identities = @($exceptionsRaw.allowed_mutable_tag_identities) allowed_privileged_identities = @($exceptionsRaw.allowed_privileged_identities) allowed_host_network_identities = @($exceptionsRaw.allowed_host_network_identities) allowed_host_port_identities = @{} diff --git a/ops/policy-checks/exceptions.json b/ops/policy-checks/exceptions.json index c0b0da0..a73000b 100644 --- a/ops/policy-checks/exceptions.json +++ b/ops/policy-checks/exceptions.json @@ -32,10 +32,16 @@ "allowed_root_identities": [ "monitoring-influxdb3-core" ], + "allowed_mutable_tag_identities": [ + "ddns-updater", + "glances", + "scrutiny" + ], "allowed_privileged_identities": [ "scrutiny" ], "allowed_host_network_identities": [ + "plex", "tailscale", "Tailscale-Docker" ] diff --git a/ops/policy-checks/last-report.md b/ops/policy-checks/last-report.md index 050213d..f6cbb95 100644 --- a/ops/policy-checks/last-report.md +++ b/ops/policy-checks/last-report.md @@ -3,26 +3,26 @@ ## Summary - Compose files checked: 29 - Critical findings: 0 -- Warnings: 5 -- Info findings: 9 +- Warnings: 1 +- Info findings: 13 ## Critical - none ## Warnings -- [HOSTNET002] host-services\plex\docker-compose.yml :: plex: network_mode: host is enabled. -- [IMAGE001] infra\ddns-updater\docker-compose.yml :: ddns-updater: Image uses a latest tag. Prefer a concrete version tag, even when a digest is present. - [USER001] monitoring\docker-compose.yml :: influxdb3-core: Runs as user 0. Documented exception, keep visible for hardening. -- [IMAGE001] ops\glances\docker-compose.yml :: glances: Image uses a latest tag. Prefer a concrete version tag, even when a digest is present. -- [IMAGE001] ops\scrutiny\docker-compose.yml :: scrutiny: Image uses a latest tag. Prefer a concrete version tag, even when a digest is present. ## Info - [PORT001] core\gitea\docker-compose.yml :: gitea: Allowed host port mapping: 222:22 - [PORT001] host-services\Adguard\docker-compose.yml :: adguard: Allowed host port mapping: 53:53/tcp - [PORT001] host-services\Adguard\docker-compose.yml :: adguard: Allowed host port mapping: 53:53/udp - [PORT001] host-services\Adguard\docker-compose.yml :: adguard: Allowed host port mapping: 100.80.98.33:8082:80 +- [HOSTNET001] host-services\plex\docker-compose.yml :: plex: network_mode: host is a documented exception. - [HOSTNET001] host-services\tailscale\docker-compose.yml :: tailscale: network_mode: host is a documented exception. +- [IMAGE002] infra\ddns-updater\docker-compose.yml :: ddns-updater: Image uses a latest tag but is digest-pinned and documented as an exception. - [PORT001] monitoring\docker-compose.yml :: influxdb3-core: Allowed host port mapping: ${INFLUXDB_BIND_IP:-127.0.0.1}:8181:8181 +- [IMAGE002] ops\glances\docker-compose.yml :: glances: Image uses a latest tag but is digest-pinned and documented as an exception. +- [IMAGE002] ops\scrutiny\docker-compose.yml :: scrutiny: Image uses a latest tag but is digest-pinned and documented as an exception. - [PRIV001] ops\scrutiny\docker-compose.yml :: scrutiny: Privileged mode is a documented exception. - [PORT001] traefik\docker-compose.yml :: traefik: Allowed host port mapping: 80:80 - [PORT001] traefik\docker-compose.yml :: traefik: Allowed host port mapping: 443:443