Commit Graph
146 Commits
Author SHA1 Message Date
thePR0M3TH3AN fe96ccd7c7 Add agent security controls, broker auth, and capability discovery 2026-02-28 22:32:38 -05:00
google-labs-jules[bot]andPR0M3TH3AN 198ed4e440 chore(ai): format sources (style-agent)
Reformatted 5 Python files using black and verified linting for Node.js sources. No functional changes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 22:20:16 +00:00
thePR0M3TH3AN 4459dfea78 Fix display service input hooks and clean pytest warnings 2026-02-26 15:45:55 -05:00
thePR0M3TH3AN 53dcbb72c6 Merge pull request #929 from PR0M3TH3AN/refactor-menu-handler-generic-8639963642107346
Refactor entry menus to use generic `MenuHandler.run_menu`
2026-02-26 14:37:03 -05:00
thePR0M3TH3AN ca1b371e85 Merge pull request #930 from PR0M3TH3AN/refactor/password-complexity-4748189869193669602
🧹 Refactor _enforce_complexity for better maintainability
2026-02-26 14:36:49 -05:00
thePR0M3TH3AN 9a8c68dc81 Merge pull request #926 from PR0M3TH3AN/refactor/handle-add-methods-duplication-16655045915046682728
Refactor handle_add_* methods in manager.py to remove duplication
2026-02-26 14:36:12 -05:00
thePR0M3TH3AN 11f61cec4c Merge pull request #919 from PR0M3TH3AN/code-health-display-service-3270220411041344632
🧹 Refactor display logic to DisplayService
2026-02-26 14:33:22 -05:00
google-labs-jules[bot]andPR0M3TH3AN a1b459f98f Refactor entry menus to use generic MenuHandler.run_menu
Consolidated duplicated menu loop logic from `_entry_actions_menu`, `_entry_edit_menu`, and `_entry_qr_menu` in `src/seedpass/core/manager.py` into a reusable `run_menu` method in `src/seedpass/core/menu_handler.py`. This improves maintainability by centralizing the loop handling, input prompting, and header clearing logic.

*   Added `run_menu` to `MenuHandler`.
*   Refactored `_entry_actions_menu` to use `run_menu`.
*   Refactored `_entry_edit_menu` to use `run_menu`.
*   Refactored `_entry_qr_menu` (NOSTR section) to use `run_menu`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 19:26:55 +00:00
google-labs-jules[bot]andPR0M3TH3AN 4ebc14e703 Refactor handle_add_* methods to remove duplication
- Introduced `_clear_header_add_entry`, `_mark_dirty`, `_sync_and_pause` helpers.
- Introduced `_entry_op_context` context manager for error handling.
- Applied these patterns to `handle_add_totp`, `handle_add_ssh_key`, `handle_add_seed`, `handle_add_pgp`, `handle_add_nostr_key`, `handle_add_key_value`, and `handle_add_managed_account`.
- Ensured `is_dirty` flag is set immediately after entry creation to prevent data loss if subsequent UI steps are cancelled.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 19:18:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN a6856c1fec Refactor _enforce_complexity in password_generation.py
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 18:17:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN 40f37b30bd Refactor display_sensitive_entry_info into DisplayService
Extracted the monolithic `display_sensitive_entry_info` method from `PasswordManager` into a new `DisplayService` class in `src/seedpass/core/display_service.py`. This improves maintainability and separation of concerns.

- Created `src/seedpass/core/display_service.py` with `DisplayService` class.
- Implemented specific display methods for each entry type (TOTP, SSH, SEED, PGP, Nostr, Key/Value, Managed Account, Password).
- Updated `src/seedpass/core/manager.py` to use `DisplayService`.
- Verified with existing tests `test_manager_retrieve_totp.py` and `test_manager_search_display.py`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 18:11:07 +00:00
google-labs-jules[bot]andPR0M3TH3AN 24fa2e8e1a Refactor initialize_managers in PasswordManager for better readability
Extracted logic from `initialize_managers` into helper methods:
- `_initialize_config_and_state`
- `_initialize_entry_manager`
- `_initialize_password_generator`
- `_initialize_nostr_client`
- `_handle_migration`

This improves code organization and maintainability without altering functionality. Verified with `test_vault_initialization.py`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 18:11:05 +00:00
thePR0M3TH3AN c25d1df78d Format files to satisfy CI black check 2026-02-25 21:22:39 -05:00
thePR0M3TH3AN 0f8a54342c Fix profile setup edge cases and TOTP viewer refresh 2026-02-25 20:57:29 -05:00
thePR0M3TH3AN 88c1974ac6 Harden TUI recovery paths and add release integrity gates 2026-02-25 19:18:54 -05:00
thePR0M3TH3AN 56b68bd0ac Complete security item 3 hardening and redaction sweep 2026-02-25 18:23:40 -05:00
thePR0M3TH3AN fcbe2b2943 Harden security item 2: KDF policy, export safeguards, and tests 2026-02-25 18:15:51 -05:00
thePR0M3TH3AN c3eef44ab7 improved tests 2026-02-25 18:07:22 -05:00
thePR0M3TH3AN 37d0dffdc3 Merge branch 'beta' into main (safe conflict resolution) 2026-02-23 16:38:18 -05:00
thePR0M3TH3AN dd7290e83b Add robust AI TUI harness, docs roadmap, and lock/unlock fix 2026-02-23 14:35:40 -05:00
thePR0M3TH3AN 39d3b72e66 Merge pull request #889 from PR0M3TH3AN/opt-totp-cache-13978863474736758588
⚡ Optimize TOTP display loop by caching derived secrets
2026-02-18 10:23:09 -05:00
google-labs-jules[bot]andPR0M3TH3AN 1f92fe7901 Refactor test fixtures and fix linting issues
- Moved `client` and `dummy_nostr_client` fixtures to `src/tests/conftest.py` to fix F811 redefinition errors and improve test organization.
- Introduced `make_dummy_nostr_client` factory fixture to support tests requiring multiple client instances.
- Updated all affected tests to use the new fixture pattern.
- Removed deprecated `is_flag=True` from Typer boolean options in CLI modules.
- Fixed F541 (f-string without placeholders) in `entry_management.py`.
- Fixed F841 (unused variable) in `manager.py`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:39:55 +00:00
google-labs-jules[bot]andPR0M3TH3AN b0c3a97ce3 perf: Cache derived TOTP secrets in display loops
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:39:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8e33f9c5e1 Fix formatting, linting, and logic errors from codebase scan
- Apply black formatting to 17 files.
- Fix F821 undefined name errors in:
  - src/main.py: Add missing `queue` import.
  - src/seedpass/core/encryption.py: Fix `JSONDecodeError` reference.
  - src/utils/__init__.py: Fix exception variable scope in fallback code.
  - src/utils/key_derivation.py: Add `TYPE_CHECKING` imports.
  - src/seedpass/core/config_manager.py: Add `TYPE_CHECKING` imports.
- Initialize torch environment and TODO file.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 18:09:48 +00:00
google-labs-jules[bot]andPR0M3TH3AN afa35a1782 Optimize TOTP derivation in GUI loop by caching secrets
- Add `get_totp_secret` to `EntryManager` and `EntryService` to allow retrieving the secret (derived or imported) without calculating the code.
- Update `TotpViewerWindow` in GUI to cache TOTP secrets locally. This prevents expensive PBKDF2/BIP39 derivation on every UI refresh (every second).
- Clean up unused imports and f-strings in `entry_management.py`.

Benchmarks show a ~9x speedup for 10 frames (50 entries) and >100x speedup for steady state.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 17:37:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN 75fe5bc382 Fix weak key derivation by adding salt to parent seed encryption
Introduced a random salt to key derivation for parent seed encryption to prevent rainbow table attacks. The salt is now stored in the `parent_seed.enc` file header (V3 format).

*   Modified `src/utils/key_derivation.py` to accept optional `salt` argument.
*   Modified `src/seedpass/core/encryption.py` to read/write salt in `parent_seed.enc` using V3 format (V3:salt:nonce:ciphertext).
*   Modified `src/seedpass/core/manager.py` to generate salt for new seeds and read salt for existing ones.
*   Added auto-upgrade logic for legacy (no salt) seeds upon access.
*   Updated tests to verify salt usage and backward compatibility.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 17:22:54 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0a349df058 chore(ai): style-agent run
- Formatted 8 files with black.
- Ran flake8 and logged warnings.
- Verified with pytest.
- Scheduler operations completed (lock check, lock, complete).
- Wrote task log to torch/task-logs/daily/.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 12:54:54 +00:00
thePR0M3TH3AN d030cf9692 Raise InvalidToken-compatible errors 2025-08-23 12:21:56 -04:00
thePR0M3TH3AN bebbca8169 Add test for friendly decryption message? 2025-08-23 12:05:58 -04:00
thePR0M3TH3AN 7b0344739f refactor: restrict console logging and pause during UI 2025-08-22 22:24:04 -04:00
thePR0M3TH3AN d5e0d61db4 Use custom SeedPassError instead of sys.exit 2025-08-22 10:01:14 -04:00
thePR0M3TH3AN ee3d9d8e9d feat: add local backup restore during seed setup 2025-08-22 09:39:38 -04:00
thePR0M3TH3AN a2a663eed1 Default offline mode 2025-08-22 09:10:06 -04:00
thePR0M3TH3AN 4df6ff639e List seed setup choices for readability 2025-08-20 22:33:23 -04:00
thePR0M3TH3AN 505cf1a950 feat: track nostr account index per seed 2025-08-20 22:15:35 -04:00
thePR0M3TH3AN cb9a068e40 Handle config decryption errors gracefully 2025-08-20 21:46:09 -04:00
thePR0M3TH3AN c13742f3f3 Merge pull request #838 from PR0M3TH3AN/codex/add-manual-export-without-encryption
Add option to export and import database without encryption
2025-08-20 21:08:49 -04:00
thePR0M3TH3AN 6c8b1928b8 Add option to export and import database without encryption 2025-08-20 21:00:12 -04:00
thePR0M3TH3AN 492bfba3fb tests: add offline default and kdf slider 2025-08-20 20:51:36 -04:00
thePR0M3TH3AN dd513cf964 Add nonce tracking and V3 encryption format 2025-08-20 19:43:45 -04:00
thePR0M3TH3AN 0315562d80 test: ensure manifest IDs omit fingerprint 2025-08-20 19:11:24 -04:00
thePR0M3TH3AN 619226d336 feat: support random and deterministic TOTP secrets 2025-08-20 18:36:19 -04:00
thePR0M3TH3AN b97d60778b Restore compatibility for key hierarchy 2025-08-20 18:12:02 -04:00
thePR0M3TH3AN bbb26ca55a test: add key hierarchy tests 2025-08-20 17:57:50 -04:00
thePR0M3TH3AN 26632c0e70 Fix KDF metadata handling and headless password prompts 2025-08-20 17:23:10 -04:00
thePR0M3TH3AN 06ca51993a Add KDF config with per-file metadata 2025-08-19 09:53:46 -04:00
thePR0M3TH3AN 87999b1888 test: cover backup restore startup 2025-08-19 08:53:26 -04:00
thePR0M3TH3AN 468608a369 Support listing all entry types 2025-08-18 19:12:55 -04:00
thePR0M3TH3AN a21efa91db refactor: rename entropy length parameter 2025-08-12 09:41:37 -04:00
thePR0M3TH3AN 19577163cf Add vault locked flag and enforce access checks 2025-08-12 08:48:19 -04:00