What the CLI Does (and Does Not) Enforce
The CLI is an execution engine, not a policy controller. It does not include:- Built-in Spend Caps or Allowlists: A key capable of signing a payment can sign for the account’s full balance to any address.
- Threat Scanning or 2FA: The CLI does not analyze contract safety, prompt for 2FA, or flag high-risk transactions.
- General Interactive Prompts: The
--auto-signflag only suppresses non-root Soroban sub-authorization prompts. Standard payments and token transfers never prompt for interactive confirmation.
Security Mechanisms
1. Dedicated Agent Keypairs (Account Isolation)
Isolate agent operations by generating a dedicated keypair loaded only with operational liquidity.2. Protocol Allowances (Onchain Spend Limits)
Keep primary treasury funds in a secure account and issue the agent account a capped, time-bound allowance usingstellar token approve. The Stellar network rejects any transaction exceeding this cap.
Error(Contract, #13).
3. Build-Only Handoffs (Human-in-the-Loop)
To separate transaction assembly from signing authority, use--build-only. This generates unsigned XDR payloads for manual review or air-gapped signing.
4. Native Multisig Thresholds
Assign the agent key a low weight on a primary treasury account. The agent can construct and propose transactions, but cannot execute operations above its threshold weight without additional signers.5. Sponsored Gas & Fee Bumping
Fund an agent account with zero XLM balance using sponsored reserves. To execute any operation, the agent must submit its transaction payload to a co-signer, who wraps it in a fee-bump operation. Refusing to fee-bump a transaction acts as an immediate execution kill switch.Key Storage Security
By default, CLI keys are saved unencrypted in~/.config/stellar/identity/<NAME>.toml. Production agent setups should use secure key storage options:
- OS Keyring (
--secure-store): Stores seed phrases in the system credential manager (macOS Keychain, Windows Credential Manager, or Linux Secret Service). - Hardware Wallets (
--ledger): Keeps signing keys on a physical device. Hardware confirmation acts as a physical approval gate before execution.