0xMiden / 0xMiden/note-transport-service

Container runs as root, no HEALTHCHECK; compose uses :latest + hardcoded Grafana password

Offen
#133 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement production-readiness
Vorherrschende Sprache
Rust
Sterne
3
Forks
10
Ø Merge
2 Std. 23 Min.
Gemergte PRs (30 T.)
4

Beschreibung

Severity: medium.

### Summary

Deployment hardening gaps in `bin/node/docker/`.

- **Dockerfile** (`Dockerfile:18-47`): final stage has no `USER` (runs as root) and no `HEALTHCHECK` (`grpc_health_probe` not bundled).
- **docker-compose.yml**: no `restart:` on any service (a node crash leaves the stack down); images pinned to `:latest` (`otel/opentelemetry-collector-contrib`, `grafana/grafana`, `grafana/tempo`, `prom/prometheus`); `GF_SECURITY_ADMIN_PASSWORD=admin` hardcoded; sets `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf`, which the node ignores (`logging.rs` always uses `.with_tonic()` gRPC — it only works because the endpoint is the gRPC port). No Grafana dashboards/datasources are provisioned.
- **Makefile** `docker-run-node`: mounts `-v node-db:/db` but never passes `--database-url`, so it runs `:memory:` and the volume is dead weight (adjacent to #112).

### Recommendation

Add a non-root `USER` and a HEALTHCHECK (bundle `grpc_health_probe`); add `restart: unless-stopped`; pin image tags; env-parameterize the Grafana password; remove the misleading protocol var; provision a starter dashboard; pass `--database-url /db/node.db` in the Makefile target.

Related: #112.

---
Part of #114.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Untersuche die Dockerfile in bin/node/docker/ und die docker-compose.yml. Verstehe, wie der Node-Service gebaut und ausgeführt wird, einschließlich des Health-Check-Mechanismus (grpc_health_probe). Überprüfe das Makefile-Target 'docker-run-node', um zu sehen, wie die Datenbank-URL gesetzt wird. Die Arbeit umfasst die Änderung von Docker-Konfigurationen, Umgebungsvariablen und möglicherweise die Bereitstellung für Grafana. Erfolg bedeutet, dass der Container ohne Root-Rechte läuft, einen Health Check hat, gepinnte Image-Tags verwendet und das Datenbank-Volume genutzt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, docker-compose, grafana, prometheus
Bereich
devops, infrastructure, observability
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.