Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugins/pass/commands/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ func RmCommand(kc store.Store) *cobra.Command {
Aliases: []string{"delete", "erase", "remove"},
Short: "Remove secrets from local keychain.",
Long: "Removes one or more named secrets from the local OS keychain.\nUse --all to remove every stored secret at once.",
Example: `# Remove a specific secret:
Example: `### Remove a specific secret:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW: Example section headers use ### (Markdown heading) instead of conventional # (shell comment)

Cobra does not render Markdown — the Example field is printed verbatim to the terminal. Replacing # Remove a specific secret: with ### Remove a specific secret: means users will see raw ### syntax in docker pass rm --help output.

The # prefix is both standard shell comment syntax and the de-facto Cobra/Docker CLI convention (used by Docker CLI, kubectl, and most Cobra-based tools). Consider reverting to # for consistent terminal UX.

docker pass rm GH_TOKEN

# Remove multiple secrets:
### Remove multiple secrets:
docker pass rm GH_TOKEN NPM_TOKEN

# Remove all secrets:
### Remove all secrets:
docker pass rm --all`,
RunE: func(cmd *cobra.Command, args []string) error {
idList, err := validateArgs(args, opts)
Expand Down
8 changes: 4 additions & 4 deletions plugins/pass/commands/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ import (
)

const setExample = `
# Set a secret:
### Set a secret:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW: Example section headers use ### (Markdown heading) instead of conventional # (shell comment)

Same issue as rm.go: replacing # Set a secret: with ### Set a secret: causes docker pass set --help to display raw Markdown heading syntax in the terminal. Cobra prints Example strings as-is with no Markdown processing, so ### appears literally to users and deviates from the shell-comment convention.

Consider reverting to # for consistency with Docker CLI and Cobra ecosystem conventions.

docker pass set POSTGRES_PASSWORD=my-secret-password

# Or pass the secret via STDIN:
### Or pass the secret via STDIN:
echo my-secret-password > pwd.txt
cat pwd.txt | docker pass set POSTGRES_PASSWORD

# Set a secret with metadata:
### Set a secret with metadata:
docker pass set POSTGRES_PASSWORD=my-secret-password --metadata owner=alice --metadata expiry=2027-03-01

# Or pass a JSON payload with secret and metadata via STDIN:
### Or pass a JSON payload with secret and metadata via STDIN:
echo '{"secret":"my-secret-password","metadata":{"owner":"alice"}}' | docker pass set POSTGRES_PASSWORD
`

Expand Down
Loading