secret/internal/secret
user 78015afb35 Add secret.Warn() calls for all silent anomalous conditions
Audit of the codebase found 9 locations where errors or anomalous
conditions were silently swallowed or only logged via Debug(). Users
should be informed when something unexpected happens, even if the
program can continue.

Changes:
- DetermineStateDir: warn on config dir fallback to ~/.config
- info_helper: warn when vault/secret stats cannot be read
- unlockers list: warn on metadata read/parse failures (fixes FIXMEs)
- unlockers list: warn on fallback ID generation
- checkUnlockerExists: warn on errors during duplicate checking
- completions: warn on unlocker metadata read/parse failures
- version list: upgrade metadata load failure from Debug to Warn
- secrets: upgrade file close failure from Debug to Warn
- version naming: warn on malformed version directory names

Closes #19
2026-02-20 00:03:49 -08:00
..
constants.go fix: resolve all revive linter issues 2025-07-15 06:06:48 +02:00
crypto.go security: zero plaintext after copying to memguard in DecryptWithIdentity 2026-02-08 12:04:38 -08:00
debug_test.go fix: replace unused parameters with underscores (revive) 2025-06-20 12:50:16 -07:00
debug.go Change missing metadata log from Debug to Warn for visibility without --verbose 2026-02-19 23:57:39 -08:00
derivation_index_test.go test: add test for getLongTermPrivateKey derivation index 2026-02-19 23:43:13 -08:00
helpers_test.go Return error from GetDefaultStateDir when home directory unavailable 2026-02-15 14:05:15 -08:00
helpers.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00
keychainunlocker_stub.go fix: non-darwin KeychainUnlocker stub returns errors instead of panicking 2026-02-08 12:05:38 -08:00
keychainunlocker_test.go Fix unlocker rm to succeed when keychain item is missing 2025-12-23 14:14:14 +07:00
keychainunlocker.go fix: use vault derivation index in getLongTermPrivateKey instead of hardcoded 0 2026-02-19 23:43:13 -08:00
metadata.go fix: resolve all remaining linter issues (staticcheck, tagliatelle, lll) 2025-07-15 06:33:25 +02:00
passphrase_test.go Fix EncryptWithPassphrase to accept LockedBuffer for data parameter 2025-07-15 08:42:46 +02:00
passphraseunlocker.go Fix DecryptWithIdentity to return LockedBuffer 2025-07-15 09:04:34 +02:00
pgpunlock_test.go Fix remaining memory security issues 2025-07-15 09:08:51 +02:00
pgpunlocker.go fix: suppress gosec G204 for validated GPG key ID inputs 2026-02-19 23:43:13 -08:00
secret_test.go Allow uppercase letters in secret names (closes #2) 2026-02-15 14:03:50 -08:00
secret.go Fix DecryptWithIdentity to return LockedBuffer 2025-07-15 09:04:34 +02:00
unlocker.go refactor: remove confusing dual ID method pattern from Unlocker interface - Removed redundant ID() method from Unlocker interface - Removed ID field from UnlockerMetadata struct - Modified GetID() to generate IDs dynamically based on unlocker type and data - Updated vault package to create unlocker instances when searching by ID - Fixed all tests and CLI code to remove ID field references - IDs are now consistently generated from unlocker data, preventing redundancy 2025-06-11 15:21:20 -07:00
validation_test.go fix: resolve critical security vulnerabilities in debug logging and command execution 2025-06-20 07:50:26 -07:00
version_test.go Switch from relative paths to bare names in pointer files 2025-12-23 13:43:10 +07:00
version.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00