test(core): don't run FIDO2 tests on BTC-only builds
What changed, and why it matters
This commit only changes a test file so that FIDO2/WebAuthn tests are skipped on Bitcoin-only firmware builds. It does not change any production code, wallet logic, or security behavior. There is no vulnerability or security fix here.
No security action needed. Treat as routine test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies core/tests/test_apps.webauthn.credential.py to guard FIDO2-related imports and the entire TestCredential class behind utils.BITCOIN_ONLY. On BTC-only builds, the test module will no longer import apps.webauthn.credential or apps.webauthn.fido2, and the test class is skipped. This is a test-suite maintenance change with no runtime impact.
Changed components
core/tests/test_apps.webauthn.credential.pyInspect captured patch +9 / −3
diff --git a/core/tests/test_apps.webauthn.credential.py b/core/tests/test_apps.webauthn.credential.py
index 84294821..d46ba163 100644
--- a/core/tests/test_apps.webauthn.credential.py
+++ b/core/tests/test_apps.webauthn.credential.py
@@ -5,11 +5,17 @@ import storage
import storage.device
from trezor.crypto.hashlib import sha256
-from apps.common import mnemonic
-from apps.webauthn.credential import _NAME_MAX_LENGTH, Fido2Credential, U2fCredential
-from apps.webauthn.fido2 import _distinguishable_cred_list
+if not utils.BITCOIN_ONLY:
+ from apps.common import mnemonic
+ from apps.webauthn.credential import (
+ _NAME_MAX_LENGTH,
+ Fido2Credential,
+ U2fCredential,
+ )
+ from apps.webauthn.fido2 import _distinguishable_cred_list
+@unittest.skipUnless(not utils.BITCOIN_ONLY, "fido2")
class TestCredential(unittest.TestCase):
def test_fido2_credential_decode(self):
mnemonic_secret = b"all all all all all all all all all all all all"
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.