Skip to content

Forward proxy env vars from the host - #635

Merged
brettfo merged 1 commit into
mainfrom
dev/brettfo/proxy-job-token
Jun 29, 2026
Merged

brettfo merged 1 commit into
mainfrom
dev/brettfo/proxy-job-token

Conversation

@brettfo

@brettfo brettfo commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Updates the proxy container's environment:

  • JOB_TOKEN (from host) and DEPENDABOT_API_URL (from params.ApiUrl) — forwarded together, only when JOB_TOKEN is set and non-empty. The proxy injects JOB_TOKEN as an Authorization header for the DEPENDABOT_API_URL host, so gating avoids clobbering auth in the default/Azure flows where --api-url is the Azure DevOps host.
  • PROXY_CACHE — uses the host value when set, falls back to true.
  • OPENSSL_FORCE_FIPS_MODE — forwarded when the host has it set.

Adds tests covering each variable.

@brettfo
brettfo requested review from a team as code owners June 26, 2026 20:15
@brettfo
brettfo force-pushed the dev/brettfo/proxy-job-token branch 2 times, most recently from 16ab831 to 6019bf9 Compare June 26, 2026 20:57
@brettfo brettfo changed the title Pass JOB_TOKEN to the proxy container Pass JOB_TOKEN and DEPENDABOT_API_URL to the proxy container Jun 26, 2026
@brettfo
brettfo force-pushed the dev/brettfo/proxy-job-token branch 3 times, most recently from 11df025 to 142e24f Compare June 26, 2026 21:47
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>
@brettfo
brettfo force-pushed the dev/brettfo/proxy-job-token branch from 142e24f to 6aa03f2 Compare June 26, 2026 22:44
@brettfo brettfo changed the title Pass JOB_TOKEN and DEPENDABOT_API_URL to the proxy container Forward proxy env vars from the host Jun 26, 2026
@brettfo
brettfo added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit c95a632 Jun 29, 2026
106 checks passed
@brettfo
brettfo deleted the dev/brettfo/proxy-job-token branch June 29, 2026 20:13
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
dependabot 1.91.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* Accept hyphenated experiment name and limit case-insensitive filesystem to nuget by @brettfo in dependabot/cli#634
* Forward proxy env vars from the host by @brettfo in dependabot/cli#635


**Full Changelog**: https://github.com/dependabot/cli/compare/v1.90.0...v1.91.0</pre>
  <p>View the full release notes at <a href="https://github.com/dependabot/cli/releases/tag/v1.91.0">https://github.com/dependabot/cli/releases/tag/v1.91.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!13031
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