Skip to content

refactor(web): make useKeychain the single audit point#40

Merged
allisson merged 1 commit into
mainfrom
improve-ux
May 15, 2026
Merged

refactor(web): make useKeychain the single audit point#40
allisson merged 1 commit into
mainfrom
improve-ux

Conversation

@allisson
Copy link
Copy Markdown
Owner

useVault bypassed the documented seam at three sites, calling encryptSymmetric/decryptSymmetric directly on MasterKey/VaultKey.

  • Add k.wrapVaultKey for VaultKey-under-MasterKey wraps
  • Add k.decryptVersion for narrower VersionDetail envelopes
  • Inline the trash-decrypt helper through k.decryptItem
  • Omit masterKey from KeychainContextValue so future bypasses fail tsc, not just review

CONTEXT.md broadened to cover the new ops and enumerate the legitimate bypasses (ceremonies, BUK, passphrase exports).

useVault bypassed the documented seam at three sites, calling
encryptSymmetric/decryptSymmetric directly on MasterKey/VaultKey.

- Add k.wrapVaultKey for VaultKey-under-MasterKey wraps
- Add k.decryptVersion for narrower VersionDetail envelopes
- Inline the trash-decrypt helper through k.decryptItem
- Omit masterKey from KeychainContextValue so future bypasses
  fail tsc, not just review

CONTEXT.md broadened to cover the new ops and enumerate the
legitimate bypasses (ceremonies, BUK, passphrase exports).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@allisson allisson merged commit 698c5cc into main May 15, 2026
1 check passed
@allisson allisson deleted the improve-ux branch May 15, 2026 18:32
@allisson allisson mentioned this pull request May 18, 2026
4 tasks
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