swanadiva
93957e3989
feat: auto-detect encrypted files + CLI --password flag
...
- Storage.IsDataEncrypted() checks if hosts.json is encrypted
- TUI auto-detects encrypted files, prompts password automatically
- Root command: --password flag for all CLI commands
- newStorage() helper applies password flag to storage
- add/list/edit/delete commands now support encrypted storage
- passwordSetMsg loads hosts after password is set
2026-06-25 14:34:41 +07:00
swanadiva
611b794fc7
feat: Phase 2 Security Enhancement
...
- pkg/crypto: AES-256-GCM encryption with PBKDF2 key derivation
- 100k iterations, 16-byte salt, SHA-256
- Encrypt/Decrypt/IsEncrypted/HashPassword
- Storage layer encryption:
- JSONStorage.SetPassword() enables transparent encrypt/decrypt
- readJSON auto-decrypts, replace* auto-encrypts
- pkg/knownhosts: TOFU host key verification
- Verify/Add/Remove host keys
- HostKeyCallback for SSH config
- SSH client security:
- SetHostKeyCallback() replaces InsecureIgnoreHostKey()
- SetPassphraseCallback() for encrypted private keys
- getKeySigner() tries passphrase on encrypted keys
- Models: AppConfig gains EncryptionEnabled, PasswordHash, KnownHostsFile
2026-06-25 13:28:46 +07:00
swanadiva
07899c154b
fix: auto-generate ID+timestamps in storage layer on save
2026-06-23 18:18:10 +07:00
Swana Diva Borneos
4087c5fdc7
feat: add & list commands with deadlock fix
...
- Add 'add' command: register hosts via flags or interactive prompts
Supports password/key/both auth, groups, tags, notes, port override
- Add 'list' command: display hosts with filtering and formatting
Supports --group, --tag filters, --sort, table/json/wide output
- Fix deadlock bug in JSON storage (RLock within Lock)
Introduced internal list functions that don't lock
Affects: ListHosts/GetHost/SaveHost/DeleteHost + KeyPair + Snippet
- Add comprehensive tests for add and list commands
- Update PROJECT_STATE.md (Tasks 1-8 complete, ~55% done)
2026-06-23 10:56:04 +07:00
swanadiva
33947816b7
feat: complete Tasks 1-3 (setup, models+storage, config management)
...
- Task 1: Project setup (go.mod, Makefile, .gitignore, main.go)
- Task 2: Core data models (Host, KeyPair, Snippet, AppConfig) + JSON storage layer
- Task 3: Configuration management with cross-platform path support (macOS/Linux/Windows)
- Updated PROJECT_STATE.md with progress tracking
2026-06-22 16:09:02 +07:00