test_pincodes: drop obsolete mk3-only test_duress (uses removed fetch param)
What changed, and why it matters
This commit only removes an obsolete test from the test suite. The deleted test was for a duress PIN feature on the older Mk3 Coldcard and used a 'fetch' parameter that no longer exists. There is no change to firmware code that users run, so it cannot introduce a security vulnerability or fix one.
No security action needed; this is a routine test-suite cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes the test_duress function from testing/test_pincodes.py. The test exercised a Mk3-only duress PIN code path that relied on a pa.fetch() parameter that has since been removed from the API. No production code is modified, and no runtime behavior changes.
Changed components
testing/test_pincodes.pyInspect captured patch +0 / −16
### testing/test_pincodes.py
@@ -116,22 +116,6 @@ def test_greenlight(repl, setup_repl, is_mark4):
repl.exec("dis.clear(); dis.text(0,0, 'done'); dis.show()")
-def test_duress(repl, setup_repl, only_mk3):
- ss = repl.eval("pa.setup(b'')")
- assert ss&0xf == 3
-
- assert repl.eval('pa.private_state == 0') == False
- assert repl.eval('pa.has_duress_pin()') == False
- assert repl.eval('pa.is_successful()') == True
- assert repl.eval("pa.change(is_duress=True, new_pin=b'34-34', old_pin=b'')") == None
- assert repl.eval("pa.change(is_duress=True, new_secret=b'a'*72, old_pin=b'34-34')") == None
- assert repl.eval("pa.fetch(duress_pin=b'34-34')") == b'a'*72
- assert repl.eval("pa.change(is_duress=True, new_secret=bytes(72), old_pin=b'34-34', new_pin=b'')") == None
- assert repl.eval('pa.has_duress_pin()') == False
-
- # cleanup
- repl.eval("pa.setup(b'')")
-
MAX_ATT = 13
@pytest.mark.parametrize('nfails', [MAX_ATT-1, 1, 3, 5])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.