Merge pull request #43 from hobbyistlabs-coder/sentinel-fix-jules-http-timeout-18134507621557633353

🛡️ Sentinel: [MEDIUM] Fix missing HTTP client timeout in jules API client
This commit is contained in:
hobbyistlabs-coder 2026-03-17 16:31:25 -04:00 committed by GitHub
commit f50813b065
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@ import (
"io" "io"
"net/http" "net/http"
"os" "os"
"time"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -43,7 +44,9 @@ func doRequest(method, url string, body []byte) error {
req.Header.Set("x-goog-api-key", apiKey) req.Header.Set("x-goog-api-key", apiKey)
req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Type", "application/json")
client := &http.Client{} client := &http.Client{
Timeout: 15 * time.Second,
}
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {
return fmt.Errorf("error making request: %w", err) return fmt.Errorf("error making request: %w", err)