Skip to content

Commit 2acc77f

Browse files
committed
test(insight): activate clear-signing tests on 7.15.0 + expand report SECTIONS
The feature ships in the 7.15.0 firmware tree, so gate the device tests at 7.15.0 (was 7.15.1, which left them dormant on the current build). - test setUp: requires_firmware 7.15.1 -> 7.15.0. - generate-test-report.py SECTIONS 'V' (EVM Clear-Signing) min_firmware 7.15.1 -> 7.15.0; add V9-V12 mapping the new device-class tests (full tx-hash binding happy path, replay reject, AdvancedMode gate, cancel-clears-metadata) with OLED screenshot expectations so the report-driven Phase-1 capture includes them. Verified on the containerized kkemu emulator (docker compose, CI-faithful): all 28 clear-signing tests pass; OLED screenshots captured for the verified flow (INSIGHT VERIFIED icon + decoded method/contract/args), the replay reject, and the AdvancedMode gate.
1 parent bdfb2d1 commit 2acc77f

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

‎scripts/generate-test-report.py‎

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,14 +785,15 @@ def parse_junit(path):
785785
[])]),
786786

787787
# ===== 7.15.1 NEW FEATURES =====
788-
('V', 'EVM Clear-Signing', '7.15.1',
788+
('V', 'EVM Clear-Signing', '7.15.0',
789789
'NEW: Verified transaction metadata for EVM contracts. Host sends a signed blob with contract '
790790
'name, function, and decoded parameters. Device verifies blob signature against trusted key, '
791-
'then shows human-readable details with VERIFIED icon. Blind-sign policy gating ships with '
792-
'firmware 7.15.1+.',
791+
'then shows human-readable details with VERIFIED icon. The signature is bound to the full tx '
792+
'hash, and AdvancedMode is the single blind-sign gate (off = reject unknown contract data).',
793793
[
794794
'CLEAR-SIGN: Signed metadata -> verify signature -> VERIFIED icon + method + decoded args',
795-
'BLIND SIGN: No metadata + AdvancedMode on -> contract data signed after policy gate',
795+
'BINDING: metadata committed to tx A, signing tx B is refused at send_signature',
796+
'BLIND SIGN: No metadata + AdvancedMode off -> unknown contract data hard-rejected',
796797
],
797798
[
798799
('V1', 'test_msg_ethereum_clear_signing', 'test_valid_metadata_returns_verified',
@@ -817,7 +818,27 @@ def parse_junit(path):
817818
('V8', 'test_msg_ethereum_signtx', 'test_ethereum_blind_sign_allowed',
818819
'Blind sign permitted (AdvancedMode ON)',
819820
'Contract data with AdvancedMode enabled. Device allows signing. '
820-
'Blind-sign policy gating covered in 7.15.1+.',
821+
'Blind-sign policy gating covered in 7.15.0+.',
822+
[]),
823+
('V9', 'test_msg_ethereum_clear_signing', 'test_binding_happy_path_signs_and_recovers',
824+
'Full tx-hash binding (happy path)',
825+
'Metadata tx_hash = the real sighash of the EthereumSignTx. Device shows the verified '
826+
'decoded screens, signs, and the signature recovers to the device signer.',
827+
['VERIFIED icon + method', 'Decoded contract + args']),
828+
('V10', 'test_msg_ethereum_clear_signing', 'test_replay_rejected_when_digest_differs',
829+
'Replay reject (binding enforced)',
830+
'Metadata committed to tx A; signing tx B (same contract/selector/chain, different '
831+
'calldata) is refused at send_signature with "Metadata does not match signed transaction".',
832+
['Verified screen then reject']),
833+
('V11', 'test_msg_ethereum_clear_signing', 'test_advanced_mode_gate',
834+
'AdvancedMode blind-sign gate',
835+
'AdvancedMode OFF + unknown contract + no metadata is hard-rejected; ON signs; a '
836+
'natively-decoded ERC-20 transfer is unaffected.',
837+
['Blind sign disabled (Blocked)']),
838+
('V12', 'test_msg_ethereum_clear_signing', 'test_cancel_clears_metadata_not_reused',
839+
'Cancel clears metadata (no stale reuse)',
840+
'Cancelling the verified confirm clears the blob; a later matching tx is not silently '
841+
'signed with the stale metadata.',
821842
[]),
822843
]),
823844

‎tests/test_msg_ethereum_clear_signing.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ class TestEthereumClearSigning(common.KeepKeyTest):
504504

505505
def setUp(self):
506506
super().setUp()
507-
self.requires_firmware("7.15.1")
507+
self.requires_firmware("7.15.0")
508508
self.requires_message("EthereumTxMetadata")
509509
self.setup_mnemonic_nopin_nopassphrase()
510510

0 commit comments

Comments
 (0)