What changed, and why it matters
This is a minor cleanup commit ('nits'). It removes one outdated test assertion, adds some blank lines in test code, and simplifies a simulator-only default-setting line. There is no indication of any security fix or vulnerability being addressed.
No security action needed. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit makes trivial changes in two files: testing/test_hobble.py and unix/sim_boot.py. In test_hobble.py, an assertion that ‘Seed Vault’ should not appear in a menu is removed (likely because the expected behavior changed), and blank lines are added between branches of an if/elif chain. In unix/sim_boot.py, a two-line default fallback is collapsed into a single expression using dict(... or sim_defaults). The change is purely cosmetic/refactoring within the simulator’s fake NVRAM loading path and does not alter security-relevant behavior.
Changed components
unix/sim_boot.py (simulator boot / fake NVRAM defaults)testing/test_hobble.py (hobble-mode tests)Inspect captured patch +7 / −4
diff --git a/testing/test_hobble.py b/testing/test_hobble.py
index 63914af..3cba9fe 100644
--- a/testing/test_hobble.py
+++ b/testing/test_hobble.py
@@ -219,7 +219,6 @@ def test_h_seedvault(sv_empty, set_hobble, pick_menu_item, cap_menu, settings_se
# - Restore master should be offered.
m = cap_menu()
assert m[0] == f'[{xfp}]'
- assert 'Seed Vault' not in m # because we are in a tmp key, they need to go master
assert m[-1] == 'Restore Master'
pick_menu_item("Advanced/Tools")
@@ -273,11 +272,13 @@ def test_h_tempseeds(mode, set_hobble, pick_menu_item, cap_menu, settings_set, i
pick_menu_item(f"12 Words")
time.sleep(0.1)
word_menu_entry(words.split())
+
elif mode == 'qr':
pick_menu_item("Import from QR Scan")
val = ' '.join(words.split()).upper()
scan_a_qr(val)
time.sleep(0.2)
+
elif mode == 'tapsigner':
# like test_ephemeral_seed_import_tapsigner()
fname, backup_key_hex, node = tapsigner_encrypted_backup('sd', testnet=True)
@@ -320,6 +321,7 @@ def test_h_tempseeds(mode, set_hobble, pick_menu_item, cap_menu, settings_set, i
press_select()
return
+
elif mode == 'xprv':
fname = "ek.txt"
node = BIP32Node.from_master_secret(os.urandom(32), netcode="XTN")
@@ -336,6 +338,7 @@ def test_h_tempseeds(mode, set_hobble, pick_menu_item, cap_menu, settings_set, i
time.sleep(0.1)
pick_menu_item(fname)
+
elif mode == "b39pass":
from mnemonic import Mnemonic
go_to_passphrase()
@@ -354,8 +357,9 @@ def test_h_tempseeds(mode, set_hobble, pick_menu_item, cap_menu, settings_set, i
title, story = cap_story()
assert "store temporary seed into Seed Vault" not in story
time.sleep(.1)
+
else:
- raise pytest.fail(f'{mode} not done')
+ raise pytest.fail(mode)
if mode != "b39pass":
# different UX for passphrase - verified above
diff --git a/unix/sim_boot.py b/unix/sim_boot.py
index b731686..2a28e6c 100644
--- a/unix/sim_boot.py
+++ b/unix/sim_boot.py
@@ -33,8 +33,7 @@ if '--sflash' not in sys.argv:
NVSTORE_FAKE = {bytes(32): dict(sim_defaults)} # prelogin values
def _monkey_load(self, *a):
- self.current = dict(NVSTORE_FAKE.get(self.nvram_key, {}))
- self.current = self.current or sim_defaults
+ self.current = dict(NVSTORE_FAKE.get(self.nvram_key, False) or sim_defaults)
def _monkey_save(self, *a):
NVSTORE_FAKE[self.nvram_key] = dict(self.current)
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.