Skip to content

feat: Unify secure storage backend across platforms#647

Merged
arjankowski merged 4 commits intomainfrom
secure-storage-wrapper
Mar 16, 2026
Merged

feat: Unify secure storage backend across platforms#647
arjankowski merged 4 commits intomainfrom
secure-storage-wrapper

Conversation

@arjankowski
Copy link
Contributor

This PR updates how the CLI reads and writes secure data so we can avoid repeated macOS Keychain prompts after upgrades.

The key issue is that on macOS, Keychain access control is tied to application identity and signature. When access goes through keytar, it is associated with the current node/box executable identity, and after signed build changes between versions macOS can treat that as a different app and ask for permission again. To make this stable, we now use the keychain library on macOS, which calls the system /usr/bin/security binary, so Keychain access is performed through a consistent process identity.

This change is mainly needed to prevent those upgrade-time prompts and make access to existing environments and tokens reliable.

@arjankowski arjankowski requested a review from a team March 14, 2026 13:56
@arjankowski arjankowski force-pushed the secure-storage-wrapper branch from 01770fb to 57c06a1 Compare March 14, 2026 14:03
@coveralls
Copy link

coveralls commented Mar 14, 2026

Pull Request Test Coverage Report for Build 23140832844

Details

  • 85 of 92 (92.39%) changed or added relevant lines in 3 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 84.001%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/box-command.js 15 18 83.33%
src/secure-storage.js 57 61 93.44%
Files with Coverage Reduction New Missed Lines %
src/box-command.js 3 74.98%
Totals Coverage Status
Change from base Build 23139987840: -0.08%
Covered Lines: 4978
Relevant Lines: 5666

💛 - Coveralls

Copy link
Contributor

@lukaszsocha2 lukaszsocha2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works good

@arjankowski arjankowski merged commit 6b2ed36 into main Mar 16, 2026
17 checks passed
@arjankowski arjankowski deleted the secure-storage-wrapper branch March 16, 2026 11:46
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.

3 participants