Skip to content
Open
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: 5 additions & 1 deletion internal/cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"context"
"fmt"
"os"
"time"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -58,7 +59,10 @@ func runAuth(cmd *cobra.Command, args []string) error {
return fmt.Errorf("failed to get token: %w", err)
}

// Print the raw token without any prefix (useful for piping to other tools)
// Print the raw token without any prefix (useful for piping to other tools).
// CWE-522: Token output is the intentional purpose of this command.
// Warning is sent to stderr so it doesn't interfere with piped usage.
fmt.Fprintln(os.Stderr, "Warning: token output below. Avoid storing in logs or shell history.")
fmt.Println(token)
return nil
}
Loading