CLI subcommands do not implement --help: the flag is treated as a normal argument (and some commands then hit the network)
Report
- Target: XE CLI (
xebinary) shipped in https://github.com/xeprotocol/xe (cmd/xe) - Area: SDK / docs / web
- Claimed severity: Minor (650 XE ceiling) — CLI UX / misleading usage; one path performs a live API call
- Observed: 12 Nov 2026, 00:41–00:44 WIB (11 Nov 2026, 17:41–17:44 UTC)
- Network / binary: testnet-0005; built from official HEAD
89a542e(release: testnet-0005 quorum withhold fix),GOTOOLCHAIN=local, reported asxe local-research
Summary
Only the top-level invocation xe help / xe --help / xe -h prints usage. Every subcommand I tried, except verify-genesis, treats --help or -h as an ordinary argument:
xe wallet --help→unknown wallet command: --helpxe chat --help→unknown chat command: --helpxe send --help→usage: xe send <address> <amount> [--asset XUSD](and--helpnever reaches a help path)xe receive/faucet/mint/burn/lease --help→ skip help and start the command; without a wallet they fail withno wallet found at … — run: xe wallet createxe providers --helpandxe providers -h→ ignore the flag and call the live node, then print the provider listxe vm --help→error: VM not found for lease --help(the flag is used as a lease hash)xe ssh --help→ looks up a lease SSH keyxe directory --help→usage: xe directory register [--watch]xe sign-block --help→sign-block no longer takes a seed argument … rotate this seed and set XE_SEED instead(the help flag is classified as a positional seed)xe help wallet(and any otherxe help <command>) → prints the full top-level usage and ignores the command namexe verify-genesis --helpis the exception: it usesflag.NewFlagSetand prints flag help
The official docs say ./xe --help prints the command list, which is true, but a user who reasonably asks a subcommand for help either gets an error, a usage string that is not help, a warning to rotate a seed, or a live network request.
Steps to reproduce
Build the official CLI from github.com/xeprotocol/xe at 89a542e (or any current HEAD that still has the switch in cmd/xe/main.go with help handled only as a top-level command). No wallet is required.
./xe --help # works (usage on stderr; see also XE-7346)
./xe wallet --help # error: unknown wallet command: --help
./xe chat --help # error: unknown chat command: --help
./xe send --help # error: usage: xe send <address> <amount> [--asset XUSD]
./xe faucet --help # error: no wallet found … (command started)
./xe providers --help # prints the live provider list; exit 0
./xe providers -h # same live list
./xe vm --help # error: VM not found for lease --help
./xe sign-block --help # error: … rotate this seed and set XE_SEED instead
./xe help wallet # full top-level usage, not wallet help
./xe verify-genesis --help # works
To confirm the providers path really hits the network, leave XE_NODE at its default (https://ldn.core.test.network) and compare the printed rows with GET /providers.
Evidence
Observed 12 Nov 2026 00:41–00:43 WIB against the binary built as above, default XE_NODE=https://ldn.core.test.network, no XE_WALLET and no seed file at ~/.xe/wallet.seed.
xe providers --help and xe providers -h both exited 0 and printed four providers (addresses truncated here as the CLI already truncates them):
[1] 26740934...6c56c06b
Total: 4 vCPU, 8192 MB, 50 GB
…
[4] f90fa879...2b289ccb
Total: 4 vCPU, 8192 MB, 50 GB
…
That listing matches a contemporaneous GET https://ldn.core.test.network/providers (four entries).
Source, cmd/xe/main.go: main() sets cmd := os.Args[1] and args := os.Args[2:], then switches on cmd. The help / --help / -h case is only taken when those tokens are os.Args[1]. Subcommands do not inspect args for a help flag before running. In particular:
case "providers":calls the list command with no flag check (line 90).case "vm":requires an argument and passesargs[0]through as the lease hash, so--helpbecomes a hash (line 106).case "sign-block":iflen(args) >= 1, fatals with the "rotate this seed" message (line 128), so--helpis treated as a seed.case "wallet":/ chat: a non-matching first arg isunknown … command: %s.case "send":iflen(args) < 2, fatals the usage string;--helpis a single argument, so this path fires.case "verify-genesis":delegates toflag.NewFlagSet("verify-genesis", …), which is why that command alone prints help.
Impact
- Users cannot get per-command help from the usual flag.
xe providers --helpandxe providers -hperform an unsolicited request to the configured node (the public London testnet node, by default).xe faucet --helpwould start a faucet request if a wallet file were present (not exercised here; without a wallet it already enterscmdFaucetfar enough to demand the seed file).xe sign-block --helptells the operator to rotate a seed they did not pass.xe vm --helpprobes the node for a lease named--help.
No funds, keys, or other users were involved. Severity is Minor: this is CLI usage handling, not a protocol break.
Suggested fix
Before dispatching each subcommand, honour --help / -h (or use a flag.FlagSet per command, as verify-genesis already does). xe help <command> should print that command's usage, not the top-level list. providers, faucet, vm, and sign-block must not run their live action when the only argument is a help flag.
Dedup
Checked all 1,290 public bounty tickets (GET /v1/tickets?kind=bounty&status=all, refreshed 12 Nov 2026 00:40 WIB). No public title covers subcommand --help being ignored, unknown wallet command: --help, providers --help hitting the node, or vm --help being used as a lease hash.
Nearby tickets that are not the same bug:
- XE-7346 — top-level
xe --help/xe helpwrite usage to stderr instead of stdout. That path works; this report is about subcommands never taking it. - XE-5984 — top-level help text says a positional
sign-blockseed "still works", but the binary rejects it. Related only in thatsign-block --helphits that same rejection path. - XE-5669 —
xe faucethelp text says XUSD; it is about the wording of the top-level usage line, not about--helpbeing ignored. - XE-7347 —
xe keygensilently ignores trailing arguments; a sibling of "flags not parsed", but not help handling. - XE-0086 —
xe senddefaults to XUSD; the usage string shown whensend --helpfails is a symptom of missing help, not the default-asset bug.
Caveat: only public tickets can be searched. A sealed private ticket could already cover this. Duplicates go to the first verifiable submission.
Method
Built the official CLI on the box and ran the help invocations above. xe providers --help was a single ordinary client listing (the same call xe providers makes). No wallet was created, no seed was printed, no funds were sent, no faucet grant was requested, no volume test.
Thread
Thanks. This is the same finding as https://bounty.xe.network/XE-1248, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-7492 and says what differs; it is read like any other.