Skip to content

Commit 575801b

Browse files
Fix code scanning alert no. 2: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 0ee49b8 commit 575801b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ func createLLM() (llms.Model, error) {
135135
if bearerToken != "" {
136136
retryClient.RequestLogHook = func(l retryablehttp.Logger, r *http.Request, i int) {
137137
r.Header.Set("Authorization", fmt.Sprintf("Bearer %s", bearerToken))
138-
shortenedBearerToken := fmt.Sprintf("%s...", r.Header.Get("Authorization")[:5])
139-
log.Printf("Request with bearer %s token to %s %s", shortenedBearerToken, r.Method, r.URL)
138+
log.Printf("Request with bearer token to %s %s", r.Method, r.URL)
140139
}
141140
}
142141

0 commit comments

Comments
 (0)