Address NuGet discovery follow-up feedback - #244
Open
brettfo wants to merge 1 commit into
Open
Conversation
Normalize scheme-less service index URLs to HTTPS, reject non-HTTPS OIDC discovery redirects, and handle Azure DevOps hostnames case-insensitively. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation satisfies the stated follow-up requirements with focused regression coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Improves NuGet discovery URL handling and redirect security.
Changes:
- Normalizes scheme-less discovery URLs to HTTPS.
- Rejects insecure OIDC redirects and handles Azure hostnames case-insensitively.
- Adds regression coverage for normalization and redirect authentication stripping.
| File | Description |
|---|---|
internal/handlers/nuget_feed.go |
Implements URL normalization and authentication safeguards. |
internal/handlers/nuget_feed_test.go |
Covers new discovery, redirect, and hostname behavior. |
💡 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.
What are you trying to accomplish?
Address the unresolved review feedback from #240 after restoring eager NuGet service-index discovery.
This change:
Anything you want to highlight for special attention from reviewers?
Scheme-less URLs are normalized once when discovery jobs are registered, before source deduplication. Explicitly configured HTTP and HTTPS URLs remain unchanged and distinct.
Static discovery may continue following a downgrade redirect without credentials so it can still learn resource endpoints. OIDC discovery rejects the downgrade entirely rather than following it without the exchanged token.
How will you know you've accomplished your goal?
go test ./...passes.Checklist