Skip to content

Enforce CFSClean network isolation in 1ES pipelines - #1023

Merged
Daniel Jurek (danieljurek) merged 2 commits into
mainfrom
copilot/port-pr-5194
Aug 7, 2026
Merged

Enforce CFSClean network isolation in 1ES pipelines#1023
Daniel Jurek (danieljurek) merged 2 commits into
mainfrom
copilot/port-pr-5194

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Ports the pipeline hardening from Azure/autorest#5194 to support CFSClean-isolated builds.

Changes

  • Network isolation

    • Configure shared 1ES pipelines with Permissive, CFSClean.
  • Package manager setup

    • Replace Corepack with npm install -g.
    • Install the exact pnpm version declared in package.json.
    • Continue using the authenticated Azure Artifacts npm registry.

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI changed the title Enforce CFSClean network isolation Enforce CFSClean network isolation in 1ES pipelines Aug 5, 2026
@mikeharder

Copy link
Copy Markdown
Member

CFSClean network isolation blocks direct crates.io access, so cargo must
resolve crates through the azure-sdk-for-rust feed instead.

Add config-cargo.yml to set-env.yaml, the shared step template included by
all four registered pipelines (ci, publish-release, typespec-spector, and
ci-typespec-nightly). All cargo invocations live in build-test.yaml, which
always runs after set-env.yaml, so a single reference covers every pipeline.

Also move config.toml.template from eng/template to eng/templates to match
the path config-cargo.yml copies from and the azure-sdk-for-rust layout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d9f988a-e7bc-4959-a467-789804f3221c
@danieljurek

Copy link
Copy Markdown
Member

Mike Harder (@mikeharder) this is fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 hardens the repo’s Azure DevOps 1ES pipelines for CFSClean network isolation by routing Cargo (crates.io) through the Centralized Feed Service (CFS) and by installing pnpm directly from the version declared in package.json rather than using Corepack.

Changes:

  • Set 1ES pipeline networkIsolationPolicy to Permissive, CFSClean.
  • Add a Cargo config template and pipeline step to copy it into $CARGO_HOME/config.toml and authenticate to the azure-sdk-for-rust feed.
  • Replace Corepack-based pnpm setup with npm install -g of the exact packageManager spec from package.json.

Reviewed changes

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

File Description
eng/templates/config.toml.template New Cargo config template intended to redirect crates.io to the Azure DevOps CFS-backed registry.
eng/pipelines/templates/steps/set-env.yaml Switch pnpm installation approach and add the cargo configuration/authentication step into the shared environment setup.
eng/pipelines/templates/steps/config-cargo.yml New pipeline step to install Cargo config into $CARGO_HOME and run CargoAuthenticate@0.
eng/pipelines/templates/stages/1es-redirect.yml Enable CFSClean network isolation policy for 1ES template usage.

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

Comment thread eng/templates/config.toml.template
@danieljurek
Daniel Jurek (danieljurek) merged commit f129097 into main Aug 7, 2026
11 checks passed
@danieljurek
Daniel Jurek (danieljurek) deleted the copilot/port-pr-5194 branch August 7, 2026 21:19
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.

4 participants