From 8b1f78c8ecd2863248368f6fc6da1e44d5ecdd12 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Wed, 18 Nov 2026 15:40:26 -0500 Subject: [PATCH] fix(docker): verify the Wownero release tarball before installing it The wallet-rpc image installed wownerod and wownero-wallet-rpc from the v0.11.3.0 Codeberg download without checking it. Pin the tarball's SHA-256 from the release's GPG-signed hash list (wowario's key) and refuse the build on a mismatch or on a version with no pinned hash. --- README.md | 2 +- docker/monero/Dockerfile | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfb294a..32b9c11 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The file and folder structure is kept identical to xmrcheckout to make upstream - `api/app/rates.py` — Nonlogs WOW-BTC + Kraken BTC/USD instead of Kraken XMR/USD - `api/app/subaddress_derivation.py` — Wownero network byte overrides (mainnet=53, subaddress=63, integrated=54) - `api/app/qr_codes.py` — `wownero:` URI scheme -- `docker/monero/Dockerfile` — Downloads Wownero binaries from Codeberg +- `docker/monero/Dockerfile` — Downloads Wownero binaries from Codeberg and checks their signed SHA-256 - `docker-compose.yml` — `wownero-wallet-rpc` commands, port 34568, Wownero daemon URL ## Deployment diff --git a/docker/monero/Dockerfile b/docker/monero/Dockerfile index fd3d8db..934cd88 100644 --- a/docker/monero/Dockerfile +++ b/docker/monero/Dockerfile @@ -6,9 +6,22 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl bzip2 \ && rm -rf /var/lib/apt/lists/* +# Each tarball's SHA-256 comes from the GPG-signed hash list in the Codeberg +# release notes (codeberg.org/wownero/wownero/releases), signed by wowario. +# Verify that signature against utils/gpg_keys/wowario.asc in wownero/wownero +# before adding a version. A version without an entry here refuses to build. RUN set -eux; \ + tarball="wownero-x86_64-linux-gnu-v${MONERO_VERSION}.tar.bz2"; \ + case "$tarball" in \ + wownero-x86_64-linux-gnu-v0.11.3.0.tar.bz2) \ + wownero_sha256="dddb23ca97575d5538a3a3b6a23e49706db15657e124c2300ea7972cb44a0387" ;; \ + *) \ + echo "No pinned SHA-256 for $tarball; add it to docker/monero/Dockerfile from the signed release hashes" >&2; \ + exit 1 ;; \ + esac; \ curl -fsSL -o /tmp/wownero.tar.bz2 \ - "https://codeberg.org/wownero/wownero/releases/download/v${MONERO_VERSION}/wownero-x86_64-linux-gnu-v${MONERO_VERSION}.tar.bz2"; \ + "https://codeberg.org/wownero/wownero/releases/download/v${MONERO_VERSION}/${tarball}"; \ + echo "${wownero_sha256} /tmp/wownero.tar.bz2" | sha256sum -c -; \ tar -xjf /tmp/wownero.tar.bz2 -C /tmp; \ cp /tmp/wownero-*/wownerod /usr/local/bin/; \ cp /tmp/wownero-*/wownero-wallet-rpc /usr/local/bin/; \