fix(registry): honor plainHttp on registry login - #422
Merged
Conversation
RegistryLogin built its registry client with plainHTTP but never passed action.WithPlainHTTPLogin to the login action, so the flag was silently ignored. This worked until oras-go v2.6.1, a security release that stopped forwarding credentials across an HTTPS->HTTP downgrade (GHSA-28r5-37g7-p6mp, GHSA-xf85-363p-868w) - the insecure fallback had been carrying them. The Go and Java OCI tests relied on that same fallback, so they now declare plainHttp explicitly against the plain-HTTP test registry. Also bumps GO_VERSION to 1.26.7: Go 1.25 is out of support and helm.sh/helm/v3 3.21.4 requires go >= 1.26.0. Unblocks #419 and #420. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Marc Nuri <marc@marcnuri.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix is correctly propagated and covered across native and Java integration paths.
Pull request overview
Fixes plain-HTTP registry login by forwarding the existing option to Helm’s login action.
Changes:
- Applies
WithPlainHTTPLoginduring registry login. - Updates OCI tests to explicitly use plain HTTP.
- Upgrades CI to Go 1.26.7.
File summaries
| File | Description |
|---|---|
native/internal/helm/registry.go |
Forwards plain-HTTP login configuration. |
native/main_test.go |
Updates native OCI registry tests. |
HelmRegistryTest.java |
Covers Java plain-HTTP login. |
HelmPushTest.java |
Configures plain HTTP for push tests. |
HelmShowTest.java |
Configures plain HTTP for OCI show tests. |
.github/workflows/build.yml |
Upgrades build Go version. |
.github/workflows/release.yml |
Upgrades release Go version. |
.github/workflows/snapshots.yml |
Upgrades snapshot Go version. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Problem
RegistryLoginbuilds its registry client with plain-HTTP support, but never passesaction.WithPlainHTTPLogin(...)to the login action itself — so.plainHttp()wassilently ignored on login.
This went unnoticed because oras-go used to fall back from HTTPS to HTTP and still send
credentials. oras-go v2.6.1 (a security release) closed that hole: credentials are no
longer forwarded across an HTTPS→HTTP downgrade (GHSA-28r5-37g7-p6mp,
GHSA-xf85-363p-868w). Once that landed, login against a plain-HTTP registry started
failing with
401 unauthorized: authentication required.Changes
action.WithPlainHTTPLogin(options.PlainHttp)innative/internal/helm/registry.go.declare
plainHttpexplicitly against the plain-HTTP test registry.GO_VERSION1.25.10 → 1.26.7. Go 1.25 is out of support, andhelm.sh/helm/v33.21.4 requiresgo >= 1.26.0.Why now
Two dependabot PRs are red because of this:
helm.sh/helm/v33.21.0 → 3.21.4 (pulls oras-go 2.6.1, and requires Go 1.26)oras.land/oras-go/v22.6.0 → 2.6.2Both should go green once this lands and they are rebased.
Verification
HelmPushTest,HelmRegistryTest,HelmShowTest) green.