Forward proxy env vars from the host#635
Open
brettfo wants to merge 1 commit into
Open
Conversation
16ab831 to
6019bf9
Compare
11df025 to
142e24f
Compare
Extract proxy environment construction into a proxyEnv helper. Forward JOB_TOKEN (from the host) and DEPENDABOT_API_URL (from params.ApiUrl) together, and only when JOB_TOKEN is set and non-empty. The proxy uses DEPENDABOT_API_URL to choose which host to inject the JOB_TOKEN into as an Authorization header. Forwarding it without a token would cause the proxy to clobber auth on requests to that host (e.g. the Azure DevOps host in LOCAL_AZURE_ACCESS_TOKEN flows), so the two are gated on JOB_TOKEN being present. Also honor a host-provided PROXY_CACHE value, falling back to true when it is unset or empty, and forward OPENSSL_FORCE_FIPS_MODE through to the proxy when the host has it set. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
142e24f to
6aa03f2
Compare
VXianOng
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the proxy container's environment:
JOB_TOKEN(from host) andDEPENDABOT_API_URL(fromparams.ApiUrl) — forwarded together, only whenJOB_TOKENis set and non-empty. The proxy injectsJOB_TOKENas anAuthorizationheader for theDEPENDABOT_API_URLhost, so gating avoids clobbering auth in the default/Azure flows where--api-urlis the Azure DevOps host.PROXY_CACHE— uses the host value when set, falls back totrue.OPENSSL_FORCE_FIPS_MODE— forwarded when the host has it set.Adds tests covering each variable.