Add azure blob redirect urls to egress allowlist - #268
Merged
jeffwidman merged 1 commit intoSep 26, 2026
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The exact-host additions are appropriately scoped and covered by positive and negative tests.
Review effort: Balanced
Findings: None
What changed in this PR
Adds exact GitHub Packages Azure Blob download hosts to the egress allowlist.
Changes:
- Allow npm, RubyGems, and Maven GitHub Packages content hosts.
- Test allowed hosts and blocked subdomains/lookalikes.
| File | Description |
|---|---|
internal/handlers/egress_allowlist_defaults.yaml |
Adds three exact Azure Blob hosts. |
internal/handlers/egress_allowlist_test.go |
Verifies narrow allowlist behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jeffwidman
approved these changes
Sep 26, 2026
honeyankit
approved these changes
Sep 26, 2026
jeffwidman
deleted the
abhishekbhaskar/add-azure-blob-redirect-urls-allowlist
branch
September 26, 2026 05:54
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?
GitHub Packages serves registry metadata from
*.pkg.github.com, but the actual package download is a 302 redirect to a per-ecosystem Azure Blob content host carrying a short-lived SAS token. The egress allowlist covered the registry front door but not the redirect target, so authenticated downloads failed after the redirect: the job reported an opaqueunknown_errorwhile the registry request itself had succeeded.nugetregistryv2prod.blob.core.windows.netwas already allowlisted; this adds the three missing siblings so Bundler, npm, and Maven behave consistently.npmregistryv2prod.blob.core.windows.net→npm_and_yarn(inherited bybun)rubygemsregistryv2prod.blob.core.windows.net→bundlermavenregistryv2prod.blob.core.windows.net→maven(inherited bygradle)Anything you want to highlight for special attention from reviewers?
These are
*.blob.core.windows.nethosts, which the file header explicitly warns against — so the matching form matters. They are added as exact entries only. The header's concern is patterns with attacker-choosable labels; an Azure storage account name is globally unique and these four are already registered to GitHub, so an exact entry leaves no label an attacker can claim. I deliberately did not reuse the adjacent*vsblobprod*glob, which the file documents as a known accepted risk rather than a pattern to copy.Provenance is GitHub's own Meta API rather than the report alone: all four hosts are published under
domains.packagesin https://api.github.com/meta.How will you know you've accomplished your goal?
TestEgressAllowlist_GitHubPackagesContentHostsAllowedcovers all four content hosts plus therubygems.pkg.github.comfront door, and asserts the entries stay narrow: child hosts (evil.<host>), lookalike account names (...prodx,my...prod), and the sharedattacker.blob.core.windows.netparent all remain blocked.Checklist