test: update 7.14.2 presign authentication ordering - #219
Conversation
|
Exact-head evidence for
This PR still requires independent approval. After merge, firmware #458 must verify and repin the durable master commit and rerun its complete exact-head gate; the current firmware candidate is not signing authorization. |
Ready for reviewPython #219 at There are no known code or CI blockers. After approval and merge, firmware will repin the final commit and run the last CI and hardware check. |
5ee7378 to
36e052d
Compare
|
Native pseudo-address regressions are pushed at Python The new tests pin the exact Python and firmware exact-head CI are in progress. The previous 616-test/619-frame evidence and release firmware hash are superseded; final report, OLED, ARM hash, and parity claims remain pending the new firmware artifacts. No merge, tag, or signing was performed. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Python-based firmware test suite and CI plumbing for the KeepKey 7.14.2 presign-security changes, emphasizing offline/deterministic fixtures, strict network denial, and stronger OLED evidence capture/reporting.
Changes:
- Replace live transaction/network dependencies with an offline fixture manifest + enforcement (and CI verification).
- Add/extend 7.14.2 regression tests for display disclosure, refusal/terminal-state boundaries, and chain-ID/metadata isolation.
- Harden OLED capture and reporting so evidence is complete, deterministic, and fail-closed.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/zcash_rpc.py | Removes a live-node RPC helper (eliminates hardcoded network dependency). |
| tests/txcache/manifest.json | Adds authoritative fixture manifest describing all offline tx fixtures. |
| tests/txcache/insight_dash_tx_acb3b7f259429989fc9c51ae4a5e3e3eab0723dceb21577533ac7c4b4ba4db5d.json | Removes an unused tx fixture JSON. |
| tests/txcache/insight_bitcoin_tx_4a405a771b1c16af9059e01aa1de19ae1e143da6a5a8d130d1591875a93f9e0c.json | Removes an unused tx fixture JSON. |
| tests/tx_fixture_manifest.py | Introduces tooling to build/check the deterministic tx fixture manifest and reject network-capable test code. |
| tests/test_verify_typed_data.py | Makes JSON fixture loading cwd-independent (but should also specify encoding). |
| tests/test_tx_fixture_integrity.py | Adds tests to prove fixture integrity and that missing fixtures never fall back to HTTP. |
| tests/test_sign_typed_data.py | Makes JSON fixture loading cwd-independent (but should also specify encoding). |
| tests/test_protection_levels.py | Gates expected response ordering on semantic firmware version (7.14.2 auth ordering). |
| tests/test_network_policy.py | Adds explicit tests asserting non-emulator transports/HTTP are denied. |
| tests/test_msg_ton_display_disclosure.py | Adds TON display-disclosure regression tests. |
| tests/test_msg_solana_signtx.py | Updates Solana signing tests for 7.14.2 policy/disclosure behaviors. |
| tests/test_msg_solana_instruction_disclosure.py | Adds adversarial Solana instruction disclosure A/B controls. |
| tests/test_msg_solana_display_disclosure.py | Adds Solana message/memo display-disclosure regression tests. |
| tests/test_msg_signtx_ethereum_erc20.py | Adds 7.14.2 refusal expectations for unlimited approvals. |
| tests/test_msg_signing_boundaries.py | Adds terminal-state/bounds tests for signing stream correctness. |
| tests/test_msg_ripple_get_address.py | Adds a “show address” OLED retention case. |
| tests/test_msg_resetdevice.py | Improves OLED capture correctness for reset ceremony pages and adds 18/24-word cases. |
| tests/test_msg_recoverydevice_cipher.py | Adds OLED capture timing improvements and a terminal-failure recovery boundary test. |
| tests/test_msg_ping.py | Adds a cancellation-terminal boundary regression test. |
| tests/test_msg_osmosis_validation.py | Adds input validation refusal tests for missing/empty Osmosis fields. |
| tests/test_msg_ethereum_signtx.py | Adds chain-ID isolation and “unrenderable amount” refusal tests; strengthens blind-sign policy assertions. |
| tests/test_msg_ethereum_signtx_xfer.py | Adds transfer/asset binding and chain-ID width binding tests. |
| tests/test_msg_ethereum_getaddress.py | Adds a “show address” OLED retention case. |
| tests/test_msg_ethereum_erc20_approve.py | Adds 7.14.2 refusal expectations for unlimited approvals. |
| tests/test_msg_ethereum_data_disclosure.py | Adds calldata hash tail A/B tests ensuring streamed bytes are bound to OLED review. |
| tests/test_msg_display_disclosure.py | Strengthens ScreenRecorder capture correctness + groups/manifesting for OLED evidence. |
| tests/test_msg_confirm_data_disclosure.py | Adds confirm_data disclosure A/B tests across BTC/EOS/Omni paths. |
| tests/test_msg_changepin.py | Adds explicit OLED capture calls around PIN-change flows. |
| tests/conftest.py | Implements screenshot selection, skipped-evidence cleanup, and deny-external-network autouse fixture + manifest checks. |
| tests/common.py | Configures offline fixtures, adds screenshot reset helper, and introduces semantic firmware version helpers. |
| scripts/generate-test-report.py | Improves JUnit accounting, screenshot evidence inclusion, and metadata plumbing for release reports. |
| keepkeylib/tx_api.py | Adds offline-only fixture mode and fail-closed errors when fixtures are missing/malformed. |
| keepkeylib/client.py | Makes OLED capture fail-closed, adds settled/animated capture helpers, and improves ButtonRequest evidence timing. |
| .github/workflows/ci.yml | Adds fixture manifest verification and network egress gating during pytest. |
| .circleci/standalone-emulator-tests.sh | Adds a standalone emulator test runner script for CircleCI lane separation. |
| .circleci/config.yml | Uses the standalone emulator test runner and clarifies evidence separation from firmware CI. |
Suppressed comments (1)
tests/test_msg_solana_signtx.py:295
- These negative-path assertions currently accept any CallException, which can hide unrelated transport/timeout errors. Assert at least a stable substring in the error to ensure the refusal reason is the policy/opacity gate being tested.
with pytest.raises(CallException):
self.client.call(messages.SolanaSignTx(
address_n=parse_path("m/44'/501'/0'/0'"), raw_tx=raw_tx))
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/common.py:57
- reset_screenshot_capture() only deletes top-level btn*.png/frames.json, but leaves any screenshot_group subdirectories (and their PNGs/frames.json) intact. Re-running screenshot tests in a non-clean workspace can therefore retain stale OLED evidence or trigger spurious manifest mismatches in later phases. Consider clearing the entire per-test directory contents (including subdirectories) before resetting screenshot_id.
os.makedirs(screenshot_dir, exist_ok=True)
for name in os.listdir(screenshot_dir):
if (name.startswith('btn') and name.endswith('.png') and
len(name) == len('btn00000.png')) or name == 'frames.json':
os.unlink(os.path.join(screenshot_dir, name))
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
7.14.2 release tests
Current exact head:
36bc792368800aa6e976e5333bd43654522fa2e3.This PR:
OutputAddressType_TRANSFERreview;Unknown token valueOLED frame for chain-257 transfer, approve, andOutputAddressType_TRANSFERcalls to0xeeee..eeee;Exact-head verification in progress
0a5c21729c37a40af16492085e4537aa94ffdd3e.The previous 616-test/619-frame evidence and firmware hash belong to superseded heads.
After exact-head evidence is reconciled and this PR receives independent approval, merge it, verify the durable master tree, repin firmware #458, and rerun final firmware CI before hardware/storage checks or signing. No merge, tag, or signing is authorized by this evidence.