Skip to content

Commit cb28ba6

Browse files
cbartzgabriel-samfira
authored andcommitted
fix(scalesets): remove debug print leaking auth token to stdout
ListRunnerScaleSets dumped the raw outgoing HTTP request via httputil.DumpRequest + fmt.Println, which wrote the "Authorization: Bearer <token>" header to stdout. Remove the debug block and the now-unused net/http/httputil import.
1 parent 561f351 commit cb28ba6

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

util/github/scalesets/scalesets.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"encoding/json"
2121
"fmt"
2222
"net/http"
23-
"net/http/httputil"
2423

2524
runnerErrors "github.com/cloudbase/garm-provider-common/errors"
2625
"github.com/cloudbase/garm/params"
@@ -109,10 +108,6 @@ func (s *ScaleSetClient) ListRunnerScaleSets(ctx context.Context) (_ *params.Run
109108
if err != nil {
110109
return nil, err
111110
}
112-
data, err := httputil.DumpRequest(req, false)
113-
if err == nil {
114-
fmt.Println(string(data))
115-
}
116111
resp, err := s.Do(req)
117112
if err != nil {
118113
return nil, fmt.Errorf("failed to list runner scale sets: %w", err)

0 commit comments

Comments
 (0)