Repository navigation
Investigate proxy issue preventing gradle wrapper url validation #15
Description
Code improvement description
We currently disable Gradle Wrapper distribution URL validation (--no-validate-url) as a workaround because the wrapper task’s URL validation fails when running behind Dependabot’s proxy.
Context / Background
When the Gradle wrapper task runs, Gradle validates the configured distribution URL by issuing a HEAD request, for example:
HEAD https://services.gradle.org/distributions/gradle-9.3.0-bin.zip
This head request then redirects to GitHub and ultimately fails with
WARN: Cannot read TLS response from mitm'd server tls: first record does not look like a TLS handshake
Logs
proxy | 2026/01/28 13:48:55 [025] HEAD https://services.gradle.org:443/distributions/gradle-9.3.0-bin.zip
proxy | 2026/01/28 13:48:55 [025] 307 https://services.gradle.org:443/distributions/gradle-9.3.0-bin.zip
proxy | 2026/01/28 13:48:55 [027] HEAD https://github.com:443/gradle/gradle-distributions/releases/download/v9.3.0/gradle-9.3.0-bin.zip
proxy | 2026/01/28 13:48:55 [027] * authenticating git server request (host: github.com)
proxy | 2026/01/28 13:48:55 [027] 302 https://github.com:443/gradle/gradle-distributions/releases/download/v9.3.0/gradle-9.3.0-bin.zip
proxy | 2026/01/28 13:48:55 [029] HEAD https://objects.githubusercontent.com:443/github-production-release-asset-2e65be/696192900/b5669ad6-764c-4b3a-a4eb-d6e13f57ec47?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20260128%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260128T134856Z&X-Amz-Expires=1800&X-Amz-Signature=63661c31353f570bf663e5fcab68ebc77bb23b0b7ff5c9f390ef8b559a1d23ac&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dgradle-9.3.0-bin.zip&response-content-type=application%2Foctet-stream
proxy | 2026/01/28 13:48:55 [029] WARN: Cannot read TLS response from mitm'd server tls: first record does not look like a TLS handshake
proxy | 2026/01/28 13:48:55 [031] HEAD https://objects.githubusercontent.com:443/github-production-release-asset-2e65be/696192900/b5669ad6-764c-4b3a-a4eb-d6e13f57ec47?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20260128%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260128T134856Z&X-Amz-Expires=1800&X-Amz-Signature=63661c31353f570bf663e5fcab68ebc77bb23b0b7ff5c9f390ef8b559a1d23ac&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dgradle-9.3.0-bin.zip&response-content-type=application%2Foctet-stream
proxy | 2026/01/28 13:48:55 [031] WARN: Cannot read TLS response from mitm'd server tls: first record does not look like a TLS handshake
To keep updates working, we pass --no-validate-url and set validateDistributionUrl=false, which skips the distribution URL validation step.
This workaround only seems necessary due to a proxy-related issue. When running without the Dependabot proxy (for example, through my own proxy), the validation works as expected.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
yeikel commentedon Feb 3, 2026
@JamieMagee I noticed that the proxy server is now open source 🚀
Do you have the ability to move this issue over that repo? (transfer?)
I'll definitely take a closer look now that this is open source
JamieMagee commentedon Feb 3, 2026
Haha, nothing gets past you! It's been open source for all of 30 minutes 😄 The announcement is coming tomorrow.
I'll transfer this issue there now and take a look through the other issues in dependabot-core for candidates to move.
yeikel commentedon Feb 3, 2026
I follow you on GitHub and spotted the activity 😅
yeikel commentedon Feb 3, 2026
Well, the good news is that I was able to reproduce the problem running the proxy directly. It is still unclear what the issue is
yeikel commentedon Feb 3, 2026
The issue seems to be because:
HEADrequest tohttps://github.com:443/gradle/gradle-distributions/releases/download/v9.3.0/gradle-9.3.0-bin.zip, the proxy detects thegithub.comhost and injects the git credentials using basic auth:proxy/internal/handlers/git_server.go
Lines 264 to 268 in b4a5089
For example:
https://github.com:443/gradle/gradle-distributions/releases/download/v9.3.0/gradle-9.3.0-bin.zip→ Redirects tohttps://release-assets.githubusercontent.com/github-production-release-asset..., which resolves correctly.https://objects.githubusercontent.com/…, which doesn’t resolve and consistently returns a 401.This seems to be a very specific GitHub implementation detail that I am not familiar with yet, and it’s unclear how to work around it. Disabling auth in the snippet above “fixes” the issue, but of course, that would break cases where the proxy needs authentication to download an artifact.
I plan to try reproducing and testing how this behaves when there is a need to pass auth to download an artifact. Sharing the findings early in case anyone has encountered this behavior before.
Relevant logs:
Before(it contains the auth)
After(disabling auth for the host)
GalBerezansky commentedon Oct 18, 2026
This also affects uv: lock files with wheels hosted on GitHub Releases (e.g.
nattenviahttps://whl.natten.org) fail every Dependabot security update with a misleadingprivate_source_authentication_failure. Root cause and an end-to-end verification of the fix in #27 are in my comment there.