Repository navigation
Conversation
…ifest entries strongbox set (interactive/stdin/clipboard modes) had no way to make a newly set secret show up in `list`/the web UI - manifest.json only ever got updated by hand-editing it after the fact. Passing -Purpose (optionally with -UsedBy) now upserts the manifest entry directly; omitting it keeps prior behavior (secret is written and gettable, just untracked).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
strongbox set(interactive/stdin/clipboard modes) had no way to make a newly-set secret show up inlist/the web UI —manifest.jsononly ever got updated by hand-editing it after the fact.-Purpose/-UsedBytoSet-StrongboxSecret, and--purpose/--used-byto the CLI'ssetsubcommand. When-Purposeis given, it upserts the matching manifest entry (matched by name + scope/project, same lookupPull-StrongboxSecretalready uses). Omitting it leavesmanifest.jsonuntouched — a secret is still written and gettable, just not tracked/listed, same as today.Set-StrongboxManifestEntrydoes the upsert.Test plan
Invoke-Pester Tests/Strongbox.Tests.ps1— 47 passed (4 new cases: no-op without-Purpose, new-entry creation, existing-entry update, project/global non-collision)Invoke-Pester Tests/Strongbox.Cli.Tests.ps1— 18 passed (unaffected, usage text updated)Install-StrongboxModule.ps1) and manually ranstrongbox set tools.StrongboxSelfTest ... --purpose ... --used-by ...end to end against the real vault — confirmed viastrongbox list --json