v0.2.7 — Security hot-fix
Security-focused release. Three independent hardenings on the wallet/keys path, plus a follow-up fix that keeps Jupiter Z (RFQ) and Ultra gasless flows working under the new verifier. Detailed notes in CHANGELOG.md.
Highlights
- Verify Jupiter swap instructions before signing. New
wallet::sign_jupiter_swapdecodes the base64 transaction Jupiter returns and refuses to sign unless the on-chain instructions match the user's intent: input mint and amount, output mint, and that the wallet pubkey is among the signers. Compromised Jupiter API responses or MITM tampering on a custom RPC URL can no longer redirect funds to a third party. - Encryption-by-default.
rwa keys generateandrwa keys importnow writekey.age(passphrase-encrypted) by default. Pass--allow-plaintextto opt out (with stderr warning). Existingkey.jsonfiles remain readable;rwa keys showwarns when it sees one. - Passphrase strength. Minimum 12 characters; digits-only passphrases rejected (low-entropy scrypt bypass). One-time stderr warning when
RWA_PASSPHRASEis read from environment. - Gasless support. The verifier searches for the wallet pubkey across all signer slots, not just index 0. Jupiter Z (RFQ, market maker pays gas) and Ultra gasless (Jupiter pays gas) both keep working — the input-transfer authority check independently confirms the wallet authorized the actual debit, so security is preserved.
Tests
234 → 238 workspace-wide (190 on v0.2.6, +48 across security work). All paths through execute_with_retry (single buy/sell, basket buy/sell, close-all sequential/parallel) are guarded by the verifier.
Notes for users
- Scripts that relied on
rwa keys generatewriting plaintextkey.jsonneed--allow-plaintextor should migrate to encrypted keys. - The deprecated
--encryptflag still works (hidden, with deprecation note) for backward compatibility.
Known limitations (tracked for v0.3)
- ALT-resolved output ATAs use a soft static-keys check. Defense-in-depth via on-chain
simulateTransactionis documented inline and planned for v0.3. - Route-mode awareness (separate strict-AMM / lenient-RFQ verifier paths) is also v0.3.
What's Changed
- v0.2.7 — security hot-fix by @outputlayer in #3
Full Changelog: v0.2.6...v0.2.7