Skip to content

Fix: Harden RPC bounds, monitoring credentials, and image fallbacks - #90

Open
mozluk wants to merge 5 commits into
inkonchain:mainfrom
mozluk:mozluk-patch-1
Open

Fix: Harden RPC bounds, monitoring credentials, and image fallbacks#90
mozluk wants to merge 5 commits into
inkonchain:mainfrom
mozluk:mozluk-patch-1

Conversation

@mozluk

@mozluk mozluk commented Aug 25, 2026

Copy link
Copy Markdown

Description

This PR addresses multiple high- and medium-severity findings identified during the workspace-wide security and reliability audit regarding overly permissive op-geth defaults, unsecured monitoring tools, and mutable sidecar fallback tags[cite: 53].

Key Changes

  • Safe RPC Limits & Loopback Enforcement (docker-compose.yml, scripts/start-op-geth.sh, .env.example):
    • Host-published endpoints for HTTP, WebSocket, Prometheus, Grafana, and InfluxDB are now strictly bound to 127.0.0.1 by default to minimize attack surface[cite: 53, 50, 53].
    • The permissive op-geth defaults have been tightened: the debug namespace is removed from the default HTTP API (now limited to eth,net,web3), and CORS/virtual host policies have restrictive defaults[cite: 53, 55]. These can only be broadened deliberately via .env variables[cite: 50, 55].
  • Monitoring Security & Credential Provisioning (docker-compose.yml, docker/grafana/provisioning/datasources/all.yml, .env.example):
    • InfluxDB HTTP authentication is now enabled[cite: 53, 53].
    • Separated administrative, write, and read accounts are now mandatory for InfluxDB[cite: 50, 53].
    • Grafana is securely provisioned to connect to InfluxDB using exclusively the least-privilege read account via environment variable expansion ($INFLUXDB_READ_USER), and the datasource is marked as non-editable[cite: 53, 54].
    • Removed legacy tracked environment files (envs/common/*.env) that included insecure defaults. The docker-compose.yml file now forces a fail-closed behavior, requiring the operator to provide non-empty credentials in .env before starting[cite: 53].
  • Immutable Sidecar Versions (docker-compose.yml, .env.example):
    • Removed the mutable latest fallback and floating version tags for monitoring sidecars[cite: 53].
    • Compose now requires explicitly reviewed, immutable image tags supplied through IMAGE_TAG__HEALTHCHECK, IMAGE_TAG__PROMETHEUS, IMAGE_TAG__GRAFANA, and IMAGE_TAG__INFLUXDB before the stack can boot[cite: 50, 53].

mozluk added 5 commits August 26, 2026 00:40
### Description
This PR addresses multiple high- and medium-severity findings identified during the workspace-wide security and reliability audit regarding overly permissive `op-geth` defaults, unsecured monitoring tools, and mutable sidecar fallback tags[cite: 53].

### Key Changes
* **Safe RPC Limits & Loopback Enforcement (`docker-compose.yml`, `scripts/start-op-geth.sh`, `.env.example`):** 
    * Host-published endpoints for HTTP, WebSocket, Prometheus, Grafana, and InfluxDB are now strictly bound to `127.0.0.1` by default to minimize attack surface[cite: 53, 50, 53]. 
    * The permissive `op-geth` defaults have been tightened: the `debug` namespace is removed from the default HTTP API (now limited to `eth,net,web3`), and CORS/virtual host policies have restrictive defaults[cite: 53, 55]. These can only be broadened deliberately via `.env` variables[cite: 50, 55].
* **Monitoring Security & Credential Provisioning (`docker-compose.yml`, `docker/grafana/provisioning/datasources/all.yml`, `.env.example`):**
    * InfluxDB HTTP authentication is now enabled[cite: 53, 53].
    * Separated administrative, write, and read accounts are now mandatory for InfluxDB[cite: 50, 53].
    * Grafana is securely provisioned to connect to InfluxDB using exclusively the least-privilege `read` account via environment variable expansion (`$INFLUXDB_READ_USER`), and the datasource is marked as non-editable[cite: 53, 54].
    * Removed legacy tracked environment files (`envs/common/*.env`) that included insecure defaults. The `docker-compose.yml` file now forces a fail-closed behavior, requiring the operator to provide non-empty credentials in `.env` before starting[cite: 53].
* **Immutable Sidecar Versions (`docker-compose.yml`, `.env.example`):** 
    * Removed the mutable `latest` fallback and floating version tags for monitoring sidecars[cite: 53]. 
    * Compose now requires explicitly reviewed, immutable image tags supplied through `IMAGE_TAG__HEALTHCHECK`, `IMAGE_TAG__PROMETHEUS`, `IMAGE_TAG__GRAFANA`, and `IMAGE_TAG__INFLUXDB` before the stack can boot[cite: 50, 53].
grafana,influxdb deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant