Skip to content

Add --wormhole-secret-prompt for pasting a raw wormhole secret - #165

Merged
illuzen merged 1 commit into
mainfrom
illuzen/airdrop-secret-prompt
Sep 22, 2026
Merged

illuzen merged 1 commit into
mainfrom
illuzen/airdrop-secret-prompt

Conversation

@illuzen

@illuzen illuzen commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Some users hold only the raw 32-byte wormhole secret — no mnemonic, seed, or secret file. airdrop check and airdrop claim now accept --wormhole-secret-prompt, which reads the secret pasted at a hidden terminal prompt (rpassword, same as password entry).

The secret intentionally stays off argv, keeping the #160103 policy: command-line values leak into shell history and process listings. A regression test asserts both airdrop commands reject any --wormhole-secret <value> form and that the bare flag parses. The pasted hex goes through parse_secret_hex (stack-buffer decode, no heap copies) and the input string is zeroized after parsing.

README documents the new flag for both commands. ./clippy.sh and the full airdrop suite pass.

Made with Cursor

Users who hold only the raw 32-byte wormhole secret (no mnemonic, seed, or
secret file) can paste it at a hidden rpassword prompt on airdrop check and
claim. Secrets stay off argv per #160103; a regression test asserts the
airdrop commands reject any command-line secret value and that the bare
flag parses. The pasted hex is parsed with the stack-buffer decoder and the
input string is zeroized.

Co-authored-by: Cursor <cursoragent@cursor.com>
@illuzen illuzen added the bot-review Request automated review from review-bot label Sep 22, 2026

@n13 n13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewer model: GPT 5.6 Sol

APPROVE — no blocking findings.

The new flag is wired through both airdrop check and airdrop claim; it reads from the terminal with echo disabled, reuses the fixed-buffer secret parser, wipes the pasted string after parsing, and keeps the parsed bytes in the existing self-zeroizing SpendSecret path. Raw secret values remain rejected on argv, and the README/help text matches the behavior.

Validation:

  • SKIP_CIRCUIT_BUILD=1 cargo test --locked cli::airdrop::tests — 25/25 passed in both library and binary targets.
  • cargo +nightly-2026-08-31 fmt --all -- --check, git diff --check, and locked Cargo metadata validation passed.
  • Live CLI smoke test accepted a dummy 32-byte secret through the hidden prompt without echoing it and proceeded to the expected network request.
  • All GitHub CI checks pass, including Linux/macOS build and test, clippy/docs, examples, format, security audit, and dependency cooldown.

No blocking findings.

@n13 n13 removed the bot-review Request automated review from review-bot label Sep 22, 2026
@illuzen
illuzen merged commit 2919684 into main Sep 22, 2026
9 checks passed
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.

2 participants