What changed, and why it matters
This commit only changes internal hardware test scripts and CI workflow for Trezor devices. It disables a few tests that don't work on a new model (T3W1) and cleans up test setup code. There is no change to the actual firmware or wallet security code, and no security issue is present.
No security action needed. Treat as routine CI/test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies CI hardware test configuration and helper scripts. It excludes certain pytest tests (device authentication, Evolu, telemetry) from the T3W1 hardware test run, skips trezorctl get-features on T3W1 because THP causes it to hang, and refactors bootstrap.py/core.py/legacy.py to remove an unused return value and use a model-name mapping. No firmware source code, cryptography, or protocol handling is changed.
Changed components
.github/workflows/core-hw.ymlci/hardware_tests/bootstrap.pyci/hardware_tests/device/core.pyci/hardware_tests/device/legacy.pyInspect captured patch +21 / −19
diff --git a/.github/workflows/core-hw.yml b/.github/workflows/core-hw.yml
index 68193796..182ddf82 100644
--- a/.github/workflows/core-hw.yml
+++ b/.github/workflows/core-hw.yml
@@ -40,10 +40,12 @@ jobs:
BOOTLOADER_DEVEL: ${{ matrix.model == 'T2T1' && '0' || '1' }}
# TODO: enable SD-related tests after fixing #4924
# Disable authenticity test since it requires DISABLE_OPTIGA=0
+ # Disable Evolu tests since they require Optiga
+ # Disable telemetry test, fails because there's no battery
# 5.5h pytest global timeout
TESTOPTS: >-
-m 'not sd_card'
- -k 'not test_authenticate_device'
+ -k 'not test_authenticate_device and not evolu and not test_telemetry'
--durations=50
--session-timeout 19800
TT_UHUB_PORT: all
@@ -63,8 +65,10 @@ jobs:
- run: nix-shell --arg hardwareTest true --run uhubctl
- run: nix-shell --run "uv run make -C core build_firmware"
- run: nix-shell --arg hardwareTest true --run "uv run python ci/hardware_tests/bootstrap.py ${{ matrix.model }} core/build-xtask/artifacts/latest/firmware.bin"
- - run: nix-shell --run "uv run trezorctl list"
- - run: nix-shell --run "uv run trezorctl get-features"
+ - run: |
+ nix-shell --run "uv run trezorctl list"
+ nix-shell --run "uv run trezorctl get-features"
+ if: matrix.model != 'T3W1' # gets stuck on models with THP
- run: |
nix-shell --arg hardwareTest true --run "./tools/read-device-log.sh /dev/ttyTREZOR &> trezor.log" &
nix-shell --run "uv run pytest -v --verbose-log-file pytest.log tests/device_tests $TESTOPTS"
diff --git a/ci/hardware_tests/bootstrap.py b/ci/hardware_tests/bootstrap.py
index 89bf81aa..51de21a1 100755
--- a/ci/hardware_tests/bootstrap.py
+++ b/ci/hardware_tests/bootstrap.py
@@ -18,21 +18,16 @@ def main(model: str, file: str = None):
tt = TrezorCore(hub_vendor=HUB_VENDOR, device_port=os.getenv("TT_UHUB_PORT"))
if model == "T1B1":
- # tt.power_off()
- path = t1.update_firmware(file)
- elif model == "T2T1":
- # t1.power_off()
- path = tt.update_firmware(file, "Trezor T")
- elif model in ("T2B1", "T3B1"):
- path = tt.update_firmware(file, "Safe 3")
- elif model == "T3T1":
- path = tt.update_firmware(file, "Safe 5")
- elif model == "T3W1":
- path = tt.update_firmware(file, "Safe 7")
+ t1.update_firmware(file)
else:
- raise ValueError("Unknown Trezor model.")
-
- print(path)
+ model_name = {
+ "T2T1": "Trezor T",
+ "T2B1": "Safe 3",
+ "T3B1": "Safe 3",
+ "T3T1": "Safe 5",
+ "T3W1": "Safe 7",
+ }[model]
+ tt.update_firmware(file, model_name)
if __name__ == "__main__":
diff --git a/ci/hardware_tests/device/core.py b/ci/hardware_tests/device/core.py
index e7ce5515..1998abec 100644
--- a/ci/hardware_tests/device/core.py
+++ b/ci/hardware_tests/device/core.py
@@ -27,4 +27,7 @@ class TrezorCore(Device):
# after firmware-update finishes wait for reboot
self.wait(15)
- return self.check_model(model_name)
+
+ # THP gets stuck on get-features
+ if model_name != "Safe 7":
+ print(self.check_model(model_name))
diff --git a/ci/hardware_tests/device/legacy.py b/ci/hardware_tests/device/legacy.py
index b90bb49d..83df789d 100644
--- a/ci/hardware_tests/device/legacy.py
+++ b/ci/hardware_tests/device/legacy.py
@@ -42,7 +42,7 @@ class TrezorOne(Device):
self.wait(5)
self.touch("right", "click")
self.wait(15)
- return self.check_model("Trezor 1")
+ print(self.check_model("Trezor 1"))
def _enter_bootloader(self):
self.power_off()
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.