Skip to content

security: establish offline signer architecture and open source governance - #1

Merged
neomaike merged 74 commits into
mainfrom
audit/cold-wallet-security-architecture-20260907
Sep 8, 2026
Merged

neomaike merged 74 commits into
mainfrom
audit/cold-wallet-security-architecture-20260907

Conversation

@neomaike

@neomaike neomaike commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

MERGED EXPERIMENTAL CHECKPOINT — NO-GO FOR REAL FUNDS

This PR promoted the audited separation between a watch-only coordinator,
offline signer, versioned artifact transport, and idempotent broadcaster. It is
an architecture preview, not a production-ready cold wallet.

Delivered

  • Physical import boundary between Dashboard/coordinator and signing code.
  • Offline Ethereum type-2 signing with proposal-bound confirmation.
  • Bitcoin PSBT v0 / P2WPKH review; signing remains fail-closed pending backend
    approval.
  • Versioned atomic artifacts, authenticated synthetic storage/backup tests,
    persistent broadcast state, and Tor-only adapter policy in migrated paths.
  • Removal of unsafe legacy entrypoints and runtime installers/downloaders.
  • MIT license, SECURITY.md, Contributor Covenant, contribution/support policy,
    changelog, CODEOWNERS, templates, Dependabot, and non-deploy CI.

Verification

  • Final PR head: 71e00525b4194ff1a9dd12bfe9a9593f43e4976e.
  • Squash commit on main: 12ed2fa968d341fcbd12601ff156de884ca3a101.
  • Local hash-locked suite: 84/84, zero skips/failures/errors.
  • PR CI and main CI: passed for the exact promoted content.
  • Gitleaks 8.30.1: current tree and 72 branch commits, zero unsuppressed
    findings.
  • audit_output/57-c9-checksums.txt: passed.
  • No deploy, wallet, real key, fund, mainnet, broadcast, Tor, Helios, Bitcoin
    Core, or Docker was used.

Residual risk

Windows-native behavior, real Tor routing, Helios attestation, Bitcoin Core
regtest interoperability, secp256k1 backend provenance/review, and a physical
air gap remain unverified. The product remains NO-GO FOR REAL FUNDS.

Rollback

Use a reviewed revert PR against main; never rewrite history or restore unsafe
legacy entrypoints.

Completed merge gate

  • Local 84/84 hash-locked suite passed.
  • Checksum manifest and secret scan passed.
  • Full diff reviewed and worktree clean.
  • Remote CI passed on the final PR head.
  • Main protection was installed before merge.
  • PR left draft only after all gates passed.
  • Main CI passed after squash merge.
  • No deployment occurred.

Signed-off-by: MaikeH <neomaike@gmail.com>
Signed-off-by: MaikeH <neomaike@gmail.com>
Signed-off-by: MaikeH <neomaike@gmail.com>
Signed-off-by: MaikeH <neomaike@gmail.com>
Signed-off-by: MaikeH <neomaike@gmail.com>
Signed-off-by: MaikeH <neomaike@gmail.com>
@neomaike neomaike changed the title security: redesign cold wallets as offline signer architecture security: establish offline signer architecture and open source governance Sep 8, 2026
@neomaike
neomaike marked this pull request as ready for review September 8, 2026 05:22
@neomaike
neomaike merged commit 12ed2fa into main Sep 8, 2026
2 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T05:30:55.062612Z 71e0052 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@neomaike
neomaike deleted the audit/cold-wallet-security-architecture-20260907 branch September 8, 2026 05:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/MHX-Digital/cold-wallets/blob/71e00525b4194ff1a9dd12bfe9a9593f43e4976e/start/start.bat#L32
P1 Badge Run the dashboard with the repository root on the import path

When start.bat is used as documented with an ordinary isolated virtualenv, executing dashboard\server.py makes dashboard/—not the repository root—sys.path[0]. Because the project is not installed as a package and the launcher does not set PYTHONPATH, the first from coordinator.service ... import raises ModuleNotFoundError, so the primary launcher exits before binding its port. Invoke the server as a module or otherwise add the repository root to the import path.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread broadcaster/store.py
Comment on lines +10 to +14
def bitcoin_txid(raw_hex: str) -> str:
try: raw=bytes.fromhex(raw_hex)
except ValueError as exc: raise BroadcastStateError("invalid transaction encoding") from exc
if not raw: raise BroadcastStateError("empty transaction")
return hashlib.sha256(hashlib.sha256(raw).digest()).digest()[::-1].hex()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Derive SegWit txids from witness-stripped serialization

For every supported native-P2WPKH signed transaction, raw_hex contains the SegWit marker, flag, and witness data, but a Bitcoin txid is the double-SHA256 of the witness-stripped serialization. Hashing the complete payload here instead produces the wtxid, so submit_bitcoin stores the wrong operation identity, will not match the ordinary txid returned by a node, and performs reconciliation lookups under the wrong hash.

Useful? React with 👍 / 👎.

Comment thread transport/tor_http.py
Comment on lines +38 to +39
except TimeoutError as exc: last=TorTimeoutError("Tor request timed out")
raise last or TorTransportError("Tor request failed closed")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Catch the timeout type raised by requests

When this adapter is backed by the requests.Session constructed in transport/requests_client.py, connect and read timeouts raise requests.exceptions.Timeout, which is not the built-in TimeoutError caught here. Consequently a real timeout escapes after the first request, the configured retry count is ignored, and callers receive an unnormalized requests exception rather than TorTimeoutError.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/ci.yml
shell: bash
run: |
set -euo pipefail
git diff --check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare committed changes in the whitespace check

In the checked integrity job, Actions has just produced a clean checkout, so the no-commit form git diff --check only examines uncommitted index/worktree differences and succeeds without inspecting the pushed commit or PR patch. This follows the git diff -h distinction between the worktree form and forms supplied commits; for example, the current target is clean under this command while git diff --check 87ff994^ 87ff994 reports whitespace errors. Compare the event's base and head commits so this gate can actually detect committed whitespace defects.

Useful? React with 👍 / 👎.

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