Skip to content

Update storage module: version 1.1, create_crypto(), get_project_info()#8

Draft
ropeadope62 with Copilot wants to merge 3 commits into
mainfrom
copilot/update-storage-module-security-tier-salt
Draft

Update storage module: version 1.1, create_crypto(), get_project_info()#8
ropeadope62 with Copilot wants to merge 3 commits into
mainfrom
copilot/update-storage-module-security-tier-salt

Conversation

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown

Extends SecretsStorage with missing convenience methods needed by the info CLI command and as a cleaner API for callers that need a ready-to-use crypto instance.

storage.py

  • Version bump "1.0""1.1" in initialize()
  • create_crypto() — wraps load_encryption_key() into a single call; returns a ZeroEnvCrypto instance wired to the stored tier/salt
  • get_project_info() — returns a flat dict (version, created_at, security_tier, secrets_count, directory) for use by the info command; gracefully defaults for legacy v1.0 files
# Before: callers had to do this manually
encryption_key = storage.load_encryption_key()
crypto = ZeroEnvCrypto(encryption_key)

# After
crypto = storage.create_crypto()

# Info panel data in one call
info = storage.get_project_info()
# {'version': '1.1', 'security_tier': 'enhanced', 'secrets_count': 3, ...}

tests/test_storage.py

  • Updated test_initialize to assert version "1.1"
  • TestCreateCrypto — covers all three tiers, determinism across calls, and round-trip encrypt/decrypt
  • TestGetProjectInfo — covers all returned fields, tier variants, secrets count, directory, and backward compatibility with v1.0 files

Copilot AI linked an issue Apr 28, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 28, 2026 02:40
Agent-Logs-Url: https://github.com/ropeadope62/zeroenv/sessions/c319246f-d5ac-46d1-80f1-bdf699234d1c

Co-authored-by: ropeadope62 <26491441+ropeadope62@users.noreply.github.com>
… to SecretsStorage

Agent-Logs-Url: https://github.com/ropeadope62/zeroenv/sessions/c319246f-d5ac-46d1-80f1-bdf699234d1c

Co-authored-by: ropeadope62 <26491441+ropeadope62@users.noreply.github.com>
Copilot AI changed the title [WIP] Update storage module to persist security tier and salt Update storage module: version 1.1, create_crypto(), get_project_info() Apr 28, 2026
Copilot AI requested a review from ropeadope62 April 28, 2026 02:43
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.

Update storage module to persist security tier and salt

2 participants