|
1 | 1 | # CHANGELOG |
2 | 2 |
|
3 | 3 |
|
| 4 | +## v0.9.0 (2026-03-14) |
| 5 | + |
| 6 | +### Features |
| 7 | + |
| 8 | +- **cli**: Add search command and list --filter ([#29](https://github.com/cdds-ab/vaultctl/pull/29), |
| 9 | + [`007f505`](https://github.com/cdds-ab/vaultctl/commit/007f50557b165d55d0e21ca59f5d0ee8b6777065)) |
| 10 | + |
| 11 | +## Summary |
| 12 | + |
| 13 | +- **`vaultctl list --filter/-f PATTERN`**: Regex filter on key names, descriptions, and consumers |
| 14 | + from vault-keys.yml metadata. No additional decryption beyond what `list` already does. - |
| 15 | + **`vaultctl search PATTERN`**: New subcommand that decrypts the vault and recursively searches all |
| 16 | + values (strings in nested dicts/lists). Output shows only key names and dot-path locations — never |
| 17 | + values unless `--show-match` is explicitly used. - `--keys-only / -k`: Search only key names and |
| 18 | + metadata (no vault decryption needed) - `--show-match`: Display matched values (with security |
| 19 | + warning) - Exit code 0 if matches found, 1 if not (scripting-friendly) |
| 20 | + |
| 21 | +### Security considerations - Search pattern is never logged or included in error output - Values |
| 22 | + are never shown without explicit `--show-match` flag - `--show-match` displays a yellow WARNING to |
| 23 | + stderr - Recursive search is depth-limited (max 20 levels) - All search logic is in a |
| 24 | + pure-function module (`search.py`) — no side effects |
| 25 | + |
| 26 | +### Architecture - New module `src/vaultctl/search.py` with `search_values()` and `filter_keys()` — |
| 27 | + pure functions, fully unit-testable - CLI wiring in `cli.py` follows existing command patterns - |
| 28 | + 100% test coverage on search.py, 87% overall |
| 29 | + |
| 30 | +Closes #TBD |
| 31 | + |
| 32 | +## Test plan |
| 33 | + |
| 34 | +- [x] Unit tests for `search_values()` — flat values, nested dicts, nested lists, depth limit, |
| 35 | + include_values toggle - [x] Unit tests for `filter_keys()` — key name, description, consumer |
| 36 | + matching, regex, case insensitivity - [x] Integration tests for `vaultctl list --filter` — name |
| 37 | + match, description match, regex, no match, invalid regex - [x] Integration tests for `vaultctl |
| 38 | + search` — value found, not found, nested, show-match, keys-only, invalid regex - [x] All 272 tests |
| 39 | + pass, 87.45% coverage - [x] ruff, mypy --strict, bandit all clean |
| 40 | + |
| 41 | +--------- |
| 42 | + |
| 43 | +Co-authored-by: Fred Thiele <8555720+f3rdy@users.noreply.github.com> |
| 44 | + |
| 45 | + |
4 | 46 | ## v0.8.2 (2026-03-14) |
5 | 47 |
|
6 | 48 | ### Bug Fixes |
|
0 commit comments