Skip to content

Close the open nits and add device pairing - #7

Merged
VirtualMachinist merged 5 commits into
mainfrom
feat/pendant-pairing
Oct 31, 2026
Merged

VirtualMachinist merged 5 commits into
mainfrom
feat/pendant-pairing

Conversation

@VirtualMachinist

@VirtualMachinist VirtualMachinist commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Close the remaining pairing review on feat/pendant-pairing.
  • A pairing nonce is issued only on the host. A loopback Host plus Forwarded or X-Forwarded-For is refused. The signed pairing message binds the device id and the public key.
  • Revoke requires a paired-device signature over a one-time challenge, or a host-only operator revoke. A Serve caller cannot revoke. A revoked id is not overwritten. Takeover stays off.
  • The bridge verifies a P-256 phone signature. Request, grant, and attach messages bind a single-use challenge. GET /v1/challenge is rate-limited and expires.
  • Write routes connect to the canonical scratch-socket path. A missing path fails.
  • The existing check job runs cargo deny --manifest-path app/Cargo.toml check. Workflow actions are pinned to commit SHAs and checkout does not persist credentials.

Test plan

  • check, banned-names, and cargo-deny are green on this head, including app cargo deny.
  • A loopback Host plus a forwarding header does not receive a pairing nonce.
  • A Serve caller cannot use the host revoke route.
  • A revoked id stays revoked. Challenges are single-use and rate-limited.
  • A real phone has not run the keystore. That row stays blocked.

VirtualMachinist and others added 5 commits October 30, 2026 22:24
Store::open no longer takes an index directory. Config is the vault and
the inbox; the store picks the index in app-private storage itself, so a
caller cannot hand it a symlink. The engine's own confinement still runs.

The Android no_backup check now passes only the no_backup directory
directly in the app's data directory. A decoy component elsewhere fails,
and the comment says it is hygiene, not getNoBackupFilesDir().

Captured.index_error carries the kind of failure, never the engine's
message, which can name vault paths. The backup-exclusion unsafe call has
a SAFETY comment.

app/src/platform/keystore.rs makes the device key: P-256 in the Secure
Enclave via the Keychain, biometric per signature, this device only. The
bridge format is a SEC1 public key and a DER ECDSA-SHA256 signature.
Android returns Unsupported until an app shell owns Keystore and
BiometricPrompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PENDANT_BIND now accepts only loopback, Serve origin and scratch-path checks are pinned, and prompt, keys, approve, and worktree create require a phone-supplied signature plus an open grant. The app workspace is included in cargo deny.

Co-authored-by: Cursor <cursoragent@cursor.com>
The QR nonce and revoke stay on the host, pairing signatures bind the device id and public key, revoked ids stay tombstoned, and the bridge verifies the phone P-256 signature with a one-time challenge.

Co-authored-by: Cursor <cursoragent@cursor.com>
A loopback Host with a forwarding header is not local, so it cannot obtain a QR nonce or use host revoke. Writes dial the canonical scratch socket, and challenges expire and are rate limited.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@VirtualMachinist
VirtualMachinist marked this pull request as ready for review October 31, 2026 14:30
@VirtualMachinist
VirtualMachinist merged commit d3b5128 into main Oct 31, 2026
3 checks passed
VirtualMachinist added a commit that referenced this pull request Nov 14, 2026
Pairing cleanup after #7: Serve-mode warning, replay test, subtle, per-client challenge limit
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