Repository navigation
Conversation
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.
Motivation
parameters.setupRefwas expanded directly into inline PowerShell and Bash script bodies, allowing crafted refs to break out of quoted strings and execute arbitrary commands on the agent.Description
azure/setup-vp.ymlto construct bootstrap/runtime download URLs at runtime from the environment variableSETUP_VP_SETUP_REFinstead of interpolating${{ parameters.setupRef }}into executable script source; the Windows branch uses$env:SETUP_VP_SETUP_REFand the Unix branch uses${SETUP_VP_SETUP_REF}.SETUP_VP_SETUP_REFso consumers can still control the ref without injecting into script text.src/azure/template.test.tsthat asserts the template does not containsetup-vp/${{ parameters.setupRef }}/azureand does contain the env-based URL forms used by both prepare steps.Testing
pnpm run check:fixandpnpm run typecheckcompleted successfully.pnpm run testcompleted successfully (309 tests passing).pnpm run buildcompleted successfully andgit diff --checkreported no issues.Codex Task