Skip to content

Guidepoint: Feat - Add root/jailbreak detection (defense-in-depth) - #2267

Open
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:feat/root-jailbreak-detection
Open

Guidepoint: Feat - Add root/jailbreak detection (defense-in-depth)#2267
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:feat/root-jailbreak-detection

Conversation

@cmgustavo

@cmgustavo cmgustavo commented Aug 5, 2026

Copy link
Copy Markdown
Member

Adds client-side root (Android) / jailbreak (iOS) detection. Centralized in utils/deviceIntegrity.ts via jail-monkey 3.0.0
(New Architecture-compatible).

Tiered, non-blocking response:

  • Silent: tag Sentry (device.compromised) on every event + analytics on detection
  • Soft block: passkey register/auth and crypto signing on compromised devices; passkey login falls back to basic auth, no full-app lockout

Testing (no root needed)

Debug build → press j in Metro to open React Native DevTools → Console tab:

globalThis.__deviceIntegrity.simulate('jailbroken')  // or 'hook-detected'
globalThis.__deviceIntegrity.clear()                 // reset

With the override on, verify:

  • Sign a tx / register passkey → blocked with the rooted/jailbroken message
  • Passkey login → falls back to password (doesn't fail)
  • Sentry → tagged device.compromised=true
  • Rest of the app → still works (no hard block)

Note: the one-time Device Integrity Compromised analytics event only fires at app init — to test it, use a release build on an emulator that trips detection.

Example error:

[Warn] [deviceIntegrity] sensitive action "crypto-sign" attempted on compromised device (reason: jailbroken)
IMG_1766

@cmgustavo
cmgustavo force-pushed the feat/root-jailbreak-detection branch from 9e815d4 to 0573155 Compare August 5, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant