SFT-8696: remove the Security Check from onboarding
What changed, and why it matters
This commit removes the 'Security Check' step from the initial device setup (onboarding) for the Passport hardware wallet. To avoid breaking devices that were mid-setup during a firmware update, the old step is kept as a harmless pass-through rather than being deleted entirely. There is no indication this change fixes a security vulnerability; it is a user-experience and compatibility change.
No security action required. Treat as a normal product/UX change. If reviewing for security, confirm that the removed Security Check step was not a critical anti-tamper or supply-chain verification control, and that its removal was an intentional product decision rather than a bypass.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The Security Check (ScvFlow) is removed from both Envoy and manual onboarding flows. The scv_flow/show_scv methods are replaced with pass-through logic that routes forward to set_initial_pin or backward to the previous step based on common.page_transition_dir. A new unit test verifies that saved onboarding progress from older firmware referencing the removed Security Check step restores correctly and navigates around the missing step. The actual Security Check flow code is not shown being removed in this diff, only its invocation during onboarding.
Changed components
ports/stm32/boards/Passport/modules/flows/envoy_setup_flow.pyports/stm32/boards/Passport/modules/flows/manual_setup_flow.pyports/stm32/boards/Passport/modules/tests/test_unit.pyports/stm32/boards/Passport/modules/tests/unit/onboarding_saved_progress.pyInspect captured patch +153 / −12
### ports/stm32/boards/Passport/modules/flows/envoy_setup_flow.py
@@ -4,14 +4,15 @@
# envoy_setup_flow.py - The main overall flow for Envoy setup - controls the process
import lvgl as lv
+from animations.constants import TRANSITION_DIR_POP
from flows import (
Flow,
ConnectWalletFlow,
SetInitialPINFlow,
UpdateFirmwareFlow,
InitialSeedSetupFlow,
- ScvFlow,
)
+import common
import microns
@@ -39,15 +40,15 @@ async def show_envoy_app_url(self):
if not result:
self.set_result(False)
else:
- self.goto(self.scv_flow)
+ self.goto(self.set_initial_pin)
+ # The Security Check is no longer part of onboarding, but progress saved by older firmware
+ # can still include this stage. Pass through it in the direction it was entered.
async def scv_flow(self):
- result = await ScvFlow(envoy=True).run()
- if result is None or not result:
- # self.set_result(None, forget_state=True)
+ if common.page_transition_dir == TRANSITION_DIR_POP:
self.back()
- elif result:
- self.goto(self.set_initial_pin)
+ else:
+ self.goto(self.set_initial_pin, save_curr=False)
async def set_initial_pin(self):
result = await SetInitialPINFlow().run()
### ports/stm32/boards/Passport/modules/flows/manual_setup_flow.py
@@ -4,13 +4,14 @@
# manual_setup_flow.py - The main overall flow for manual setup - controls the process
import lvgl as lv
+from animations.constants import TRANSITION_DIR_POP
from flows import (
Flow,
SetInitialPINFlow,
UpdateFirmwareFlow,
InitialSeedSetupFlow,
- ScvFlow,
)
+import common
class ManualSetupFlow(Flow):
@@ -47,14 +48,15 @@ async def show_terms_of_use_flow(self):
if not result:
self.back()
else:
- self.goto(self.show_scv)
+ self.goto(self.set_initial_pin)
+ # The Security Check is no longer part of onboarding, but progress saved by older firmware
+ # can still include this stage. Pass through it in the direction it was entered.
async def show_scv(self):
- result = await ScvFlow(envoy=False).run()
- if not result:
+ if common.page_transition_dir == TRANSITION_DIR_POP:
self.back()
else:
- self.goto(self.set_initial_pin)
+ self.goto(self.set_initial_pin, save_curr=False)
async def set_initial_pin(self):
result = await SetInitialPINFlow().run()
### ports/stm32/boards/Passport/modules/tests/test_unit.py
@@ -196,5 +196,9 @@ def test_scv_challenge(test):
assert test('scv_challenge.py') == b'OK'
+def test_onboarding_saved_progress(test):
+ assert test('onboarding_saved_progress.py') == b'OK'
+
+
def test_multisig_distinct_cosigners(test):
assert test('multisig_distinct_cosigners.py') == b'OK'
### ports/stm32/boards/Passport/modules/tests/unit/onboarding_saved_progress.py
@@ -0,0 +1,134 @@
+# SPDX-FileCopyrightText: 2026 Foundation Devices, Inc. <hello@foundation.xyz>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# Onboarding no longer runs the Security Check. Progress saved by older firmware can still name its stage,
+# and must restore instead of starting onboarding again.
+
+import uasyncio as asyncio
+
+import common
+import flows
+import pages
+from animations.constants import TRANSITION_DIR_POP, TRANSITION_DIR_PUSH
+from flows import EnvoySetupFlow, ManualSetupFlow
+
+
+class MemorySettings:
+ def __init__(self, values=None):
+ self.values = values or {}
+
+ def get(self, key, default=None):
+ return self.values.get(key, default)
+
+ def set(self, key, value):
+ self.values[key] = value
+
+ def remove(self, key):
+ self.values.pop(key, None)
+
+
+class MockSystem:
+ def get_software_info(self):
+ return ('v2.4.0', None, None, None, None)
+
+
+class MockPage:
+ def __init__(self, **kwargs):
+ pass
+
+ async def show(self):
+ return True
+
+
+class MockFlow:
+ def __init__(self, **kwargs):
+ pass
+
+ async def run(self):
+ return True
+
+
+def saved(state, prev_states, page_transition_dir=TRANSITION_DIR_PUSH):
+ return {'state': state, 'name': 'saved', 'prev_states': prev_states, 'page_transition_dir': page_transition_dir}
+
+
+def state_name(flow):
+ return flow.state.__name__
+
+
+def prev_state_names(flow):
+ return [state.__name__ for state in flow.prev_states]
+
+
+async def run_tests():
+ # New onboarding goes straight to the PIN.
+ common.settings = MemorySettings()
+ flow = EnvoySetupFlow()
+ await flow.show_envoy_app_url()
+ assert state_name(flow) == 'set_initial_pin'
+
+ common.settings = MemorySettings()
+ flow = ManualSetupFlow()
+ await flow.show_terms_of_use_flow()
+ assert state_name(flow) == 'set_initial_pin'
+
+ # Progress saved after the Security Check restores, and going back passes over its stage.
+ envoy_progress = saved('setup_seed', ['show_envoy_app_url', 'scv_flow', 'set_initial_pin', 'update_firmware'])
+ common.settings = MemorySettings({'envoy_setup': envoy_progress})
+ flow = EnvoySetupFlow()
+ assert state_name(flow) == 'setup_seed'
+ assert common.settings.get('envoy_setup') is not None
+ flow.back()
+ flow.back()
+ assert state_name(flow) == 'set_initial_pin'
+ flow.back()
+ await flow.state()
+ assert state_name(flow) == 'show_envoy_app_url'
+ assert flow.prev_states == []
+
+ manual_progress = saved('set_initial_pin',
+ ['show_intro', 'show_setup_guide_url', 'show_terms_of_use_flow', 'show_scv'])
+ common.settings = MemorySettings({'manual_setup': manual_progress})
+ flow = ManualSetupFlow()
+ assert state_name(flow) == 'set_initial_pin'
+ flow.back()
+ await flow.state()
+ assert state_name(flow) == 'show_terms_of_use_flow'
+ assert prev_state_names(flow) == ['show_intro', 'show_setup_guide_url']
+
+ # Progress saved during the Security Check continues to the PIN, and going back skips the stage.
+ common.settings = MemorySettings({'envoy_setup': saved('scv_flow', ['show_envoy_app_url'])})
+ flow = EnvoySetupFlow()
+ await flow.state()
+ assert state_name(flow) == 'set_initial_pin'
+ assert prev_state_names(flow) == ['show_envoy_app_url']
+
+ common.settings = MemorySettings({'manual_setup': saved(
+ 'show_scv', ['show_intro', 'show_setup_guide_url', 'show_terms_of_use_flow'])})
+ flow = ManualSetupFlow()
+ await flow.state()
+ assert state_name(flow) == 'set_initial_pin'
+ assert prev_state_names(flow) == ['show_intro', 'show_setup_guide_url', 'show_terms_of_use_flow']
+
+ # The saved direction decides which way to pass through.
+ common.settings = MemorySettings({'envoy_setup': saved('scv_flow', ['show_envoy_app_url'], TRANSITION_DIR_POP)})
+ flow = EnvoySetupFlow()
+ await flow.state()
+ assert state_name(flow) == 'show_envoy_app_url'
+
+
+original_settings = common.settings
+original_system = common.system
+original_show_qr_page = pages.ShowQRPage
+original_terms_of_use_flow = flows.TermsOfUseFlow
+common.system = MockSystem()
+pages.ShowQRPage = MockPage
+flows.TermsOfUseFlow = MockFlow
+try:
+ asyncio.run(run_tests())
+ return_value.write(b'OK')
+finally:
+ common.settings = original_settings
+ common.system = original_system
+ pages.ShowQRPage = original_show_qr_page
+ flows.TermsOfUseFlow = original_terms_of_use_flowWhy this scored 12/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.