Repository navigation
build: define the package feeds as readonly variables in the product builds - #350600
Merged
Ladislau Szomoru (lszomoru) merged 1 commit intoNov 26, 2026
Conversation
…builds product-build.yml, product-build-ado-ci.yml and sdk-validation-build.yml took the npm and Cargo feeds as free-text NPM_REGISTRY and CARGO_REGISTRY parameters, so a run could be queued with any feed. They now define both as readonly variables. Queuing a run with either parameter fails with "Unexpected parameter", and no step can change the feeds with task.setvariable. product-build-variables.yml does the same for the TSA pipeline, product-build-ci.yml marks its feed variables readonly, and product-build-template.yml drops the two parameters it never read. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ladislau Szomoru (lszomoru)
force-pushed
the
lszomoru/agents/secure-product-build-feeds
branch
from
November 26, 2026 22:01
beeb8b7 to
daba1ab
Compare
Ladislau Szomoru (lszomoru)
merged commit Nov 26, 2026
04bcde1
into
lszomoru/agents/remove-sdk-parameters-product-build
1 check passed
Ladislau Szomoru (lszomoru)
deleted the
lszomoru/agents/secure-product-build-feeds
branch
November 26, 2026 22:07
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.
Stacked on #350593. Review only the last commit.
Why
The product builds take the npm and Cargo feeds as free-text queue parameters,
NPM_REGISTRYandCARGO_REGISTRY. A run can be queued with any feed, or withnone, which also swaps the Microsoft Rust toolchain for rustup. The feeds of a product build should come from reviewed YAML only. Recent product builds left both parameters at their defaults.What changed
product-build.yml,product-build-ado-ci.ymlandsdk-validation-build.ymldrop the two parameters and define both feeds as variables withreadonly: true.product-build-variables.yml, which the TSA pipeline includes, does the same.product-build-ci.ymlmarks its existing feed variables readonly.product-build-template.ymldrops the two parameters, which it never read. The azure-pipelines skill no longer lists them.Scope
The shared setup templates keep their
ne(variables['NPM_REGISTRY'], 'none')conditions, becauseproduct-copilot-recovery.ymlsetsnoneon purpose.product-smoke-flaky.ymlandproduct-sanity-tests.ymlstill take an npm feed parameter. They test published builds and are unchanged here.Tradeoffs
One shared variables template would hold the two URLs once. Inline constants keep the feeds visible in each pipeline file, as
product-build-ci.ymlalready does.Blast radius
Queuing any of the three pipelines with
NPM_REGISTRYorCARGO_REGISTRYnow fails withUnexpected parameter. The queue form no longer shows the two fields. A run with other feeds needs a YAML change on its branch.Verification
POST _apis/pipelines/{id}/previewwithyamlOverride, templates frommain) on the newproduct-build.yml,sdk-validation-build.ymlandproduct-build-ci.yml: passed. The final YAML has both feeds as readonly constants.NPM_REGISTRY: each fails withUnexpected parameter 'NPM_REGISTRY', as expected. The oldproduct-build.yml, queued withNPM_REGISTRY=https://example.invalid/npm/, expanded with that feed.product-build-ado-ci.yml: queued withNPM_REGISTRYit fails withUnexpected parameter. Its full preview fails on a template path outside this change, the same way with the old YAML.product-build-variables.yml: a preview that includes only this template from this branch expands to the two readonly constants. The TSA pipeline itself doesn't expand onmain(1ES SDL repository settings), and it fails with the same errors on this branch.node --test lib/test/privilegedConnections.test.ts lib/test/mobileWebPublication.test.ts lib/test/testCheckpointTemplates.test.ts lib/test/workspaceImage.test.ts lib/test/sanityTestSelection.test.ts lib/test/windowsNetworkDiagnostics.test.ts lib/test/agentHostTestSelection.test.tsinbuild/: 46 passed, 1 failed. The failing test, "mobile script failures warn and stop the optional job before publishing a partial archive", fails the same way without this change.