Treat automatic package credentials as fallback auth - #229
Open
JamieMagee wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
internal/handlers/docker_registry.go — Docker is the only proxy-only flow that bypasses proxyOnlyCredentialRequestAllowed. A proxy-only… |
|
internal/handlers/npm_registry.go — This refactor bypasses the lower-cased cred.host that the old loop passed to… |
|
internal/oidc/oidc_registry_test.go — This replacement removes the only test that concurrently registers OIDC entries while performing… |
What changed in this PR
Adds fallback-only automatic GitHub Packages authentication across five package ecosystems while preserving higher-priority authentication methods.
Changes:
- Introduces
proxy-onlycredential handling and authorization-placeholder detection. - Adds traversal-safe, path-boundary-aware credential matching.
- Adds repository-scoped Docker authentication and NuGet discovery safeguards.
| File | Description |
|---|---|
internal/config/config.go |
Adds boolean credential access. |
internal/config/config_test.go |
Tests boolean access. |
internal/helpers/helpers.go |
Adds safe canonical path matching. |
internal/helpers/helpers_test.go |
Tests path boundaries and encoding. |
internal/oidc/oidc_registry.go |
Uses canonical path specificity. |
internal/oidc/oidc_registry_test.go |
Updates OIDC path tests. |
internal/handlers/credentials.go |
Detects usable request authentication. |
internal/handlers/credentials_test.go |
Tests authorization detection. |
internal/handlers/npm_registry.go |
Adds npm fallback credentials. |
internal/handlers/npm_registry_test.go |
Tests npm fallback precedence. |
internal/handlers/maven_repository.go |
Adds Maven fallback credentials. |
internal/handlers/maven_repository_test.go |
Tests Maven fallback behavior. |
internal/handlers/rubygems_server.go |
Adds RubyGems fallback credentials. |
internal/handlers/rubygems_server_test.go |
Tests RubyGems fallback behavior. |
internal/handlers/nuget_feed.go |
Adds host-only NuGet fallback handling. |
internal/handlers/nuget_feed_test.go |
Tests NuGet fallback and discovery. |
internal/handlers/docker_registry.go |
Adds scoped Docker fallback authentication. |
internal/handlers/docker_registry_test.go |
Tests Docker scopes and conflicts. |
internal/handlers/oidc_handling_test.go |
Tests OIDC precedence and failure handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
JamieMagee
enabled auto-merge (squash)
September 1, 2026 18:58
JamieMagee
requested review from
Nishnha,
brettfo,
brrygrdn,
jakecoffman,
jeffwidman,
jurre,
kbukum1,
pavera,
ruben-pachecocaldera and
truggeri
and removed request for
Nishnha,
brettfo,
brrygrdn,
jakecoffman,
jeffwidman,
jurre,
kbukum1,
pavera,
ruben-pachecocaldera and
truggeri
September 1, 2026 18:59
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.


What changed
Add
proxy-onlycredentials for automatic GitHub Packages authentication. They are used only when explicit OIDC credentials, explicit static credentials, and request-provided authentication do not apply.This covers npm, Maven/Gradle, RubyGems, NuGet, and Docker. It also:
/v2/<repository>paths;This is the proxy prerequisite for dependabot/dependabot-core#15415. The published image must be pinned in
github/dependabot-actionbefore the feature is re-enabled.Validation
Passed the full race, lint, build, vet, container, smoke, and production-image checks.