Expand malformed SeedQR test coverage
What changed, and why it matters
This commit only adds more test cases to an existing unit test file for SeedQR decoding. It does not change any production firmware code. The new tests check that the decoder correctly rejects additional malformed inputs, such as an empty string, an oversized string, and strings containing unusual Unicode digits. This is a routine hardening of test coverage, not a fix for a known security bug.
No security action required. Treat as normal test-coverage improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies ports/stm32/boards/Passport/modules/tests/unit/seedqr_codec.py, adding six new malformed SeedQR test vectors to an existing tuple used in a unit test. The production decode() helper and the assertions remain unchanged. The added cases cover empty input, 52-digit input (13 words’ worth of digits), and a Unicode Arabic-Indic digit zero (U+0660) prefix. No functional code paths are altered.
Changed components
ports/stm32/boards/Passport/modules/tests/unit/seedqr_codec.pyInspect captured patch +4 / −1
### ports/stm32/boards/Passport/modules/tests/unit/seedqr_codec.py
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: 2026 Foundation Devices, Inc. <hello@foundation.xyz>
+# SPDX-FileCopyrightText: © 2026 Foundation Devices, Inc. <hello@foundation.xyz>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -18,11 +18,14 @@ def decode(data):
assert decode(valid_24) == ['zoo'] * 24
malformed = (
+ '',
+ '0000' * 13,
'2048' + ('0000' * 11),
'9999' + ('0000' * 11),
'abcd' + ('0000' * 11),
'-001' + ('0000' * 11),
' 001' + ('0000' * 11),
+ '\u0660' * 4 + ('0000' * 11),
valid_12 + '0',
valid_12 + '000',
valid_24 + '0',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.