Skip to content

(Allowlist) Add MyGet CDN for NuGet package downloads - #331

Open
Amith211 wants to merge 1 commit into
dependabot:mainfrom
Amith211:allowlist/myget
Open

Amith211 wants to merge 1 commit into
dependabot:mainfrom
Amith211:allowlist/myget

Conversation

@Amith211

@Amith211 Amith211 commented Oct 18, 2026 •

Copy link
Copy Markdown

What are you trying to accomplish?

MyGet-hosted NuGet feeds redirect package downloads to their shared CDN at mgcdn-main2.azureedge.net.

Since Dependabot introduced outbound egress allowlist enforcement, these redirects are blocked with 403 Forbidden, preventing dependency updates and, in some cases, the initial NuGet package restore.

This issue has been reproduced across multiple repositories using the Caliburn.Micro MyGet feed.

This PR adds mgcdn-main2.azureedge.net as a derived URL for .myget.org registries, allowing Dependabot to download packages from MyGet's CDN.

Anything you want to highlight for special attention from reviewers?

The URL is added under registry_redirect_derivations rather than the global nuget allowlist.

This restricts access to the CDN to Dependabot jobs configured with a matching MyGet registry, while supporting different MyGet feed subdomains.

How will you know you've accomplished your goal?

The following error should no longer occur when Dependabot downloads packages from MyGet:

302 https://www.myget.org/F/caliburn-micro-builds/...
GET https://mgcdn-main2.azureedge.net/...
* egress not allowlisted mgcdn-main2.azureedge.net
403 Forbidden

Testing

Successfully ran tests:

go test -race -shuffle=on -count=2 -v ./...

Result: PASS (exit code 0)

A test has been added to verify that the CDN hostname is correctly derived from a configured MyGet registry.

The test was verified using a red/green approach:

  • Without the allowlist entry: The test fails as expected.
  • With the allowlist entry: The test passes.

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.

Add mgcdn-main2.azureedge.net as a derived host for MyGet registries to permit package downloads redirected to the CDN.

Add a regression test to verify the URL derivation.
@Amith211
Amith211 requested a review from a team as a code owner October 18, 2026 15:50
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.

1 participant