Skip to content

Add Copilot setup workflow for vsassets.io firewall allowlist #49470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 18, 2025

This PR adds a GitHub Actions workflow to configure firewall allowlist settings for GitHub Copilot, enabling access to Visual Studio assets URLs needed for NuGet package restore operations.

Problem

GitHub Copilot was unable to access *.vsblob.vsassets.io URLs during dotnet restore operations, resulting in firewall blocking errors like:

Resource temporarily unavailable (lylvsblobprodcus31.vsblob.vsassets.io:443)
Failed to download package 'Microsoft.DotNet.Arcade.Sdk.10.0.0-beta.25316.103'

Solution

Created .github/workflows/copilot-setup.yml that sets the COPILOT_AGENT_FIREWALL_ALLOW_LIST_ADDITIONS environment variable to "*.vsblob.vsassets.io", allowing Copilot to access all Visual Studio blob storage subdomains required for package restoration.

Key Features

  • Minimal Implementation: Only 22 lines added, following the repository's minimal change principle
  • Complete Coverage: The wildcard pattern covers all blocked URLs mentioned in the issue
  • Manual Trigger: Uses workflow_dispatch for on-demand execution when needed
  • Clear Documentation: Includes explanatory comments for maintainability

Blocked URLs This Resolves

The workflow enables access to vsblob.vsassets.io subdomains, including:

  • 7tjvsblobprodcus341.vsblob.vsassets.io
  • c78vsblobprodcus322.vsblob.vsassets.io
  • d0svsblobprodcus381.vsblob.vsassets.io
  • jd4vsblobprodcus366.vsblob.vsassets.io
  • l49vsblobprodcus358.vsblob.vsassets.io
  • lylvsblobprodcus31.vsblob.vsassets.io
  • uy6vsblobprodcus34.vsblob.vsassets.io
  • vb4vsblobprodcus33.vsblob.vsassets.io

Fixes #49469.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • lylvsblobprodcus31.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/sdk/sdk/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/sdk/sdk/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/sdk/sdk/artifacts/toolset/10.0.0-beta.25316.103.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Allow Copilot to access vsassets.io urls to enable restore Add Copilot setup workflow for vsassets.io firewall allowlist Jun 18, 2025
@Copilot Copilot AI requested a review from baronfel June 18, 2025 03:37
Copilot finished work on behalf of baronfel June 18, 2025 03:37
@baronfel baronfel marked this pull request as ready for review June 18, 2025 03:38
@baronfel baronfel enabled auto-merge (squash) June 18, 2025 03:38
@baronfel
Copy link
Member

baronfel commented Jun 18, 2025

Failure is the containers test - known issue. @marcpopMSFT can you force-merge when you have time?

Also I don't have write permissions on this PR for some reason. EDIT: ah, this is because I collaborated w/copilot:

Approvals from users that collaborated with Copilot on changes will not satisfy review requirements.

@KalleOlaviNiemitalo
Copy link
Contributor

Does this actually work?

@baronfel
Copy link
Member

There are a few other examples of this on github already, but non of them use the * syntax, so I think you are 100% right on that.

Fix domain syntax
@baronfel baronfel merged commit 9c7b56d into main Jun 19, 2025
30 checks passed
@baronfel baronfel deleted the copilot/fix-49469 branch June 19, 2025 20:02
@KalleOlaviNiemitalo
Copy link
Contributor

https://github.com/orgs/community/discussions/163374 seems to say that setting COPILOT_AGENT_FIREWALL_ALLOW_LIST_ADDITIONS in env does not affect the firewall. Perhaps the repositories that have such an environment variable in their workflows have already been configured in the proper way and the env has just been left over.

Oh well, you'll see whether it works or not.

@baronfel
Copy link
Member

@KalleOlaviNiemitalo so far it has been working as expected - Copilot has been able to restore and build the project. Futher PRs have added a few more changes to make sure that when Copilot is working on an issue it:

  • starts from a green build
  • is using the repo-local dotnet instead of any dotnet from the ambient environment

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.

Allow Copilot to access vsassets.io urls to enable restore
4 participants