App Checks Improvements - #83
Open
chcmedeiros wants to merge 13 commits into
Open
Conversation
* Restrict amino SignDoc to a known field allowlist Validate that the SignDoc root and the StdFee object only contain keys from a known set, so every signed field is one the device can display. Drop the now-unused fee/gas_limit display mapping and add tx_validate tests covering the new behaviour. * chore(version): Bump application patch version to 19 * update snapshots * bump zxlib * fix(amino): resolve allowlist key pointers through PIC() validate_allowed_keys dereferenced the static allowed-key string pointers directly, which are link-time addresses on a relocated app and caused a SIGSEGV on every amino SignDoc. Wrap them in PIC().
Swap flows always transfer a single coin, and the Exchange app approves a single amount and fee. Make the swap validation checks enforce this explicitly: each amount, fee and coins item in a swap-validated message must be exactly one coin (a single display page) for the value comparison to cover it fully. Add a parser_swap_multiple_coins result for the multi-coin case. Single-coin transactions - the only form swap flows produce - are unaffected, so existing swap flows and functional tests keep working.
On the default Cosmos path a SIGN request may omit the HRP for backward compatibility. The address derivation then reused whatever HRP remained in the global buffer from an earlier request, so the result depended on prior state. Set the default "cosmos" HRP explicitly for this case so omitted-HRP signing on path 118 is self-contained and deterministic. Requests that provide an HRP, and the get-address flow, are unchanged. Add a zemu regression test: a rejected mixed-case GET_ADDR followed by an omitted-HRP SIGN now reaches review and produces a valid signature.
Refresh the main-menu zemu snapshots for the new version string (v2.38.20).
App improvements: swap validation, signing robustness, and dependency bump
Bumps app patch version to 21
|
@chcmedeiros guideline enforcer CI has not run |
…hers Derive the msgs flatten depth per message from each message's own type instead of one global flag for the whole array. Previously extraDepthLevel was set once based on whether any "Multi" type appeared, so a transaction mixing a MsgMultiSend with a MsgSend counted and rendered a different set of fields and some Send fields were dropped from the review screens. tx_traverse_find now sets query.max_level per element via tx_msg_max_level() (MsgMultiSend -> 3, all other messages -> 2) and restores it after each element, keeping item counting consistent with item rendering. Add a MsgMultiSendAndSend amino test with snapshots for all devices and a manual.json test case.
Refresh the *-mainmenu snapshots for the new version string.
fix(amino): render every message when MsgMultiSend is batched with others
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.
A few small improvements and maintenance updates to the Cosmos app: