Skip to content

Commit

Permalink
fix: security warning around printing provider details in https://git…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexsJones committed Oct 3, 2023
1 parent 87c8bce commit 85ce557
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions cmd/auth/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package auth
import (
"fmt"
"os"
"strings"
"unicode/utf8"

"github.com/fatih/color"
"github.com/k8sgpt-ai/k8sgpt/pkg/ai"
Expand Down Expand Up @@ -97,20 +95,6 @@ func printDetails(provider ai.AIProvider, userInput string) {
if provider.Model != "" {
fmt.Printf(" - Model: %s\n", provider.Model)
}
switch userInput {
case "y":
if provider.Password != "" {
fmt.Printf(" - Password: %s\n", provider.Password)
}
case "n":
if provider.Password != "" {
nc := utf8.RuneCountInString(provider.Password)
newStr := strings.Repeat("*", nc)
fmt.Printf(" - Password: %s\n", newStr)
}
default:
break
}
if provider.Engine != "" {
fmt.Printf(" - Engine: %s\n", provider.Engine)
}
Expand Down

0 comments on commit 85ce557

Please sign in to comment.