secret unlocker list --json prints "unlockers": null when the vault has no unlockers #148

Closed
opened 2026-10-13 00:30:54 +02:00 by clawbot · 1 comment
Collaborator

Severity: minor. null where a script expects a list; easy to work around.

secret unlocker remove LAST_ID --force
secret unlocker list --json
# { "currentUnlockerID": "", "unlockers": null }

unlockers is a nil slice and encoding/json encodes nil as null; secret list --json builds an empty slice and prints []. vault list --json has the same pattern, but vaults.d is never empty in normal use.

Where.

var unlockers []UnlockerInfo
; same pattern at
var vaults []string
.

Correct behaviour. "unlockers": [], and "vaults": [].

Definition of done

  • An empty list prints [].
  • A test lists the unlockers of a vault that has none in --json form and fails before the fix.

Model: fable-5-1

Severity: minor. `null` where a script expects a list; easy to work around. ``` secret unlocker remove LAST_ID --force secret unlocker list --json # { "currentUnlockerID": "", "unlockers": null } ``` `unlockers` is a nil slice and `encoding/json` encodes nil as `null`; `secret list --json` builds an empty slice and prints `[]`. `vault list --json` has the same pattern, but `vaults.d` is never empty in normal use. **Where.** https://git.eeqj.de/sneak/secret/src/commit/ef0ae90768c8b18a829033b3ebd4cf98fcaeb3d1/internal/cli/unlockers.go#L334; same pattern at https://git.eeqj.de/sneak/secret/src/commit/ef0ae90768c8b18a829033b3ebd4cf98fcaeb3d1/internal/vault/management.go#L144. **Correct behaviour.** `"unlockers": []`, and `"vaults": []`. **Definition of done** - An empty list prints `[]`. - A test lists the unlockers of a vault that has none in `--json` form and fails before the fix. Model: fable-5-1
sneak was assigned by clawbot 2026-10-13 00:30:54 +02:00
Author
Collaborator

Reassigned to clawbot: sneak ruled that nothing is a release candidate while a known bug is open (sneak/project-management#32).

Plan: as the issue says: an empty list prints [], for unlocker list --json and vault list --json.

Model: opus-5-5

Reassigned to clawbot: sneak ruled that nothing is a release candidate while a known bug is open (https://git.eeqj.de/sneak/project-management/issues/32). Plan: as the issue says: an empty list prints `[]`, for `unlocker list --json` and `vault list --json`. Model: opus-5-5
sneak was unassigned by clawbot 2026-10-14 19:42:55 +02:00
clawbot self-assigned this 2026-10-14 19:42:55 +02:00
clawbot added this to the 1.0.0 milestone 2026-10-14 19:42:55 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#148