Skip to content

Fix pipeline NuGet restore failure under network isolation policy#682

Merged
AmelBawa-msft merged 2 commits into
mainfrom
sfi/ES4.2.4/7dcb92b3
Jul 23, 2026
Merged

Fix pipeline NuGet restore failure under network isolation policy#682
AmelBawa-msft merged 2 commits into
mainfrom
sfi/ES4.2.4/7dcb92b3

Conversation

@AmelBawa-msft

@AmelBawa-msft AmelBawa-msft commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a network isolation compliance issue on the main CI pipeline, which was failing to restore NuGet packages.

NuGet.config stays public-facing so external OSS contributors can restore/build locally. The pipeline now uses NuGet.Internal.config (an internal-feed-only config, already used by the release pipeline) for its own restore step instead, authenticating via NuGetAuthenticate@1 against a same-org Azure Artifacts feed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@AmelBawa-msft AmelBawa-msft added s360-toolkit Created by S360-Breeze Toolkit remediation SFI:ES4.2.4 SFI KPI ES4.2.4 - CFS Network Isolation labels Jul 23, 2026
@AmelBawa-msft

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@AmelBawa-msft

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@AmelBawa-msft

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@AmelBawa-msft

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@AmelBawa-msft AmelBawa-msft changed the title [s360-breeze-toolkit: SFI-ES4.2.4] Restore via internal NuGet feed to fix CFS network isolation violation [s360-breeze-toolkit: SFI-ES4.2.4] Fix CFS / network isolation compliance violation Jul 23, 2026
The main CI pipeline restored NuGet packages using the public-facing
NuGet.config, which resolves to api.nuget.org - an endpoint blocked
under this pipeline's network isolation policy. NuGet.config must
remain the public-facing default for external OSS contributors, so
this repo already has a NuGet.Internal.config pointing at an internal
Azure Artifacts upstream feed (used by azure-pipelines.release.yml).

- Point the CI Restore task's nugetConfigPath at NuGet.Internal.config
  instead of the public NuGet.config.
- Add NuGetAuthenticate@1 before restore so the build service can
  authenticate to the internal feed.
- Append CFSClean to the pipeline's networkIsolationPolicy (kept
  alongside the existing Permissive setting rather than replacing it).
…tion

The original fix pointed at a cross-organization feed, which
NuGetAuthenticate@1 cannot authenticate against since it only covers
feeds within the same org/collection as the pipeline. This caused
NU1301 401 Unauthorized failures in CI.

Created a new same-org feed 'WinGetCreateDependencies' in the
winget-create project (matching the sibling repo convention used by
winget-cli/winget-dsc), configured with nuget.org as an upstream
source, and granted read access to the project's Build Service
identity. Repointed NuGet.Internal.config at this feed.
@AmelBawa-msft
AmelBawa-msft force-pushed the sfi/ES4.2.4/7dcb92b3 branch from 0544a2f to e5a57d0 Compare July 23, 2026 21:28
@AmelBawa-msft AmelBawa-msft changed the title [s360-breeze-toolkit: SFI-ES4.2.4] Fix CFS / network isolation compliance violation Fix pipeline NuGet restore failure under network isolation policy Jul 23, 2026
@AmelBawa-msft AmelBawa-msft removed s360-toolkit Created by S360-Breeze Toolkit remediation SFI:ES4.2.4 SFI KPI ES4.2.4 - CFS Network Isolation labels Jul 23, 2026
@AmelBawa-msft

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@AmelBawa-msft
AmelBawa-msft merged commit dd773cb into main Jul 23, 2026
13 checks passed
@AmelBawa-msft
AmelBawa-msft deleted the sfi/ES4.2.4/7dcb92b3 branch July 23, 2026 21:49
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.

2 participants