ci: hw: check-usb-permissions: add lspci output
What changed, and why it matters
This commit adds extra diagnostic commands to a hardware CI test script. It collects more information about USB ports and PCI devices when a Trezor hardware test fails, to help engineers debug permission or connectivity issues. There is no change to the firmware, wallet logic, cryptography, or any user-facing security behavior.
No security action required. Treat as a normal CI/debugging improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends core/tools/check-usb-permissions.py, a CI debugging helper, to print per-port connect_type/physical_location data and the output of lspci -v. It also adds pciutils to the Nix development shell so lspci is available. The script already ran lsusb, uhubctl version checks, and ldd. The additions are purely informational for troubleshooting CI hardware test environments.
Changed components
core/tools/check-usb-permissions.pyflake.nixInspect captured patch +3 / −0
### core/tools/check-usb-permissions.py
@@ -27,6 +27,8 @@ def cmd(command: str) -> None:
cmd(
'for F in `find /sys/bus/usb/devices/usb*/ -name disable | sort -V`; do echo -n "$F "; cat $F; done'
)
+cmd('for P in /sys/bus/usb/devices/usb*/*/usb*-port*; do printf \'%-32s %-10s %s\\n\' "${P##*/}" "$(cat $P/connect_type)" "$(cat $P/physical_location/panel 2>/dev/null)"; done')
+cmd("lspci -v")
cmd("lsusb --tree -v")
cmd("uhubctl --version")
cmd("ldd `which uhubctl`")
### flake.nix
@@ -166,6 +166,7 @@
# CI hardware tests:
strace
usbutils
+ pciutils
];
env = rec {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.