Skip to content

Allowlist go.dev for bazel update jobs - #343

Merged
v-abhishekbhaskar merged 1 commit into
dependabot:mainfrom
tomas-edwardsson:tomas-edwardsson/allowlist-go-dev
Nov 3, 2026
Merged

v-abhishekbhaskar merged 1 commit into
dependabot:mainfrom
tomas-edwardsson:tomas-edwardsson/allowlist-go-dev

Conversation

@tomas-edwardsson

Copy link
Copy Markdown
Contributor

What are you trying to accomplish?

I'm trying to enable dependabot updates of my bazel built go repo and want to add go.dev to the allow list.

rules_go's go_sdk extension fetches the Go release index from https://go.dev/dl/?mode=json&include=all during bazel mod tidy, and the proxy blocks it:

proxy | [307] * egress not allowlisted go.dev
proxy | [307] 403 https://go.dev:443/dl/?mode=json&include=all

Before rules_go 0.59.0 this makes the update fail with dependency_file_not_resolvable. Newer versions tolerate the failure but still retry the request on every lockfile update.

Anything you want to highlight for special attention from reviewers?

go.dev also hosts the Go playground, whose share button lets anyone publish content there. I've added a RISK note on the entry for this, like the existing one for storage.googleapis.com.

go.dev is added as an exact host. golang.google.cn is left out because rules_go only falls back to it when go.dev fails.

How will you know you've accomplished your goal?

  • Tests: go.dev's index URL is in TestEgressAllowlist_ProdBlockedHostsNowAllowed. It got a 403 before the change and is allowed after. An evil.go.dev child probe was added too.
  • Dependabot CLI: ran it on AlexTereshenkov/dg-query with egress enforcement on. The released proxy blocked go.dev with a 403; this branch let it through with a 200.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

🤖 Generated with Claude Code

@tomas-edwardsson
tomas-edwardsson requested a review from a team as a code owner October 27, 2026 17:56
When MODULE.bazel pins the Go toolchain with
go_sdk.download(version = "..."), rules_go's go_sdk extension reads
https://go.dev/dl/?mode=json&include=all during `bazel mod tidy` to
resolve SDK filenames and checksums. Under proxy-egress-enforce the
proxy refuses it ("egress not allowlisted go.dev").

The impact depends on the rules_go version the update resolves. Before
rules_go 0.59.0 the go_sdk extension fails, so the update ends in
dependency_file_not_resolvable. From 0.59.0 the fetch may fail without
breaking the extension, but it is still attempted, and retried, on
every lockfile update.

go.dev is the Go project's own site (certificate CN=go.dev, issued by
Google Trust Services) and serves the index as JSON directly, with no
redirect, so it is added as an exact host with a child probe.
pkg.go.dev is already listed separately.

go.dev also serves the playground's /_/share endpoint, which stores
POSTed snippets publicly. The entry's comment records this as an
accepted residual risk, as is done for storage.googleapis.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@v-abhishekbhaskar
v-abhishekbhaskar force-pushed the tomas-edwardsson/allowlist-go-dev branch from f304c0c to 53e17f3 Compare November 3, 2026 19:49
@v-abhishekbhaskar
v-abhishekbhaskar merged commit 8232624 into dependabot:main Nov 3, 2026
106 of 108 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