What changed, and why it matters
This commit is a test-infrastructure change only. It adds a way for automated tests to read the account name shown on a FIDO security-key confirmation screen, and renames some existing test helper methods from 'tt_' to 'bolt_' to better match the current product naming. There is no change to how user data is handled, no fix for a bug, and no security-related behavior change.
No security action required; this is a normal test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff extends the Rust trace implementation for the Bolt layout’s FidoConfirm component to expose ‘account_name’ via the debug/trace interface. It also renames debuglink helper methods in python/src/trezorlib/debuglink.py (tt_check_seed_button_contents -> bolt_check_seed_button_contents, tt_pin_digits_order -> bolt_pin_digits_order) and adds bolt_fido_confirm_account(). Corresponding call sites in tests/click_tests/reset.py and tests/click_tests/test_pin.py are updated. All changes are confined to test/debug introspection code; no firmware security logic is modified.
Changed components
core/embed/rust/src/ui/layout_bolt/component/fido.rspython/src/trezorlib/debuglink.pytests/click_tests/reset.pytests/click_tests/test_pin.pyInspect captured patch +14 / −7
diff --git a/core/embed/rust/src/ui/layout_bolt/component/fido.rs b/core/embed/rust/src/ui/layout_bolt/component/fido.rs
index ef3974c0..cf2100a7 100644
--- a/core/embed/rust/src/ui/layout_bolt/component/fido.rs
+++ b/core/embed/rust/src/ui/layout_bolt/component/fido.rs
@@ -208,5 +208,6 @@ where
{
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
t.component("FidoConfirm");
+ t.string("account_name", *self.account_name.content());
}
}
diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py
index 81454713..62439122 100644
--- a/python/src/trezorlib/debuglink.py
+++ b/python/src/trezorlib/debuglink.py
@@ -307,7 +307,7 @@ class LayoutContent(UnstructuredJSONReader):
"""Getting raw paragraphs as sent from Rust."""
return self.find_unique_value_by_key("paragraphs", default=None, only_type=list)
- def tt_check_seed_button_contents(self) -> list[str]:
+ def bolt_check_seed_button_contents(self) -> list[str]:
"""Getting list of button contents."""
buttons: list[str] = []
button_objects = self.find_objects_with_key_and_value("component", "Button")
@@ -318,6 +318,12 @@ class LayoutContent(UnstructuredJSONReader):
buttons.append(button["text"])
return buttons
+ def bolt_fido_confirm_account(self) -> str | None:
+ """Getting the current account name for FIDO on Bolt."""
+ fido_confirm = self.find_unique_object_with_key_and_value("component", "FidoConfirm")
+ if fido_confirm:
+ return fido_confirm["account_name"]
+
def button_contents(self) -> list[str]:
"""Getting list of button contents."""
@@ -424,7 +430,7 @@ class LayoutContent(UnstructuredJSONReader):
"""Get current page index of the layout."""
return self.find_unique_value_by_key("active_page", default=0, only_type=int)
- def tt_pin_digits_order(self) -> str:
+ def bolt_pin_digits_order(self) -> str:
"""In what order the PIN buttons are shown on the screen. Only for TT."""
return self.top_level_value("digits_order") or "no digits order"
diff --git a/tests/click_tests/reset.py b/tests/click_tests/reset.py
index 114f9788..4f3b139e 100644
--- a/tests/click_tests/reset.py
+++ b/tests/click_tests/reset.py
@@ -190,7 +190,7 @@ def confirm_words(debug: "DebugLink", words: list[str], skip_intro=False) -> Non
word_pos = int(word_pos_match.group(0))
# Unifying both the buttons and words to lowercase
btn_texts = [
- text.lower() for text in layout.tt_check_seed_button_contents()
+ text.lower() for text in layout.bolt_check_seed_button_contents()
]
wanted_word = words[word_pos - 1].lower()
button_pos = btn_texts.index(wanted_word)
@@ -225,7 +225,7 @@ def confirm_words(debug: "DebugLink", words: list[str], skip_intro=False) -> Non
word_pos = int(word_pos_match.group(0))
# Unifying both the buttons and words to lowercase
btn_texts = [
- text.lower() for text in layout.tt_check_seed_button_contents()
+ text.lower() for text in layout.bolt_check_seed_button_contents()
]
wanted_word = words[word_pos - 1].lower()
button_pos = btn_texts.index(wanted_word)
@@ -249,7 +249,7 @@ def confirm_words(debug: "DebugLink", words: list[str], skip_intro=False) -> Non
word_pos = int(word_pos_match.group(0))
# Unifying both the buttons and words to lowercase
btn_texts = [
- text.lower() for text in layout.tt_check_seed_button_contents()
+ text.lower() for text in layout.bolt_check_seed_button_contents()
]
wanted_word = words[word_pos - 1].lower()
button_pos = btn_texts.index(wanted_word)
diff --git a/tests/click_tests/test_pin.py b/tests/click_tests/test_pin.py
index b1afa4f1..2e4ea03b 100644
--- a/tests/click_tests/test_pin.py
+++ b/tests/click_tests/test_pin.py
@@ -176,7 +176,7 @@ def _input_code(debug: "DebugLink", pin: str, check: bool = False) -> None:
"""Input the PIN or Wipe code"""
before = debug.read_layout().pin()
if debug.layout_type in (LayoutType.Bolt, LayoutType.Delizia, LayoutType.Eckhart):
- digits_order = debug.read_layout().tt_pin_digits_order()
+ digits_order = debug.read_layout().bolt_pin_digits_order()
for idx, digit in enumerate(pin):
digit_index = digits_order.index(digit)
coords = debug.screen_buttons.pin_passphrase_index(digit_index)
@@ -459,7 +459,7 @@ def test_long_press_digit(device_handler: "BackgroundDeviceHandler"):
_input_code(debug, PIN4[:-1])
# Prepare last digit for long press
- digits_order = debug.read_layout().tt_pin_digits_order()
+ digits_order = debug.read_layout().bolt_pin_digits_order()
digit_index = digits_order.index(PIN4[-1])
pos = debug.screen_buttons.pin_passphrase_index(digit_index)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.