resolveURL: no timeout on HEAD request may block CloneRepo indefinitely #32

Open
opened 2026-05-04 17:07:54 +02:00 by heiko · 0 comments
Owner

Problem

resolveURL in internal/builder/clone.go uses an http.Client with no timeout. A slow or hanging server will block CloneRepo indefinitely before git even starts.

Suggested fix

Add a short timeout to the client, e.g.:

client := &http.Client{
    Timeout: 10 * time.Second,
    CheckRedirect: ...,
}

Identified by AI code review (Claude Sonnet 4.6)

## Problem `resolveURL` in `internal/builder/clone.go` uses an `http.Client` with no timeout. A slow or hanging server will block `CloneRepo` indefinitely before git even starts. ## Suggested fix Add a short timeout to the client, e.g.: ```go client := &http.Client{ Timeout: 10 * time.Second, CheckRedirect: ..., } ``` --- *Identified by AI code review (Claude Sonnet 4.6)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
heiko/gogogo#32
No description provided.