Skip to content

fix(github): respect environment proxy in client transport - #336

Merged
madneal merged 1 commit into
masterfrom
codex/fix-github-proxy
Aug 3, 2026
Merged

fix(github): respect environment proxy in client transport#336
madneal merged 1 commit into
masterfrom
codex/fix-github-proxy

Conversation

@madneal

@madneal madneal commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Problem

The GitHub search client creates a custom http.Transport with a TLS configuration, but leaves Transport.Proxy unset. A custom transport does not inherit Go's default ProxyFromEnvironment, so HTTP_PROXY and HTTPS_PROXY configured for the scanner are bypassed and GitHub requests connect directly.

Solution

  • Clone http.DefaultTransport so the standard proxy behavior and transport defaults are preserved.
  • Keep the existing InsecureSkipVerify setting because the deployment requires it.
  • Add a regression test that verifies the GitHub transport preserves the default proxy function.

SearchCode's separate upstream 404 response is not changed by this PR.

Verification

  • GO111MODULE=on go test ./search/githubsearch -run 'TestGithubHTTPTransportPreservesDefaultProxy|TestSearchCodeByOpt' -count=1
  • GO111MODULE=on go test -short ./source ./service ./router
  • git diff --check

Comment thread server/search/githubsearch/gitclient.go Dismissed
@madneal
madneal merged commit 0152326 into master Aug 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants