386a27c0b6
fix: resolve all revive linter issues
...
Added missing package comments:
- cmd/secret/main.go
- internal/cli/cli.go
- internal/secret/constants.go
- internal/vault/management.go
- pkg/bip85/bip85.go
Fixed comment format issues for exported items:
- EnvStateDir, EnvMnemonic, EnvUnlockPassphrase, EnvGPGKeyID in constants.go
- Metadata, UnlockerMetadata, SecretMetadata, Configuration in metadata.go
- AppBIP39, AppHDWIF, AppXPRV in bip85.go
Replaced unused parameters with underscore (_):
- generate.go:39 - parameter 'args'
- init.go:30 - parameter 'args'
- unlockers.go:39,77,102 - parameter 'args' or 'cmd'
- vault.go:37 - parameter 'args'
- management.go:34 - parameter 'target'
2025-07-15 06:06:48 +02:00
080a3dc253
fix: resolve all nlreturn linter errors
...
Add blank lines before return statements in all files to satisfy
the nlreturn linter. This improves code readability by providing
visual separation before return statements.
Changes made across 24 files:
- internal/cli/*.go
- internal/secret/*.go
- internal/vault/*.go
- pkg/agehd/agehd.go
- pkg/bip85/bip85.go
All 143 nlreturn issues have been resolved.
2025-07-15 06:00:32 +02:00
6fe49344e2
fix: resolve errcheck, gosec, and mnd linter errors
...
- Fixed unhandled errors in init.go (os.Setenv/Unsetenv)
- Fixed unhandled errors in test_helpers.go (os.Setenv/Unsetenv)
- Replaced magic numbers with named constants:
- defaultSecretLength = 16
- mnemonicEntropyBits = 128
- tabWriterPadding = 2
2025-07-09 06:59:01 -07:00
5d973f76ec
fix: break long lines to 77 characters in non-test files
...
Break long lines in function signatures and strings to comply with
77 character preference by using multi-line formatting and extracting
variables where appropriate.
2025-06-20 09:17:45 -07:00
434b73d834
Fix intrange and G101 linting issues
...
- Convert for loops to use Go 1.22+ integer ranges in generate.go and helpers.go
- Disable G101 false positives for test vectors and environment variable names
- Add file-level gosec disable for bip85_test.go containing BIP85 test vectors
- Add targeted nolint comments for legitimate test data and constants
2025-06-20 08:08:01 -07:00
0b31fba663
latest from ai, it broke the tests
2025-06-20 05:40:20 -07:00
02be4b2a55
Fix integration tests: correct vault derivation index and debug test failures
2025-06-09 04:54:45 -07:00
f59ee4d2d6
'unlock keys' renamed to 'unlockers'
2025-05-30 07:29:02 -07:00
34d6870e6a
feat: add derivation index to vault metadata for unique keys - Add VaultMetadata fields: DerivationIndex, LongTermKeyHash, MnemonicHash - Implement GetNextDerivationIndex() to track and increment indices for same mnemonics - Update init and import commands to use proper derivation indices - Add ComputeDoubleSHA256() for hash calculations - Save vault metadata on creation with all derivation information - Add comprehensive tests for metadata functionality. This ensures multiple vaults using the same mnemonic will derive different long-term keys by using incremented derivation indices. The mnemonic is double SHA256 hashed and stored to track which vaults share mnemonics. Fixes TODO item #5
2025-05-29 16:23:29 -07:00
a4d7225036
Standardize file permissions using constants and fix parameter ordering inconsistencies
2025-05-29 13:13:44 -07:00
8dc2e9d748
Remove duplicated wrapper crypto functions and use exported implementations directly
2025-05-29 13:08:00 -07:00
ddb395901b
Refactor vault functionality to dedicated package, fix import cycles with interface pattern, fix tests
2025-05-29 12:48:36 -07:00
e95609ce69
latest
2025-05-29 11:02:22 -07:00