jadepy: add builtin file method impls for newer cbor2 versions
What changed, and why it matters
This commit adds three simple file-like method declarations (readable, writable, seekable) to a Python class that communicates with a Blockstream Jade hardware wallet. The change appears to be a compatibility fix so the Jade interface object works correctly with newer versions of the cbor2 library, which may now expect these methods to exist. There is no obvious security vulnerability in the diff itself; it is a small API compatibility patch.
No immediate security action required. Treat as a routine compatibility patch. If the reporter disclosed additional context elsewhere, review that separately. Consider pinning or documenting supported cbor2 versions to avoid future breakage.
Security signals we found
Commit message thanks an external reporter, which can indicate a reported bug or issue
No explicit security language in commit title or message
Diff is purely additive compatibility methods with no input handling, parsing, or trust-boundary changes
No CVE, advisory, or vendor security reference supplied
Evidence from the diff
The JadeInterface class in jadepy/jade.py is used as a file-like object for cbor2 serialization/deserialization. Newer cbor2 versions appear to require the underlying stream to advertise readable(), writable(), and seekable() capabilities. The patch adds these methods returning True, True, and False respectively. This is a defensive compatibility change and does not, on its own, introduce unsafe behavior. The commit message thanks @1-21gigasats for reporting, but does not describe a security issue.
Changed components
jadepy/jade.pyJadeInterface classcbor2 message reading integrationInspect captured patch +9 / −0
diff --git a/jadepy/jade.py b/jadepy/jade.py
index e766510..fa72030 100644
--- a/jadepy/jade.py
+++ b/jadepy/jade.py
@@ -2335,6 +2335,15 @@ class JadeInterface:
# logger.debug(f'Received: {len(bytes_)} bytes')
return bytes_
+ def readable(self):
+ return True # Act like a file-like object
+
+ def writable(self):
+ return True # Act like a file-like object
+
+ def seekable(self):
+ return False # Act like a file-like object
+
def read_cbor_message(self):
"""
Try to read a single cbor (response) message from the underlying interface.
Why this scored 26/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.