Skip to content

Fix internal feed auth in unofficial CI pipeline#54362

Merged
marcpopMSFT merged 1 commit into
release/8.0.1xxfrom
dev/marcpop/fix-internal-feed-auth
May 18, 2026
Merged

Fix internal feed auth in unofficial CI pipeline#54362
marcpopMSFT merged 1 commit into
release/8.0.1xxfrom
dev/marcpop/fix-internal-feed-auth

Conversation

@marcpopMSFT
Copy link
Copy Markdown
Member

Summary

The unofficial CI pipeline (1472) does not have the AzureDevOps-Artifact-Feeds-Pats variable group linked, causing `` to resolve to a literal string instead of a PAT. This results in 401 Unauthorized errors when Helix test machines try to access internal NuGet feeds (e.g. dotnet8-internal).

Changes

eng/build.yml

Use instead of for the feed credential token. System.AccessToken is always available in any AzDO pipeline — no variable group required. The build service identity already has read access to the internal feeds.

Test fixes

Disable NuGet audit (NuGetAudit=false) in two tests that intentionally reference old vulnerable packages for conflict resolution testing:

  • It_resolves_assembly_conflicts_with_a_NETFramework_library — System.Net.Http 4.3.0, System.Text.RegularExpressions 4.3.0
  • CheckTargetFrameworkDisplayName — Microsoft.NETCore.App 2.1.0

The NU1903 vulnerability warnings were causing assertion failures.

Validation

Verified on internal ADO PR build — all tests pass with these changes.

Copilot AI review requested due to automatic review settings May 18, 2026 20:35
…udit in tests

The unofficial CI pipeline (1472) does not have the AzureDevOps-Artifact-Feeds-Pats
variable group linked, causing $(dn-bot-dnceng-artifact-feeds-rw) to resolve to a
literal string instead of a PAT. This results in 401 Unauthorized errors when Helix
test machines try to access internal NuGet feeds.

Use $(System.AccessToken) instead, which is always available in any AzDO pipeline.
The build service identity already has read access to the internal feeds.

Additionally, disable NuGet audit (NuGetAudit=false) in two tests that intentionally
reference old vulnerable packages (System.Net.Http 4.3.0, System.Text.RegularExpressions
4.3.0, Microsoft.NETCore.App 2.1.0) for conflict resolution testing. The NU1903
vulnerability warnings were causing assertion failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates unofficial internal CI to authenticate private NuGet feeds without relying on the missing PAT variable group, and adjusts tests that intentionally restore vulnerable legacy packages.

Changes:

  • Replaces private feed setup token usage with $(System.AccessToken) in eng/build.yml.
  • Disables NuGet audit in two targeted tests that intentionally use vulnerable package versions.
  • Adds Helix test step conditions to run after failed prior steps.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
eng/build.yml Updates private feed credential token and Helix test step conditions.
src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs Disables NuGet audit for assembly conflict resolution test.
src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs Disables NuGet audit for target framework display name test projects.
Comments suppressed due to low confidence (2)

eng/build.yml:139

  • This condition makes the Helix test step run even when an earlier step in the job fails, including the preceding Build or private feed credential setup. That can submit Helix work with missing or stale artifacts and turn a setup/build failure into additional noisy failures; leave the default succeeded() condition (or gate specifically on the build step succeeding) so tests only run after the artifacts they depend on were produced.
          condition: succeededOrFailed()

eng/build.yml:180

  • This condition makes the Helix test step run even when an earlier step in the job fails, including the preceding Build or private feed credential setup. That can submit Helix work with missing or stale artifacts and turn a setup/build failure into additional noisy failures; leave the default succeeded() condition (or gate specifically on the build step succeeding) so tests only run after the artifacts they depend on were produced.
          condition: succeededOrFailed()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eng/build.yml Outdated
@marcpopMSFT marcpopMSFT force-pushed the dev/marcpop/fix-internal-feed-auth branch from 46c18b3 to 79bf8c8 Compare May 18, 2026 20:37
@marcpopMSFT marcpopMSFT requested a review from joeloff May 18, 2026 20:40
@marcpopMSFT
Copy link
Copy Markdown
Member Author

/backport to release/8.0.4xx

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/8.0.4xx (link to workflow run)

@marcpopMSFT marcpopMSFT merged commit d1bdfb6 into release/8.0.1xx May 18, 2026
22 checks passed
@marcpopMSFT marcpopMSFT deleted the dev/marcpop/fix-internal-feed-auth branch May 18, 2026 22:36
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.

3 participants