Skip to content

Monero payout view key reaches wallet-rpc as a container environment value #4198

Open

Description

@pithead-developer

What's the problem

The Monero payout view key reaches the view-only wallet-rpc container as an environment value: MONERO_VIEW_KEY=${MONERO_VIEW_KEY} in the Compose wallet-rpc service, and Environment=... MONERO_VIEW_KEY=... in the rendered Quadlet unit (lib/pithead/36-quadlet-units.sh). Environment values are readable through docker inspect, podman inspect and systemctl show. The Tari wallet already avoids this: its view key is delivered in an owner-only file through the Compose secrets: entry tari_wallet_secret.

What it impacts

Every stack with monero.view_key set, whether the node is local or remote. Anyone who can inspect containers or read unit environments can read the view key. The key reveals every incoming payout amount and time for the payout address, but it cannot spend funds.

How I found it

Review of PR #3969 (#2866). The #2866 acceptance criterion "the view key never appears in container or unit environment dumps" is unmet for Monero. The PR keeps the existing local-node delivery and discloses it as a shortcut. The behavior predates #2866 (#381).

How important is it

Medium. This is a privacy leak of payout history on the host, not a loss of funds. It is a stated acceptance criterion, and the Tari path already meets it.

Acceptance criteria

  • With monero.view_key set, docker inspect wallet-rpc and the rendered Quadlet unit's environment contain no view-key value.
  • The wallet still creates its view-only wallet and confirms payouts, for both a local and a remote node (existing test-monero-wallet-scan.sh, test-render-quadlet.sh and the local-pruned-main-payout-confirm tier4-e2e scenario stay green).
  • A tier-1 test fails if the view key reappears in the Compose or Quadlet environment.

Possible solutions

  • Mirror the Tari path: render the address and view key into an owner-only secret file, mount it read-only (Compose secrets:, Quadlet Secret= or a read-only bind mount), and have wallet-entrypoint.sh read it instead of the environment.

Release: PR pithead#4299 merged
Who: operator

Activity

  1. added
    security
    bug
    on Nov 20, 2026
  2. added this to the v2.0.5 milestone on Nov 20, 2026
  3. pithead-developer commented on Nov 20, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4301. The Monero view key now reaches wallet-rpc as an owner-only file secret, data/monero-view-key.secret, mounted read-only. The change is in draft PR #4299 (Closes #4198), and it is blocked on #4301 for the tier-4 proof. Compose and the Quadlet unit no longer carry the key in their environment. A tier-1 test in test-render-quadlet.sh fails if the key reappears there. The verifier and security reviewer ran, and their stale-consumer, redaction-list and comment findings are fixed. GitHub tiers 1 to 3 on head fc435cb are 42 pass and 2 skipped; the one red row is Build + scan the appliance rootfs, a fixable HIGH Trivy finding in the docker-compose binary. This diff does not touch it, and I did not check whether the base branch shows the same red. #4301, the backport of golang 1.26.11 and Compose v5.7.2, is open and should clear it. bench-submit holds the tier4-e2e targeted job (exit 75) until every check is green, so no bench job exists on this head. After #4301 lands: merge the base into the branch, confirm the rootfs check is green, then submit tier4-e2e with mode=targeted and --base develop-v2.0.5 and paste the bench-ci evidence block into the PR. I did not test a new Monero payout landing, the live-container check that docker inspect is clean, or uninstall removing the new file. The PR comment records the blocker.

    The runner resumes this issue when that one closes.

  4. added
    blocked
    on Nov 20, 2026
  5. removed
    blocked
    on Nov 21, 2026
  6. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4302. Job 4425 (lifecycle-only, recovered as 1038) was cancelled because the owner reserved the fleet for the 2.0.4 release gate. The cancellation says not to resubmit until pithead 2.0.4 is published and #4302 is closed, so I did not resubmit. Finished on PR #4299, head 3baad65: the change, tests, docs, verifier and security review, and GitHub CI (43 pass, 2 skipped). In the earlier targeted bench run the Monero payout rows passed. The only failed row there was the rig enriched feed, tracked in #2890, which this diff does not touch. Still unproven on bench are the wallet-fixture rows in the lifecycle phase, because that phase was skipped behind the #2890 failure. When #4302 closes, resubmit tier4-e2e with phases=lifecycle on the current head (merge the base first if it moved), paste the bench-ci evidence block into the PR body and finalize. I commented the same explanation on the PR.

    The runner resumes this issue when that one closes.

  7. added
    blocked
    on Nov 22, 2026
  8. removed
    blocked
    on Nov 27, 2026
  9. pithead-developer commented on Nov 27, 2026

    @pithead-developer
    ContributorAuthor

    Needs an operator action (do it, then remove the operator-action label):

    GitHub Actions is not starting jobs, so the tier-4 proof cannot be submitted. #4302 closed, so I merged develop-v2.0.5 into the branch cleanly and pushed head e2fbe65. All 42 checks on it have been queued since 16:28 UTC. Across the repo, 25 runs are queued and none is in progress, so the hosted runners look unavailable, which only a human can fix. bench-submit holds tier4 until every check is green, so no bench job exists on this head. Needed: restore or investigate the Actions runners. After that the checks run, and I submit tier4-e2e with phases=lifecycle on this head and paste its evidence. Still unproven on bench: the wallet-fixture rows in the lifecycle phase. Earlier evidence: the Monero payout rows passed, and the only failed row was the rig enriched feed (#2890), which this diff does not touch. I posted the same on the PR.

  10. added
    operator-action
    on Nov 27, 2026
  11. added
    operator-hold
    and removed
    operator-action
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugoperator-holdsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions