Add --wormhole-secret-prompt for pasting a raw wormhole secret - #165
Merged
Merged
Conversation
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>
n13
approved these changes
Sep 22, 2026
n13
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some users hold only the raw 32-byte wormhole secret — no mnemonic, seed, or secret file.
airdrop checkandairdrop claimnow 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 throughparse_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.shand the full airdrop suite pass.Made with Cursor