AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

refactor(core/bootloader): drop the unreachable turn_on command list

Public commit record

What the developer wrote

Authored by tychovrahe

85/100 · Strong
refactor(core/bootloader): drop the unreachable turn_on command list

The command enumeration has been dead since ad3cb11056 ("start the device on
short press"). That commit widened the condition below it from
`manufacturing_mode && cmd != BOOT_COMMAND_POWER_OFF` to just the latter, which
subsumes the list entirely -- nothing the list selects can still change the
outcome.

The widening was deliberate. What the list was trying to express is already
covered: BOOT_COMMAND_POWER_OFF is set in exactly one place
(reboot_and_power_off), so it alone marks the state that has no reason to boot.
Every other command boots through -- and a boot with the button held still reaches
the press loop via the button_is_down check just
below, so long-press bootloader entry is unaffected.

Keeping the enumeration around only implies it still selects something, and any
command added to it is a silent no-op.

[no changelog]

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This is a code cleanup in the Trezor bootloader. It removes a list of commands that was no longer doing anything useful, because a simpler check already covered all cases. There is no security bug being fixed here; the change only makes the code easier to understand and prevents future mistakes where someone might add a command to the now-deleted list and expect it to matter.

Recommended action

No security action required. Treat as a normal code-quality refactor. Reviewers may optionally verify that no other code depends on the removed `turn_on` assignment behavior, though the diff and commit message make clear the logic is equivalent.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.