cli: allow device=libjade to run cli commands with libjade
What changed, and why it matters
This commit adds a new command-line option that lets users run the Jade CLI with a local software simulator ('libjade') instead of a real hardware device connected over USB/serial. It is a feature addition, not a security fix or vulnerability.
No security action required. Treat as a normal feature commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change in jade_cli.py detects when the user passes device=’libjade’ and calls JadeAPI.create_libjade() rather than JadeAPI.create_serial(device=self.device). This enables CLI testing against the libjade simulator. No existing behavior is altered for real serial devices, and no security-sensitive logic is changed.
Changed components
jade_cli.pyInspect captured patch +4 / −1
diff --git a/jade_cli.py b/jade_cli.py
index bf41964..d4596f1 100755
--- a/jade_cli.py
+++ b/jade_cli.py
@@ -15,7 +15,10 @@ class JadeClient:
self.device = device
def __enter__(self):
- self.jade = JadeAPI.create_serial(device=self.device)
+ if self.device == 'libjade':
+ self.jade = JadeAPI.create_libjade()
+ else:
+ self.jade = JadeAPI.create_serial(device=self.device)
self.jade.connect()
self.jade.add_entropy(os.urandom(32))
return self.jade
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.