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
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
req.URL.Host = u.Host

// execute request
resp, err := httpC.Do(req) //nolint:gosec // URL is constructed from user-configured Spacelift endpoint, not untrusted input
resp, err := httpC.Do(req)

Check failure on line 113 in client/client.go

View workflow job for this annotation

GitHub Actions / CodeQL

G704: SSRF via taint analysis (gosec)
Comment thread
mbialon marked this conversation as resolved.
if err != nil {
return nil, fmt.Errorf("error executing request: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestClientDo_EndpointTrimming(t *testing.T) {

c := New(wraps, &fakeSession{endpoint: tt.endpoint})

req, err := http.NewRequest(http.MethodGet, "http://placeholder.invalid/some/path", nil)
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "http://placeholder.invalid/some/path", nil)
require.NoError(t, err)

resp, err := c.Do(req)
Expand Down
Loading