Skip to content

Log rotation on all services + pin base images by digest (#123, #135)#147

Merged
VijitSingh97 merged 2 commits into
mainfrom
claude/hardening-quickwins
Jun 4, 2026
Merged

Log rotation on all services + pin base images by digest (#123, #135)#147
VijitSingh97 merged 2 commits into
mainfrom
claude/hardening-quickwins

Conversation

@VijitSingh97
Copy link
Copy Markdown
Collaborator

Two small launch-robustness wins from the v1.0 sweep.

#123 — log rotation on every service

caddy, docker-proxy, and docker-control were missing logging:, so they fell back to Docker's uncapped json-file default. The dashboard polls docker-proxy every 30s, so its access log grows continuously — a silent disk-fill risk on a long-running unattended host. This applies the shared *default-logging anchor (10 MB × 3) to all three; now every service is capped.

#135 — pin base/runtime images by digest

Every externally-pulled image is now pinned by its immutable multi-arch @sha256 index digest instead of a mutable tag, so a re-pushed tag or a registry MITM can't silently swap the running image (most important for the two privileged socket proxies + Caddy):

Image Where
caddy:2.11 docker-compose.yml
tecnativa/docker-socket-proxy:v0.4.2 (×2) docker-compose.yml
quay.io/tarilabs/minotari_node:v5.3.1-mainnet docker-compose.yml
ubuntu:24.04 (×3) build/{monero,p2pool,xmrig-proxy}
python:3.11-slim build/dashboard
alpine:latest build/tor (digest pins it; a versioned tag is a noted follow-up)

This makes SECURITY.md's "version-pinned" posture hold for images too. Digests fetched registry-direct via docker buildx imagetools inspect (the multi-arch index digest, so all platforms resolve correctly).

Tests

test_compose.sh now asserts log rotation is present on every service and that the three external images carry an @sha256 digest — so an accidental unpin or a missing logging: fails CI. make test green locally: shellcheck clean, docker compose config valid, all assertions pass.

Note — #134 not included

The batch was originally going to also drop xmrig-proxy's --http-no-restricted, but that flag is load-bearing: the XvB switching engine repoints the proxy's pools via PUT /1/config (algo_service.switch_minersupdate_config), which the flag enables. Dropping it would break hashrate switching, so #134 is being closed as invalid instead.

Closes #123. Closes #135.

🤖 Generated with Claude Code

VijitSingh97 and others added 2 commits June 4, 2026 08:13
#123: caddy, docker-proxy, and docker-control were missing `logging:`, so they used
Docker's uncapped json-file default — their logs could grow without bound and fill
the disk on a long-running host. Apply the shared 10 MB × 3 cap to all three.

#135: pin every externally-pulled image by immutable @sha256 digest — caddy:2.11,
tecnativa/docker-socket-proxy:v0.4.2 (×2), the Tari node, and the ubuntu:24.04 /
python:3.11-slim / alpine build bases — so a re-pushed tag or registry MITM can't
silently change the running image. Digests are the multi-arch index digests.

Locked in with test_compose.sh assertions (log rotation on every service; the three
external images carry an @sha256 digest). CHANGELOG updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@VijitSingh97 VijitSingh97 merged commit 7aee721 into main Jun 4, 2026
5 checks passed
@VijitSingh97 VijitSingh97 deleted the claude/hardening-quickwins branch June 4, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant