Skip to content

Pass experiments and set PACKAGE_MANAGER env variable on proxy - #656

Open
AbhishekBhaskar wants to merge 3 commits into
mainfrom
abhishekbhaskar/pass-experiments-to-proxy
Open

Pass experiments and set PACKAGE_MANAGER env variable on proxy#656
AbhishekBhaskar wants to merge 3 commits into
mainfrom
abhishekbhaskar/pass-experiments-to-proxy

Conversation

@AbhishekBhaskar

Copy link
Copy Markdown
Contributor

This PR forwards experiments and PACKAGE_MANAGER to the proxy.

What

Enables the CLI to drive the proxy's upcoming egress allowlist feature by:

  • Forwarding the job's experiments into the proxy config (so toggles like proxy_egress_observe / proxy_egress_enforce can be flipped locally).
  • Setting the PACKAGE_MANAGER env var on the proxy container (so it loads the correct per-ecosystem allowlist defaults).

Why

Part of the Egress Allowlist in Proxy epic. The CLI previously only passed all_credentials + ca to the proxy, so the egress toggles couldn't be exercised via the CLI, and PACKAGE_MANAGER was empty — which would degrade the allowlist to GitHub-infra-only under enforce.

Changes

  • internal/infra/config.go: add Experiments model.Experiment (json:"experiments,omitempty") to the proxy Config.
  • internal/infra/proxy.go: populate proxyConfig.Experiments from params.Job.Experiments; add PACKAGE_MANAGER=<job.PackageManager> in proxyEnv().
  • internal/infra/proxy_test.go: update proxyEnv call sites for the new signature and add a PACKAGE_MANAGER test.

Testing

  • go build ./... and go test ./internal/... pass.
  • Verified locally with dependabot update -f job.yml that a job's experiments block reaches the proxy config and PACKAGE_MANAGER is set on the container.

@AbhishekBhaskar AbhishekBhaskar self-assigned this Sep 7, 2026
@AbhishekBhaskar
AbhishekBhaskar requested review from a team as code owners September 7, 2026 22:49
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.

1 participant